Any examples of emscripten modules with cloudflareworkers

I was trying to get cld3-asm to work with Cloudflare workers. However I get error “Error: environment detection error”. I think this is because Cloudflare workers don’t implement “importScripts”

Is there any examples how to use emscripten with Cloudflare workers? The rust wasm example is quite different.

I also have example repo of what I did. Just run:

  • npm install
  • npm run dev-build
  • npm run dev-server (in another terminal)
  • with postman or curl query localhost:3000
  • produces 500 error and in the dev-build terminal shows “Error: environment detection error”

Hey @hixus! Emscripten is something we’d really like to support, but we’re not quite there yet - keep an eye out on Wrangler! Any support for it will land there :+1:

1 Like