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
parent
commit
47af01f127
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      .github/workflows/main.yml
  2. 1
      crates/cli-flags/Cargo.toml
  3. 6
      crates/cli-flags/src/lib.rs

2
.github/workflows/main.yml

@ -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

1
crates/cli-flags/Cargo.toml

@ -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"]

6
crates/cli-flags/src/lib.rs

@ -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);

Loading…
Cancel
Save