diff --git a/lib/api/src/exports.rs b/lib/api/src/exports.rs index 6ab7cb85f35..03b79fc823e 100644 --- a/lib/api/src/exports.rs +++ b/lib/api/src/exports.rs @@ -9,6 +9,8 @@ use wasmer_runtime::Export; /// The `ExportError` can happen when trying to get a specific /// export [`Extern`] from the [`Instance`] exports. /// +/// [`Instance`]: crate::Instance +/// /// ```ignore /// # let my_instance = Instance::new(...); /// @@ -146,12 +148,18 @@ impl LikeNamespace for Exports { } /// This trait is used to mark types as gettable from an [`Instance`]. +/// +/// [`Instance`]: crate::Instance pub trait Exportable<'a>: Sized { - /// This function is used when providedd the Extern as exportable, so it - /// can be used while instantiating the Module. + /// This function is used when providedd the [`Extern`] as exportable, so it + /// can be used while instantiating the [`Module`]. + /// + /// [`Module`]: crate::Module fn to_export(&self) -> Export; /// Implementation of how to get the export corresponding to the implementing type /// from an [`Instance`] by name. + /// + /// [`Instance`]: crate::Instance fn get_self_from_extern(_extern: &'a Extern) -> Result<&'a Self, ExportError>; } diff --git a/lib/api/src/instance.rs b/lib/api/src/instance.rs index d5dea9b1834..464f5008b0c 100644 --- a/lib/api/src/instance.rs +++ b/lib/api/src/instance.rs @@ -29,6 +29,8 @@ impl Instance { /// /// The [`ImportObject`] is the easiest way to provide imports to the instance. /// + /// [`ImportObject`]: crate::ImportObject + /// /// ``` /// # use wasmer::{imports, Store, Module, Global, Instance}; /// let store = Store::default(); @@ -43,7 +45,7 @@ impl Instance { /// /// ## Errors /// - /// The function can return [`InstantiationErrors`]. + /// The function can return [`InstantiationError`]s. /// /// Those are, as defined by the spec: /// * Link errors that happen when plugging the imports into the instance diff --git a/lib/api/src/ptr.rs b/lib/api/src/ptr.rs index f3344f16ab2..fe4f5f75a46 100644 --- a/lib/api/src/ptr.rs +++ b/lib/api/src/ptr.rs @@ -205,7 +205,7 @@ impl WasmPtr { /// Get a UTF-8 string from the `WasmPtr`, where the string is nul-terminated. /// /// Note that this does not account for UTF-8 strings that _contain_ nul themselves, - /// [`get_utf8_string`] has to be used for those. + /// [`WasmPtr::get_utf8_string`] has to be used for those. /// /// Also note that this method returns a reference to Wasm linear memory. The /// underlying data can be mutated if the Wasm is allowed to execute or