serde-wasm-bindgen
rust-wasm-on-lambda-edge
serde-wasm-bindgen | rust-wasm-on-lambda-edge | |
---|---|---|
1 | 2 | |
534 | 24 | |
1.1% | - | |
7.3 | 9.2 | |
2 months ago | 2 days ago | |
Rust | Rust | |
MIT License | 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.
serde-wasm-bindgen
-
Rust/Wasm on AWS Lambda@Edge
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.
rust-wasm-on-lambda-edge
-
WASM/JS- which toolchain/libraries to use?
AWS Lambda@Edge is much, much more convoluted because IIRC you can only run node and python there. In other words, you have to use some glue to make it work.
-
Rust/Wasm on AWS Lambda@Edge
I adopted a rollup based approach, since it's quite easy to get configured and also something we use at work. I always found webpack a little bit too cumbersome, and parcel is just yet another new kid on the block. I'm pretty sure you can adjust the project to your needs. All we need here is: compile TS to JS and bundle up everything into a single JS file. In the past I found the WebAssembly dependency management very tricky, in the end I used a plain "move the .wasm file into the final bundle" approach, which just works fine, because I did not want to inline the WebAssembly code (as most plugins try). Maybe you have a smarter solution for that, please open a pull-request in the repo. Just keep in mind: wasm-bindgen creates already a pretty decent module loader, so there is no need to work around that, but I fail to get any of these bundlers to move the wasm files along with it into the bundle output directory.
What are some alternatives?
wasm-bindgen - Facilitating high-level interactions between Wasm modules and JavaScript
webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
wasm-pack - 📦✨ your favorite rust -> wasm workflow tool!
coldsnap - A command line interface for Amazon EBS snapshots
astro - A fun safe language for rapid prototyping and high performance applications
aws-lambda-events - Rust event types for AWS Lambda
TypeScript-Website - The Website and web infrastructure for learning TypeScript
resvg-js - A high-performance SVG renderer and toolkit, powered by Rust based resvg and napi-rs.
dlhn - DLHN implementation for Rust
rs2ts - Rust structs and enums to TypeScript interfaces and enums