expose eager thread-local initialization by the Engine
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
use crate::signatures::SignatureRegistry;
|
||||
use crate::Config;
|
||||
use crate::{Config, Trap};
|
||||
use anyhow::Result;
|
||||
use std::sync::Arc;
|
||||
#[cfg(feature = "cache")]
|
||||
@@ -63,6 +63,12 @@ impl Engine {
|
||||
})
|
||||
}
|
||||
|
||||
/// Eagerly initialize thread-local functionality shared by all [`Engine`]s. This
|
||||
/// will be performed lazily by the runtime if users do not perform it eagerly.
|
||||
pub fn tls_eager_initialize() -> Result<(), Trap> {
|
||||
wasmtime_runtime::tls_eager_initialize().map_err(Trap::from_runtime)
|
||||
}
|
||||
|
||||
/// Returns the configuration settings that this engine is using.
|
||||
#[inline]
|
||||
pub fn config(&self) -> &Config {
|
||||
|
||||
Reference in New Issue
Block a user