wasm-pack VS serde-wasm-bindgen

Compare wasm-pack vs serde-wasm-bindgen 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
wasm-pack serde-wasm-bindgen
38 1
5,923 531
2.0% 2.3%
7.0 7.3
3 days ago about 2 months ago
Rust Rust
Apache License 2.0 MIT 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.

wasm-pack

Posts with mentions or reviews of wasm-pack. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-07-18.
  • Rust + WASM + Typescript [+ React]
    7 projects | /r/rust | 18 Jul 2023
    For a much simpler but less flexible approach there's wasm-pack for creating JS packages from Rust, and wasm-bindgen for easy interop. Both have very good documentation.
  • Tower of Hanoi in P5.js + WASM
    5 projects | dev.to | 8 May 2023
    After four years, I found some time to pay that deb-tech (yes, quite a long time, eh). To make it fun I rewrote everything from scratch in SolidJS, which went smooth thanks to this amazing library p5js-wrapper. For WASM, C++ is still a good choice, but what about Rust? I did some research and found wasm-pack. A few lines in the cargo.toml file and we were ready to generate compiled + ready to import bytecode!
  • How to Use Rust Code in a JavaScript Worklet (Without wasm-pack)
    2 projects | dev.to | 28 Apr 2023
    Support using wasm-pack in Worklets (particularly AudioWorklet) #689
  • Hey Rustaceans! Got a question? Ask here (3/2023)!
    12 projects | /r/rust | 16 Jan 2023
    If you're looking to use it to interface with node/browsers, then try wasm-pack.
  • Rust WebAssembly (wasm) on Arch Linux with Webpack (Rust 1.66.0)
    6 projects | dev.to | 8 Jan 2023
    Webassembly: wasm-bindgen 0.2.83 / wasm-pack 0.10.3
  • Examples of Rust + SvelteKit + WASM
    2 projects | /r/rust | 6 Oct 2022
    wasm-pack has bugs - it publishes a module which declares itself as a commonjs module. (You can fix that by manually adding "type": "module" in package.json). Then the web build should work with other bundlers. I opened an issue about this over a year ago. There's a PR and everything, but no movement :/
  • Building a web application with Rust and WebAssembly
    4 projects | dev.to | 3 Oct 2022
    wasm-pack helps you build Rust-generated WebAssembly packages and use it in the browser or with Node.js.
  • A Look at Performance in Wasmtime and Cranelift
    9 projects | /r/rust | 6 Sep 2022
    Is the Rust WASM ecosystem being half dead better? wasm-pack and wasm-bindgen are barely maintained anymore, and trust me it's not because everything works flawlessly…
  • Ask HN: Should I learn Rust or Go?
    3 projects | news.ycombinator.com | 4 Jul 2022
    I've been learning Rust for the past few weeks and have been enjoying it a lot.

    - The community is very helpful on Discord (https://discord.com/invite/rust-lang-community).

    - The package ecosystem (crates.io) makes it very easy to find and import things, and they're consistently documented.

    - There's a path to compiling on web via WebAssembly (https://rustwasm.github.io/wasm-pack/)

    In a few weeks of learning the language, I managed to put together this visualization: https://twitter.com/admiralakk/status/1542560489091350529

    But realistically, either Go or Rust will be fine. You should pick the one you're more likely to stick with and learn, even when it gets tough. I've found the community aspect to be very helpful, because then at least I know I'm not the only idiot out there.

  • Integrating a Svelte app with Rust using WebAssembly
    4 projects | dev.to | 29 Jun 2022
    There are various ways to set up a web project that uses Svelte, Wasm, and Rust. For example, wasm-pack from the rust-wasm group provides a template for simple HTML-CSS-JS applications. There are also several project templates for React or Svelte with Rust and Wasm.

serde-wasm-bindgen

Posts with mentions or reviews of serde-wasm-bindgen. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-03-15.
  • Rust/Wasm on AWS Lambda@Edge
    8 projects | dev.to | 15 Mar 2021
    Some transformation overhead can be addressed by using serde-wasm-bindgen, but in my example repo I'll use it only for the input side (deserialization). On serialization a collection like HashMap or BTreeMap gets turned into an ES2015 Map, which is unfortunated as well, because they cannot be JSON stringified.

What are some alternatives?

When comparing wasm-pack and serde-wasm-bindgen you can also consider the following projects:

trunk - Build, bundle & ship your Rust WASM application to the web.

wasm-bindgen - Facilitating high-level interactions between Wasm modules and JavaScript

astro - A fun safe language for rapid prototyping and high performance applications

vite-plugin-rsw - 🦞 wasm-pack plugin for Vite

TypeScript-Website - The Website and web infrastructure for learning TypeScript

wasmtime - A fast and secure runtime for WebAssembly

dlhn - DLHN implementation for Rust

capacitor - Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️

rs2ts - Rust structs and enums to TypeScript interfaces and enums

cargo-generate - cargo, make me a project

rust-wasm-on-lambda-edge - Rust/WASM on AWS Lambda@Edge (CloudFront)