rust-wasm-on-lambda-edge
resvg-js
rust-wasm-on-lambda-edge | resvg-js | |
---|---|---|
2 | 3 | |
24 | 1,421 | |
- | - | |
9.2 | 8.3 | |
7 days ago | 7 days ago | |
Rust | TypeScript | |
Apache License 2.0 | Mozilla Public 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.
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.
resvg-js
-
Dynamic OG image with SvelteKit and Satori
Note: SVG are not suppose to be served for OG Images (we use png format in OG Images) where we use SVG to PNG coverter Resvg.
-
Vercel OG Image Generation: Fast, dynamic social card images at the Edge
There are already a lot of choices to convert SVGs to PNGs, what Vercel uses is https://github.com/yisibl/resvg-js. And Sharp is another good option.
- resvg-js 2.0: A High-Performance SVG Renderer and Toolkit
What are some alternatives?
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.
nodejs-snowflake - Generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)
serde-wasm-bindgen - Native integration of Serde with wasm-bindgen
vtracer - Raster to Vector Graphics Converter
coldsnap - A command line interface for Amazon EBS snapshots
satori - Enlightened library to convert HTML and CSS to SVG
aws-lambda-events - Rust event types for AWS Lambda
sveltekit-og - Generate Open Graph Images dynamically from HTML/CSS without a browser in SvelteKit
wasm-bindgen - Facilitating high-level interactions between Wasm modules and JavaScript
wasm-learning - Building Rust functions for Node.js to take advantage of Rust's performance, WebAssembly's security and portability, and JavaScript's ease-of-use. Demo code and recipes.
rs2ts - Rust structs and enums to TypeScript interfaces and enums
ogimage