-
Notifications
You must be signed in to change notification settings - Fork 47
fix: allow usage of Go WASI policies built by go 1.26 #1683
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,30 +66,29 @@ wasmtime = { workspace = true, default-features = true } | |
| # Workaround for https://github.com/bytecodealliance/wasmtime/issues/12217 | ||
| [target.'cfg(all(target_os = "macos", target_arch = "x86_64"))'.dependencies] | ||
| wasmtime = { workspace = true, features = [ | ||
| "addr2line", | ||
| "async", | ||
| "cache", | ||
| "compile-time-builtins", | ||
| "component-model", | ||
| "component-model-async", | ||
| "coredump", | ||
| "cranelift", | ||
| "debug", | ||
| "debug-builtins", | ||
| "demangle", | ||
| "gc", | ||
| "gc-drc", | ||
| "gc-null", | ||
| "once_cell", | ||
| "parallel-compilation", | ||
| "pooling-allocator", | ||
| "profiling", | ||
| "runtime", | ||
| "std", | ||
| "threads", | ||
| "wasmtime-jit-debug", | ||
| "wasmtime-jit-icache-coherence", | ||
| "wat", | ||
| 'addr2line', | ||
| 'anyhow', | ||
| 'async', | ||
| 'backtrace', | ||
| 'cache', | ||
| 'compile-time-builtins', | ||
| 'component-model', | ||
| 'component-model-async', | ||
| 'coredump', | ||
| 'cranelift', | ||
| 'debug', | ||
| 'debug-builtins', | ||
| 'demangle', | ||
| 'gc', | ||
| 'gc-drc', | ||
| 'gc-null', | ||
| 'parallel-compilation', | ||
| 'pooling-allocator', | ||
| 'profiling', | ||
| 'runtime', | ||
| 'std', | ||
| 'threads', | ||
| 'wat', | ||
| ] } | ||
|
Comment on lines
68
to
92
|
||
|
|
||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -205,6 +205,8 @@ impl PolicyEvaluatorBuilder { | |
| if self.epoch_deadlines.is_some() { | ||
| wasmtime_config.epoch_interruption(true); | ||
| } | ||
| // required by policies built by the official go compiler >= 1.26.0 | ||
| wasmtime_config.wasm_function_references(true); | ||
|
|
||
|
Comment on lines
+208
to
210
|
||
| wasmtime::Engine::new(&wasmtime_config) | ||
| }, | ||
|
|
||
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.
For consistency with the rest of the repo's Cargo.toml files (and to minimize churn with TOML formatters), consider using double-quoted strings for the
wasmtimefeature names here instead of single-quoted literal strings.