WebAssembly’s Promise Heads to Ruby – The New Stack

Although Ruby isn’t exactly at the top of the list of most searched languages ​​in the Web Assembly Status 2021 survey (that honor went to Rust, closely followed by Go and C++), yet that’s precisely what happened this week.

Well, more specifically, the first look at Ruby 3.2.0 provides WebAssembly System Interface (WASI) based WebAssembly support, which “allows a CRuby binary to be available on the web browser, Serverless Edge environment, and other WebAssembly/WASI integrators”.

WebAssembly, in case you’re not familiar, brings languages ​​other than HTML, CSS, and JavaScript to the browser (and other places), and a few years ago it was named by the World Wide Web Consortium ( W3C) as “the fourth language for the web that allows code to run in the browser.

Although the implementation is in its early stages and lacks some features, the Ruby community is still generating some excitement.

A blog post last month by Ruby committer Yuta Saito provided a update on WebAssembly/WASI support in Ruby, and in it, Saito explained some of the reasoning and backstory. Ruby, Saito explains, was already supported in WebAssembly using Emscripten, but that implementation was heavily dependent on the host JavaScript environment. By moving to WASI, Ruby can now be used not only in the browser, but also “in a variety of situations such as edge computing, embedded environments, and interfaces for plug-in systems.”

“WASI is an effort to define a standard set of system calls for WebAssembly modules, allowing WebAssembly modules not only to be portable between architectures, but also to be portable between environments implementing this standard set of system calls,” says Saito. “WASI does not rely on JavaScript at all.”

For more technical details, head over to Saito’s blog, which explains how this will be implemented and what the current limitations are. Beyond that, if you wanna try, give it quick getting started guide a read and start.

This week in programming

  • Lambda gets built-in HTTPS endpoints: Although it was technically possible to create an API endpoint for an AWS Lambda function using Amazon API Gatewaythe task has become much simpler with AWS new Lambda function URLs. Now, without having to learn or use other services, AWS Lambda users can add HTTPS endpoints to any Lambda function and, if desired, configure Cross-Origin Resource Sharing (CORS) headerswhich indicate “origins (domain, scheme, or port) other than its own from which a browser must allow resources to be loaded”. The goal of this new feature is to make it quick and easy to set up and run an endpoint, but if you need advanced features, such as validation or throttling, Amazon API Gateway may be a better bet. Isn’t that just it, though? The other big advantage of this new feature is that you no longer have to pay for Amazon API Gateway. For more details on exactly how to set them up, when to use them or not, and how much they might cost (the cost is included in Lambda’s request and duration pricing), head over and give the blog post a glance.
  • Meta continues its F8 break: Despite the seemingly ubiquitous return to conferences lately, it looks like Meta has decided to continue his F8 paused in 2022. F8 was Facebook’s developer conference that was canceled in 2020 and held virtually in 2021. “Similar to years past, we are taking a brief break from programming and will not be holding F8 in 2022 while we prepare for new initiatives that are all tailored to the next chapter of the internet and the next chapter of our business. also: building the metaverse,” the company wrote in a blog post announcing the move. If AR, VR, and the metaverse are your thing, however, Facebook says it’s ready to move forward later this year. during its “Connect” event.
  • What’s next for GitLab’s acquisition of OpsTrace? In a blog post this week on observability being the key to cloud-native transitions, it seems that the lead was a little buried. While the general discussion was fine, GitLab also linked to a recent blog post by OpsTracea company that they acquired in 2021, in which OpsTrace shared an update on its integration into GitLab. In the blog post, which was originally written late last month, OpsTrace wrote that it wanted to share “two key updates”, the first being that it “will be starting a new open source project to create a new Observability User Interface (UI), GitLab Observability UI” is based on a fork of the latest Apache-licensed branch (7.5.x) of Grafana. In the FAQ for this update, OpsTrace offers to do because “using an existing base allows us to move quickly and immediately focus on improved UX while being compatible with a wide range of existing Prometheus dashboards. The resulting project will be under Apache 2.0 license to enable “UI integration into GitLab and other companies’ existing products. At the same time, OpsTrace also unifies “the backend for metrics, logs, and traces on ClickHouse” and removes Loki for licensing reasons, so they can build their own Apache-licensed logging backend on top of ClickHouse. All of this, corporate caveats aside, will likely be coming to a GitLab near you in the near future.
  • The new GitHub action prevents the introduction of the vulnerability: Although GitHub’s Dependabot service already lets you know if one of your dependencies has a vulnerability, it’s still possible to introduce a vulnerability by adding a new dependency. This is why GitHub has added a new action to prevent the introduction of known vulnerabilities into your code. New dependency review action introduced this week “automates finding and blocking vulnerabilities that are currently only shown in the rich diff of one pull request” by analyzing pull requests for dependency changes and then comparing them with the GitHub Advisory Database for existing vulnerabilities in these dependencies. The new action is on the GitHub Marketplace, though, buyer beware, this is all in public beta, so the new API endpoint is still a bit of a moving target.
  • Rust publishes the 2024 roadmap: Just as he did earlier this year for the Rust compiler ambitions for 2022the Rust team released this week their Rust Lang Roadmap for 2024which serves as a snapshot living roadmap and summary of what the team is working on for Rust 2024. The common theme of the roadmap, they write, is “to empower everyone to build reliable and efficient software” under three core themes. First, they plan to flatten the (learning) curve, making Rust easier to learn and more accessible. Following, help Rust users help each other by making life easier for authors in libraries and their users. To finish, help the Rust project itself evolve, developing processes tailored to the needs and use cases of a growing number of users. This summary is hardly that, however. The blog post details the vision behind each of these three areas, the plan to achieve them, and the ways in which you, the Rust community, can to be involved to make it a reality, so if you’re interested, go ahead and read it.

The New Stack is a wholly owned subsidiary of Insight Partners, an investor in the following companies mentioned in this article: Docker.

Comments are closed.