cranelift-jit-demo icon indicating copy to clipboard operation
cranelift-jit-demo copied to clipboard

using cranelift-simplejit inside a "rust compiled to wasm" application

Open zeroexcuses opened this issue 5 years ago • 1 comments

Hi,

I am writing an in browser application via Rust compiled to wasm. In this in-browser application, I would like to be able to dynamically generate code and call it. Is it possible to do this via cranelift-simplejit ? [I am having problem building it for the wasm32-unknown-unknown target.]

Thanks!

zeroexcuses avatar May 16 '20 15:05 zeroexcuses

The only way to do this would be to generate javascript or WASM. Using cranelift-simplejit won't work, as it generates native x86/AArch64 instructions.

bjorn3 avatar May 16 '20 16:05 bjorn3