Stream: git-wasmtime

Topic: wasmtime / PR #3206 Add a cranelift compile-time feature ...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2021 at 19:37):

alexcrichton opened PR #3206 from refactor-compiler to main:

This commit concludes the saga of refactoring Wasmtime and making
Cranelift an optional dependency by adding a new Cargo feature to the
wasmtime crate called cranelift, which is enabled by default.

This feature is implemented by having a new cfg for wasmtime itself,
cfg(compiler), which is used wherever compilation is necessary. This
bubbles up to disable APIs such as Module::new, Func::new,
Engine::precompile_module, and a number of Config methods affecting
compiler configuration. Checks are added to CI that when built in this
mode Wasmtime continues to successfully build. It's hoped that although
this is effectively "sprinkle #[cfg] until things compile" this won't
be too too bad to maintain over time since it's also an use case we're
interested in supporting.

With cranelift disabled the only way to create a Module is with the
Module::deserialize method, which requires some form of precompiled
artifact.

Two consequences of this change are:

Documentation should be updated to indicate that cranelift can be
disabled, although it's not really the most prominent documentation
because this is expected to be a somewhat niche use case (albeit
important, just not too common).

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2021 at 19:37):

alexcrichton requested pchickey for a review on PR #3206.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2021 at 19:45):

alexcrichton updated PR #3206 from refactor-compiler to main.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2021 at 19:45):

alexcrichton updated PR #3206 from refactor-compiler to main.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2021 at 19:46):

bjorn3 created PR review comment:

cranelift is enabled by default so this is equivalent to not passin --feature

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2021 at 19:46):

bjorn3 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2021 at 19:46):

bjorn3 edited PR review comment.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2021 at 21:11):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2021 at 21:15):

alexcrichton updated PR #3206 from refactor-compiler to main.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 18 2021 at 21:47):

alexcrichton merged PR #3206.


Last updated: Oct 23 2024 at 20:03 UTC