Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques such as online, hashing, allreduce, reductions, learning2search, active, and interactive learning.
I'm looking to deploy VW WASM (via the JS bindings) in a Cloudflare Worker. There were a number of issues with the JS wrapper that prevented developing locally via Miniflare, but that's a separate issue. I was finally able to get something going locally by using Cloudflare's Vitest worker pool which runs the worker via workerd which is how it would be run in production -- however I get the following error:
failed to asynchronously prepare wasm: CompileError: WebAssembly.instantiate(): Wasm code generation disallowed by embedder
Aborted(CompileError: WebAssembly.instantiate(): Wasm code generation disallowed by embedder)
RuntimeError: Aborted(CompileError: WebAssembly.instantiate(): Wasm code generation disallowed by embedder). Build with -sASSERTIONS for more info.
at abort (Users/developer/project/node_modules/.pnpm/@vowpalwabbit+vowpalwabbit@0.0.8/node_modules/@vowpalwabbit/vowpalwabbit/dist/vw-wasm.js?mf_vitest_no_cjs_esm_shim:9:5434)
at Users/developer/project/node_modules/.pnpm/@vowpalwabbit+vowpalwabbit@0.0.8/node_modules/@vowpalwabbit/vowpalwabbit/dist/vw-wasm.js?mf_vitest_no_cjs_esm_shim:9:4274190
Description
I'm looking to deploy VW WASM (via the JS bindings) in a Cloudflare Worker. There were a number of issues with the JS wrapper that prevented developing locally via Miniflare, but that's a separate issue. I was finally able to get something going locally by using Cloudflare's Vitest worker pool which runs the worker via
workerd
which is how it would be run in production -- however I get the following error:My assumption is this is due to Cloudflare disallowing WASM code generation
How to unblock?
Does VowpalWabbit publish the built WASM module anywhere? Or any insight on the above error and how I could work around it? Many thanks in advance!