Browse Source
Fix build of `wasmtime-cli` with only the pooling allocator enabled (#8891)
Fixes #8889
pull/8896/head
Nick Fitzgerald
4 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
7 additions and
2 deletions
-
.github/workflows/main.yml
-
crates/cli-flags/Cargo.toml
-
crates/cli-flags/src/lib.rs
|
|
@ -369,8 +369,10 @@ jobs: |
|
|
|
- name: wasmtime-cli |
|
|
|
checks: | |
|
|
|
-p wasmtime-cli --no-default-features |
|
|
|
-p wasmtime-cli --no-default-features --features pooling-allocator |
|
|
|
-p wasmtime-cli --no-default-features --features run |
|
|
|
-p wasmtime-cli --no-default-features --features run,component-model |
|
|
|
-p wasmtime-cli --no-default-features --features run,pooling-allocator |
|
|
|
-p wasmtime-cli --no-default-features --features compile |
|
|
|
-p wasmtime-cli --no-default-features --features compile,cranelift |
|
|
|
-p wasmtime-cli --no-default-features --features compile,cranelift,component-model |
|
|
|
|
|
@ -21,6 +21,7 @@ wasmtime = { workspace = true, features = ["gc"] } |
|
|
|
humantime = { workspace = true } |
|
|
|
|
|
|
|
[features] |
|
|
|
async = ["wasmtime/async"] |
|
|
|
pooling-allocator = ["wasmtime/pooling-allocator"] |
|
|
|
component-model = ["wasmtime/component-model"] |
|
|
|
cache = ["wasmtime/cache"] |
|
|
|
|
|
@ -589,8 +589,10 @@ impl CommonOptions { |
|
|
|
if let Some(limit) = self.opts.pooling_total_tables { |
|
|
|
cfg.total_tables(limit); |
|
|
|
} |
|
|
|
if let Some(limit) = self.opts.pooling_total_stacks { |
|
|
|
cfg.total_stacks(limit); |
|
|
|
match_feature! { |
|
|
|
["async" : self.opts.pooling_total_stacks] |
|
|
|
limit => cfg.total_stacks(limit), |
|
|
|
_ => err, |
|
|
|
} |
|
|
|
if let Some(limit) = self.opts.pooling_max_memory_size { |
|
|
|
cfg.max_memory_size(limit); |
|
|
|