what s the correct way to consume wasm

what's the correct way to consume wasm for workers? i've been trying the example at https://blog.cloudflare.com/announcing-wasi-on-workers/ with wrangler but it's not happy with import demoWasm from "./demo.wasm"; kind of import (ts complains about a missing loader)
2 Replies
bebraw
bebraw2y ago
interestingly enough the example at https://github.com/cloudflare/workers-wasi doesn't use wrangler
bebraw
bebraw2y ago
it looks like some precompilation is needed so i'll adapt from https://github.com/ssssota/svg2png-worker
GitHub
GitHub - ssssota/svg2png-worker: svg2png-wasm demo with Cloudflare ...
svg2png-wasm demo with Cloudflare Workers. Contribute to ssssota/svg2png-worker development by creating an account on GitHub.