Hacker News new | ask | show | jobs
by jahewson 568 days ago
Skia ships with a WASM build that supports node, called CanvasKit [1], whereas this module is Rust bindings? I’d be keen to know what the pros and cons of each approach are.

1. https://www.npmjs.com/package/canvaskit-wasm

1 comments

Note that it's not so much "rust bindings" as a pre-compiled node binary (that happens to be generated off of a mixed Rust/C++ codebase). So that's really the main difference: WASM needs a separate runtime, whereas a node binary doesn't.
> WASM needs a separate runtime, whereas a node binary doesn't.

FWIW, node ships with a WASM runtime. See https://nodejs.org/en/learn/getting-started/nodejs-with-weba...

The more accurate way to say that is: V8 is also a WASM runtime.