Skip to content

wasm compilation #108

Answered by martinjrobins
dpastoor asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @dpastoor, yes I have come across this error when I tried to compile to wasm. The region-2.2.0 crate is brought in by cranelift_jit, which doesn't currently seem to support compilation to a wasm target.

Cranelift is one of two backends that you can use with diffsl, the other being based on LLVM. Cranelift I've not had success compiling to wasm, there is an 3 year old issue about this on their repo bytecodealliance/wasmtime#2566. LLVM (and Enzyme) I can compile to wasm outside a rust build system using emscripten and CMake, but I've not been able to integrate this into a cargo build in such a way that I could link diffsl to it.

I would like to provide an easy way to compile diffsol to w…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by martinjrobins
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #107 on November 29, 2024 14:05.