bytecodealliance / lucet

Lucet, the Sandboxing WebAssembly Compiler.
Apache License 2.0
4.06k stars 165 forks source link

Difference between Lucet and other standalone Wasm runtimes like WAVM or Wasmer #587

Closed yagehu closed 4 years ago

yagehu commented 4 years ago

Newbie question. Please redirect if not the right place.

I'm wondering what's the difference between Lucet and other standalone Wasm runtimes like WAVM or Wasmer. On a superficial level, it seems that Lucet breaks the process of running a .wasm file into 2 separate commands: lucetc-wasi for compiling to native binary and lucet-wasi for running it while runtimes like WAVM or Wasmer provides a single command to load and run a .wasm file. What other differences are there? I know that WAVM uses LLVM and Wasmer can optionally use cranelift.

cratelyn commented 4 years ago

Hello! I think here's a perfectly fine place.

I would start by saying that using a standalone runtime like wasmtime, or one of the others you mentioned above, is probably the right choice for most use-cases. As you also noticed, Lucet makes use of Cranelift for code generation.

Lucet is designed with certain performance constraints in mind, for running WebAssembly binaries outside of the browser at scale. You can read more about this in a blog post written by @pchickey here. Over time, these features will likely be ported to Wasmtime.

Pat may have more to say about this, but I would recommend using Wasmtime outside of specific advanced use-cases. I hope that helps! :sparkles: