Skip to content
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

expose wasmtime_provider::WasmtimeEngineProviderPre #68

Merged
merged 2 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions crates/wapc-codec/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
clippy::missing_enforced_import_renames,
clippy::nonstandard_macro_braces,
clippy::rc_mutex,
clippy::unwrap_or_else_default,
clippy::unwrap_or_default,
clippy::manual_split_once,
clippy::derivable_impls,
clippy::needless_option_as_deref,
Expand All @@ -57,7 +57,9 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
renamed_and_removed_lints,
trivial_bounds,
trivial_casts,
trivial_numeric_casts,
Expand Down
6 changes: 4 additions & 2 deletions crates/wapc-guest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
clippy::missing_enforced_import_renames,
clippy::nonstandard_macro_braces,
clippy::rc_mutex,
clippy::unwrap_or_else_default,
clippy::unwrap_or_default,
clippy::manual_split_once,
clippy::derivable_impls,
clippy::needless_option_as_deref,
Expand All @@ -57,7 +57,9 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
renamed_and_removed_lints,
trivial_bounds,
trivial_casts,
trivial_numeric_casts,
Expand Down
6 changes: 4 additions & 2 deletions crates/wapc-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
clippy::missing_enforced_import_renames,
clippy::nonstandard_macro_braces,
clippy::rc_mutex,
clippy::unwrap_or_else_default,
clippy::unwrap_or_default,
clippy::manual_split_once,
clippy::derivable_impls,
clippy::needless_option_as_deref,
Expand All @@ -57,7 +57,9 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
renamed_and_removed_lints,
trivial_bounds,
trivial_casts,
trivial_numeric_casts,
Expand Down
6 changes: 4 additions & 2 deletions crates/wapc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
clippy::missing_enforced_import_renames,
clippy::nonstandard_macro_braces,
clippy::rc_mutex,
clippy::unwrap_or_else_default,
clippy::unwrap_or_default,
clippy::manual_split_once,
clippy::derivable_impls,
clippy::needless_option_as_deref,
Expand All @@ -57,7 +57,9 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
renamed_and_removed_lints,
trivial_bounds,
trivial_casts,
trivial_numeric_casts,
Expand Down
6 changes: 4 additions & 2 deletions crates/wasm3-provider/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
clippy::missing_enforced_import_renames,
clippy::nonstandard_macro_braces,
clippy::rc_mutex,
clippy::unwrap_or_else_default,
clippy::unwrap_or_default,
clippy::manual_split_once,
clippy::derivable_impls,
clippy::needless_option_as_deref,
Expand All @@ -57,7 +57,9 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
renamed_and_removed_lints,
trivial_bounds,
trivial_casts,
trivial_numeric_casts,
Expand Down
2 changes: 1 addition & 1 deletion crates/wasmtime-provider/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl<'a> WasmtimeEngineProviderBuilder<'a> {
/// Create a [`WasmtimeEngineProviderPre`] instance. This instance can then
/// be reused as many time as wanted to quickly instantiate a [`WasmtimeEngineProvider`]
/// by using the [`WasmtimeEngineProviderPre::rehydrate`] method.
pub(crate) fn build_pre(&self) -> Result<WasmtimeEngineProviderPre> {
pub fn build_pre(&self) -> Result<WasmtimeEngineProviderPre> {
if self.module_bytes.is_some() && self.module.is_some() {
return Err(Error::BuilderInvalidConfig(
"`module_bytes` and `module` cannot be provided at the same time".to_owned(),
Expand Down
10 changes: 6 additions & 4 deletions crates/wasmtime-provider/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
clippy::missing_enforced_import_renames,
clippy::nonstandard_macro_braces,
clippy::rc_mutex,
clippy::unwrap_or_else_default,
clippy::unwrap_or_default,
clippy::manual_split_once,
clippy::derivable_impls,
clippy::needless_option_as_deref,
Expand All @@ -57,7 +57,9 @@
overflowing_literals,
path_statements,
patterns_in_fns_without_body,
private_in_public,
private_interfaces,
private_bounds,
renamed_and_removed_lints,
trivial_bounds,
trivial_casts,
trivial_numeric_casts,
Expand Down Expand Up @@ -156,7 +158,7 @@ struct EpochDeadlines {
/// Can be used to quickly create a new instance of WasmtimeEngineProvider
#[allow(missing_debug_implementations)]
#[derive(Clone)]
pub(crate) struct WasmtimeEngineProviderPre {
pub struct WasmtimeEngineProviderPre {
module: Module,
wasi_params: WasiParams,
engine: Engine,
Expand Down Expand Up @@ -197,7 +199,7 @@ impl WasmtimeEngineProviderPre {
/// Note: from micro-benchmarking, this method is 10 microseconds faster than
/// `WasmtimeEngineProvider::clone`. This isn't a significant gain to justify
/// the exposure of this method to all the consumers of `wasmtime_provider`.
pub(crate) fn rehydrate(&self) -> Result<WasmtimeEngineProvider> {
pub fn rehydrate(&self) -> Result<WasmtimeEngineProvider> {
let engine = self.engine.clone();

#[cfg(feature = "wasi")]
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.72.0"
channel = "1.74.0"
components = ["rustfmt", "clippy"]
targets = ["wasm32-wasi"]

Expand Down
Loading