mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-19 03:41:22 +00:00
Add misc doc improvements to runtime-core
This commit is contained in:
@ -76,9 +76,18 @@ impl Default for MemoryBoundCheckMode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Controls which experimental features will be enabled.
|
/// Controls which experimental features will be enabled.
|
||||||
|
/// Features usually have a corresponding [WebAssembly proposal][wasm-props].
|
||||||
|
///
|
||||||
|
/// [wasm-props]: https://github.com/WebAssembly/proposals
|
||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
pub struct Features {
|
pub struct Features {
|
||||||
|
/// Whether support for the [SIMD proposal][simd-prop] is enabled.
|
||||||
|
///
|
||||||
|
/// [simd-prop]: https://github.com/webassembly/simd
|
||||||
pub simd: bool,
|
pub simd: bool,
|
||||||
|
/// Whether support for the [threads proposal][threads-prop] is enabled.
|
||||||
|
///
|
||||||
|
/// [threads-prop]: https://github.com/webassembly/threads
|
||||||
pub threads: bool,
|
pub threads: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ pub fn validate_and_report_errors_with_features(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a new module from the given cache `Artifact` for the specified compiler backend
|
/// Creates a new module from the given cache [`Artifact`] for the specified compiler backend
|
||||||
pub unsafe fn load_cache_with(
|
pub unsafe fn load_cache_with(
|
||||||
cache: Artifact,
|
cache: Artifact,
|
||||||
compiler: &dyn backend::Compiler,
|
compiler: &dyn backend::Compiler,
|
||||||
|
@ -54,11 +54,14 @@ pub struct Ctx {
|
|||||||
/// This is intended to be user-supplied, per-instance
|
/// This is intended to be user-supplied, per-instance
|
||||||
/// contextual data. There are currently some issue with it,
|
/// contextual data. There are currently some issue with it,
|
||||||
/// notably that it cannot be set before running the `start`
|
/// notably that it cannot be set before running the `start`
|
||||||
/// function in a WebAssembly module.
|
/// function in a WebAssembly module. Additionally, the `data`
|
||||||
|
/// field may be taken by another ABI implementation that the user
|
||||||
|
/// wishes to use in addition to their own, such as WASI. This issue is
|
||||||
|
/// being discussed at [#1111](https://github.com/wasmerio/wasmer/pull/1111).
|
||||||
///
|
///
|
||||||
/// [#219](https://github.com/wasmerio/wasmer/pull/219) fixes that
|
/// Alternatively, per-function data can be used if the function in the
|
||||||
/// issue, as well as allowing the user to have *per-function*
|
/// [`ImportObject`] is a closure. This cannot duplicate data though,
|
||||||
/// context, instead of just per-instance.
|
/// so if data may be shared if the [`ImportObject`] is reused.
|
||||||
pub data: *mut c_void,
|
pub data: *mut c_void,
|
||||||
|
|
||||||
/// If there's a function set in this field, it gets called
|
/// If there's a function set in this field, it gets called
|
||||||
|
Reference in New Issue
Block a user