workers-rs VS workers-wasi

Compare workers-rs vs workers-wasi and see what are their differences.

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
workers-rs workers-wasi
16 5
2,273 119
6.3% 1.7%
9.0 0.0
5 days ago about 1 year ago
Rust C++
Apache License 2.0 BSD 3-clause "New" or "Revised" License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.

workers-rs

Posts with mentions or reviews of workers-rs. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-02.
  • Python Cloudflare Workers
    4 projects | news.ycombinator.com | 2 Apr 2024
    - The speed of the Python interpreter running in WebAssembly

    Today, Python cold starts are slower than cold starts for a JavaScript Worker of equivalent size. A basic "Hello World" Worker written in JavaScript has a near zero cold start time, while a Python Worker has a cold start under 1 second.

    That's because we still need to load Pyodide into your Worker on-demand when a request comes in. The blog post describes what we're working on to reduce this — making Pyodide already available upfront.

    Once a Python Worker has gone through a cold start though, the differences are more on the margins — maybe a handful milliseconds, depending on what happens during the request.

    - There is a slight cost (think — microseconds not milliseconds) to crossing the "bridge" between JavaScript and WebAssembly — for example, by performing I/O or async operations. This difference tends to be minimal — generally something measured in microseconds not milliseconds. People with performance sensitive Workers already write them in Rust https://github.com/cloudflare/workers-rs, which also relies on bridging between JavaScript and WebAssembly.

    - The Python interpreter that Pyodide provides, that runs in WebAssembly, isn't as fast as the years and years of optimization that have gone into making JavaScript fast in V8. But it's still relatively early days for Pyodide, compared to the JS engine in V8 — there are parts of its code where we think there are big perf gains to be had. We're looking forward to upstreaming performance improvements, and there are WebAssembly proposals that help here too.

  • Cloudflare Workers Introduces Connect() API to Create TCP Sockets
    3 projects | news.ycombinator.com | 29 May 2023
    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?
    2 projects | /r/rust | 15 Jan 2023
    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
    3 projects | /r/rust | 9 Dec 2022
    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 …
    9 projects | dev.to | 4 Dec 2022
    GitHub - cloudflare/workers-rs: Write Cloudflare Workers in 100% Rust via WebAssembly
  • Turbopack - The successor to Webpack
    2 projects | /r/programming | 26 Oct 2022
    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
    3 projects | /r/rust | 8 Jul 2022
    There's actually a rust framework for Workers https://github.com/cloudflare/workers-rs
  • What's your experience with FaaS and Rust?
    6 projects | /r/rust | 29 Jun 2022
    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)!
    13 projects | /r/rust | 20 Jun 2022
    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?
    8 projects | /r/rust | 29 May 2022
    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.

workers-wasi

Posts with mentions or reviews of workers-wasi. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-11-15.
  • WASM by Example
    16 projects | news.ycombinator.com | 15 Nov 2023
    The examples seemed clear enough to read (I did not test them), but I felt than even when teaching by example there needs to be more overview and explanation. I.e., I would prefer an overview of WASM structure and use with examples, rather than just the examples. (I have some (but limited) experience using WASM.)

    As for the utility of wasm, note also that Cloudflare workers can run WASM on edge servers [1], and that the Swift community has some support for compiling to wasm [2].

    I've never really understood how wasm could do better than java bytecode, but I've been impressed with how much people are using lua and BPF. More generally, in a world of federated programming, we need languages client can submit that providers can run safely, without obviously leaking any secret sauce -- perhaps e.g., for model refinement or augmented lookup.

    [1] https://github.com/cloudflare/workers-wasi

  • SQLite builds for WASI since 3.41.0
    5 projects | news.ycombinator.com | 24 May 2023
    Those are great questions! I believe Emscripten will be required for some cases as it provides more features for targeting a Web Browser. If WASI is the only requirement for a Wasm module, then there are three possible solutions:

    - Use a library that provides the WASI bindings in a browser environments: there are some OSS projects that provides WASI bindings on top of browser technologies. For example, workers-wasi from Cloudflare [1]. It could be even another Wasm module that provides the implementation for the main one. I know the people from Loophole Labs are experimenting with virtual filesystems (VFS) [2].

    - Browsers provides a WASI implementation: server-oriented runtimes like NodeJS are already providing these bindings (under a experimental flag). I shouldn't have stated that as a fact, as browsers may provide it or not. However, I saw in the past the Google Chrome team experimenting with WASI and the browser FileSystem API [3]. So, I think it may happen :)

    - [1] https://github.com/cloudflare/workers-wasi

    - [2] https://www.youtube.com/watch?v=46jZSXVxYPw

    - [3] https://github.com/GoogleChromeLabs/wasi-fs-access

  • The Tug-of-War over Server-Side WebAssembly
    12 projects | news.ycombinator.com | 24 Mar 2023
    Indeed, some people are doing this:

    - WASI once had an official polyfill https://wasi.dev/polyfill/, now apparently succeeded by https://github.com/bjorn3/browser_wasi_shim

    - wasmer-js provides a JS polyfill for WASI https://docs.wasmer.io/integrations/js/wasi

    - Cloudflare has a WIP polyfill https://github.com/cloudflare/workers-wasi

    I'm generally leery of non-temporary polyfills, so I'm not sure that any of these feel like a long-term viable option for me.

  • Rust advocacy at a medium-sized startup
    2 projects | news.ycombinator.com | 19 Jun 2022
    I think modern C++ could be perfectly viable as well. Maybe https://github.com/cloudflare/workers-wasi would be a good starting point? I'm not too knowledgeable on the subject. Exciting times though, I think WASM might be the great equalizer.
  • Store SQLite in Cloudflare Durable Objects
    14 projects | dev.to | 26 Jan 2022
    While there is a WASI implementation for Workers: cloudflare/workers-wasi, I prefer to implement each import manually - especially when there are so few and especially while I am still experimenting. This helps me to keep the full picture of what's going on.

What are some alternatives?

When comparing workers-rs and workers-wasi you can also consider the following projects:

realworld-axum-sqlx - A Rust implementation of the Realworld demo app spec using Axum and SQLx.

asyncify - Standalone Asyncify helper for Binaryen

worker-kv - Rust bindings to Cloudflare Worker KV Stores

binaryen - Optimizer and compiler/toolchain library for WebAssembly

boringtun - Userspace WireGuard® Implementation in Rust

wasm-sqlite - [Experimental] SQLite compiled to WASM with pluggable page storage.

litestream - Streaming replication for SQLite.

do-sqlite - [Experimental] Persist SQLite in a Cloudflare Durable Object

ssr-workers - Rust based Cloudflare Worker with SSR

wasi-libc - WASI libc implementation for WebAssembly

lilredirector - 🔌⚡️ Redirector engine built for Cloudflare Workers

sqlite-vfs - Build SQLite virtual file systems (VFS) by implementing a simple Rust trait.