WebAssembly’s Promise Heads to Ruby – The New Stack

While Ruby didn’t exactly top the list of most searched languages ​​in the State of WebAssembly 2021 survey (that honor went to Rust, closely followed by Go and C++), that’s nonetheless precisely what happened. happened this week.

Well, more specifically, the first preview of Ruby 3.2.0 provides WebAssembly support based on the WebAssembly System Interface (WASI), which “allows a CRuby binary to be available on the web browser, environment Serverless Edge 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 published last month by Ruby committer Yuta Saito provided an 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 want to give it a try, read this quickstart guide and get started.

This week in programming

  • Lambda gets built-in HTTPS endpoints: While it was technically possible to create an API endpoint for an AWS Lambda function using Amazon API Gateway, the task just got a whole lot easier with the new Lambda function URLs from AWS. Now, without having to learn or use other services, AWS Lambda users can add HTTPS endpoints to any Lambda function and, if desired, configure CORS (Cross -Origin Resource Sharing), which allow you to specify “origins (domain, scheme, or port) other than its own from which a browser should allow resources to be loaded”. The goal of this new feature is to make it quick and easy to get an endpoint up and running, but if you need advanced features, like validation or throttling, Amazon API Gateway might be a better fit. 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 or not to use them, and how much they might cost (the cost is included in Lambda’s request and duration pricing), go and take a look look at the blog.
  • Meta continues its F8 break: Despite the seemingly ubiquitous return of conferences lately, it looks like Meta has decided to continue its hiatus from F8 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 geared towards the next chapter of the internet, and the next chapter of our business too: 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 when its “Connect” event.
  • What’s next for GitLab’s acquisition of OpsTrace? In a blog post this week about observability being key to cloud-native transitions, it seems the trail has been buried a bit. While the general discussion was fine, GitLab also linked to a recent blog post from OpsTrace, a company 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. That’s why GitHub has added a new action to prevent known vulnerabilities from being introduced into your code. The new dependency review action introduced this week “automates finding and blocking vulnerabilities that are currently only shown in the rich diff of a pull request” by scanning pull requests for dependency changes , then comparing them with the GitHub advisory database for existing vulnerabilities in those 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 it did earlier this year for the Rust compiler’s 2022 ambitions, the Rust team released its Rust Lang 2024 roadmap this week, which serves as a snapshot of the 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. Then help Rust users help each other by making life easier for library authors and their users. Finally, help the Rust project itself evolve, by 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 get 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.

Source link

Steven L. Nielsen