memfd: Some minor follow-ups (#3759)
* Tweak memfd-related features crates This commit changes the `memfd` feature for the `wasmtime-cli` crate from an always-on feature to a default-on feature which can be disabled at compile time. Additionally the `pooling-allocator` feature is also given similar treatment. Additionally some documentation was added for the `memfd` feature on the `wasmtime` crate. * Don't store `Arc<T>` in `InstanceAllocationRequest` Instead store `&Arc<T>` to avoid having the clone that lives in `InstanceAllocationRequest` not actually going anywhere. Otherwise all instance allocation requires an extra clone to create it for the request and an extra decrement when the request goes away. Internally clones are made as necessary when creating instances. * Enable the pooling allocator by default for `wasmtime-cli` While perhaps not the most useful option since the CLI doesn't have a great way to take advantage of this it probably makes sense to at least match the features of `wasmtime` itself. * Fix some lints and issues * More compile fixes
This commit is contained in:
@@ -579,7 +579,7 @@ mod test {
|
||||
handles.push(
|
||||
instances
|
||||
.allocate(InstanceAllocationRequest {
|
||||
module: module.clone(),
|
||||
module: &module,
|
||||
memfds: None,
|
||||
unique_id: None,
|
||||
image_base: 0,
|
||||
|
||||
Reference in New Issue
Block a user