Next.js Discord

Discord Forum

WASM @vercel/satori

Answered
Transvaal lion posted this in #help-forum
Open in Discord
Transvaal lionOP
I see there is a wasm.js, however i'm trying to find the actual wasm file i can use in my project
Answered by joulev
yeah no i dont think using satori is possible without a javascript runtime
View full answer

8 Replies

@Transvaal lion I see there is a wasm.js, however i'm trying to find the actual wasm file i can use in my project
why do you need a wasm?

in the server you can just use satori directly

in the browser you can just convert any page element to a canvas and get the png of that canvas
Transvaal lionOP
I have a codebase in another language, just need to html to svg functionality
oh ic yeah that's a fair use case
yeah no i dont think using satori is possible without a javascript runtime
Answer
the wasm is yoga wasm, which is then used to init satori in a js runtime
there is no standalone build satori.wasm
Transvaal lionOP
that sucks, the satori/wasm was quite misleading then if it isn't actually wasm
satori/wasm is just a js file to load satori upon a yoga.wasm