binaryen
workers-rs
Our great sponsors
binaryen | workers-rs | |
---|---|---|
14 | 15 | |
7,038 | 2,189 | |
1.4% | 5.0% | |
9.8 | 8.5 | |
7 days ago | 6 days ago | |
WebAssembly | Rust | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
binaryen
-
Bring garbage collected programming languages efficiently to WebAssembly
Interesting article, thanks!
Notes on the issues mentioned there:
* The need for a manual shadow stack: This is fixed in WasmGC (in the same way it works in JS, as the link mentions).
* Lack of try-catch: This is fixed by the Wasm exception handling proposal, which has already shipped in browsers, https://github.com/WebAssembly/exception-handling/blob/main/...
* Null checks: Mostly fixed by WasmGC. The spec defines non-nullable local types, and VMs can use the techniques the article mentions to optimize them using signals (Wizard does, for example).
* Class initialization: This is a difficult problem, as the article says. J2Wasm and Binaryen are working to optimize it through static analysis at the toolchain level. Here is a recent PR I wrote that makes progress there: https://github.com/WebAssembly/binaryen/pull/6061
* The vtable overhead issue the article mentions may be a problem. I'm not aware of good measurements on it, through. There are some ideas on post-MVP solutions for method dispatch that might help, but nothing concrete yet.
* Checks for null and trapping: There has been discussion of variants on the GC instructions that throw instead of trap. Measurements, however, have not shown it to be a big problem atm, so it is low priority.
The author is right that stack walking, signals, and memory control are important areas that could help here.
Overall with WasmGC and exceptions we are in a pretty good place for Java as emitted by J2Wasm today: it is usually faster than J2CL which compiles Java to JavaScript. But there is definitely room for improvement.
The Binaryen wasm optimizer (mentioned in the article) is always open for contributions,
-
Random Testing of WebAssembly Implementations Using Semantically Valid Programs
The end of the related work section cites both wasm-smith and the Binaryen fuzzer (https://github.com/WebAssembly/binaryen/wiki/Fuzzing) and says, "They both provide a fuzzer that turns a stream of bytes into a WebAssembly module in order to test implementations. Their fuzzers always generate semantically valid test cases, but lack the targeting and tuning that Xsmith provides."
I look forward to reading more about how they do the targeting and tuning.
-
Web assembly book?
Binaryen or the LLVM of wasm: https://github.com/WebAssembly/binaryen
-
What's the best way to generate WASM programmatically?
Probably https://github.com/WebAssembly/binaryen/, there were various rust bindings to it.
-
Build a WebAssembly Language for Fun and Profit: Code Generation
The final phase of our compiler is code generation. This phase takes the AST and converts it to a set of executable instructions. In our case, WebAssembly. To accomplish this, we are going to use a popular WebAssembly compiler toolchain called binaryen.
-
Build a WebAssembly Language for Fun and Profit: Lexing
In this guide, we will be using TypeScript and NodeJS. The concepts are highly portable, so feel free to use the environment you're most comfortable with. Our only major dependency, binaryen, has a simple C API. You are welcome to skip ahead to the next section if you're using a different language.
-
Rust and WebAssembly without a Bundler
What are the size and performance benefits of processing the Wasm payload with wasm-opt?
-
Is WebAssembly Text (WAT) Just Another IR?
I would recommend looking into binaryen as it has it's own IR and can perform optimizations over it. It's also simpler than LLVM and has the option to produce binaries with debug names.
-
What are the advantages or disadvantages of compiling to VM Bytecode vs native machine code?
You can also use binaryen to optimize your wasm output
workers-rs
-
Cloudflare Workers Introduces Connect() API to Create TCP Sockets
Not yet, but we're working on that https://github.com/cloudflare/workers-rs/pull/324
-
How much Rust work is actually going on at Cloudflare?
I'm also in the Workers org but I have had a bit of interaction with Rust. There's some Rust in the Workers runtime using lol-html for HTMLRewriter as well as some tooling and there's the full blown workers-rs framework that I work on, but that's about it for the Rust I work on regularly.
-
std.rs is seeking a new owner
I'm an engineer at Cloudflare working on Workers (and a maintainer of workers-rs) and I'd love to help whoever ends up maintaining this get that PR rewriting it in Rust across the line.
-
Workerd : le moteur d’exécution JavaScript / Wasm qui alimente les Workers de Cloudflare …
GitHub - cloudflare/workers-rs: Write Cloudflare Workers in 100% Rust via WebAssembly
-
Turbopack - The successor to Webpack
I never said it was, but thankfully nowadays there are plenty of other tools that are fast enough to keep the dev cycle quick. Personally esbuild is my go-to when I need a bundler but I've grown really fond of SWC native api, we used to use it at work for our wasm build tool for our workers-rs framework.
-
Announcing support for WASI on Cloudflare Workers
There's actually a rust framework for Workers https://github.com/cloudflare/workers-rs
-
What's your experience with FaaS and Rust?
I'm a maintainer of the of the Cloudflare workers-rs project to allow you to write serverless functions in Rust running as WASM in our V8-based runtime. There's certainly some rough spots (doesn't have complete parity with our default JS runtime apis), but if you're concerned with cold start times and you don't need a full containerized environment I think it's a solid choice.
-
Hey Rustaceans! Got a question? Ask here! (25/2022)!
I've been looking at cloudflare workers as a way to write and deploy "cloud functions" written in Rust. Has anyone used that or another similar service?
Most likely, it should, we just haven't had the time to fully implement it or add a library to wrap the FFI. Please let us know you need a feature by opening an issue.
-
Warp or Rocket.rs or Actix Web?
I may be biased, as the original project author, but I’d recommend using Cloudflare Workers https://github.com/cloudflare/workers-rs - totally free their with very generous limits.
What are some alternatives?
realworld-axum-sqlx - A Rust implementation of the Realworld demo app spec using Axum and SQLx.
wasm-bindgen - Facilitating high-level interactions between Wasm modules and JavaScript
worker-kv - Rust bindings to Cloudflare Worker KV Stores
wasi-sdk - WASI-enabled WebAssembly C/C++ toolchain
boringtun - Userspace WireGuard® Implementation in Rust
wasi-libc - WASI libc implementation for WebAssembly
litestream - Streaming replication for SQLite.
workers-wasi
ssr-workers - Rust based Cloudflare Worker with SSR
asyncify - Standalone Asyncify helper for Binaryen
lilredirector - 🔌⚡️ Redirector engine built for Cloudflare Workers
EasyOCR - Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.