-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a CodeBuilder
type to the wasmtime
crate
#8181
Add a CodeBuilder
type to the wasmtime
crate
#8181
Conversation
This commit is extracted from bytecodealliance#8055 and adds a new `ModuleBuilder` type which is intended to be able to further configure compilation beyond what the constructors of `Module` already provide. For example in bytecodealliance#8055 knobs will be added to process `*.dwp` files for more debuginfo processing. Co-authored-by: yowl00 <scott.waye@hubse.com>
I'll note that while I've called this |
Subscribe to Label Actioncc @peterhuene
This issue or pull request has been labeled: "wasmtime:api"
Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
As far as naming goes, the only alternatives I can think of are
ModuleOrComponentBuilder
CodeBuilder
Or maybe splitting this type in two in the public API (and sharing an underlying impl) so that we have both a ModuleBuilder
and a ComponentBuilder
.
/// WebAssembly module. Less advanced configuration can use constructors such | ||
/// as: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// WebAssembly module. Less advanced configuration can use constructors such | |
/// as: | |
/// WebAssembly module. Most configuration can use simple constructors such | |
/// as: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Don't want to create a weird "advanced" vs not thing where people who consider themselves Serious Wasmtime Users will want to use this without actually having a good reason. Might be overthinking things here.)
It feels kind of nice being able to configure components/modules in one builder since it's all wasm anyway so I think I'll stick with one for now vs copying APIs, but I'll rename to |
ModuleBuilder
type to the wasmtime
crateCodeBuilder
type to the wasmtime
crate
This commit fixes a mistake in bytecodealliance#8181 which meant that the caching for components was no longer working. The mistake is fixed in this commit as well as a new test being added too.
This commit fixes a mistake in #8181 which meant that the caching for components was no longer working. The mistake is fixed in this commit as well as a new test being added too.
This commit is extracted from #8055 and adds a new
CodeBuilder
type which is intended to be able to further configure compilation beyond what the constructors ofModule
already provide. For example in #8055 knobs will be added to process*.dwp
files for more debuginfo processing.