Skip to content

Commit

Permalink
Merge #1948
Browse files Browse the repository at this point in the history
1948: doc: Fix links r=Hywan a=Hywan

# Description

Since the `intra-doc-links` feature has been stabilized, we can see more clearly that we have many broken links. This PR is an attempt to fix them!

# Review

- [ ] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Ivan Enderlin <[email protected]>
  • Loading branch information
bors[bot] and Hywan authored Dec 17, 2020
2 parents 8125cd3 + 5a08680 commit 8e34363
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 38 deletions.
5 changes: 2 additions & 3 deletions lib/api/src/externals/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ pub struct Memory {
impl Memory {
/// Creates a new host `Memory` from the provided [`MemoryType`].
///
/// This function will construct the `Memory` using the store [`Tunables`].
///
/// [`Tunables`]: crate::tunables::Tunables
/// This function will construct the `Memory` using the store
/// [`BaseTunables`][crate::tunables::BaseTunables].
///
/// # Example
///
Expand Down
5 changes: 2 additions & 3 deletions lib/api/src/externals/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ impl Table {
///
/// All the elements in the table will be set to the `init` value.
///
/// This function will construct the `Table` using the store [`Tunables`].
///
/// [`Tunables`]: crate::tunables::Tunables
/// This function will construct the `Table` using the store
/// [`BaseTunables`][crate::tunables::BaseTunables].
pub fn new(store: &Store, ty: TableType, init: Val) -> Result<Self, RuntimeError> {
let item = init.into_checked_anyfunc(store)?;
let tunables = store.tunables();
Expand Down
8 changes: 4 additions & 4 deletions lib/compiler-cranelift/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ pub enum CraneliftOptLevel {
SpeedAndSize,
}

/// Global configuration options used to create an [`Engine`] and customize its
/// behavior.
/// Global configuration options used to create an
/// `wasmer_engine::Engine` and customize its behavior.
///
/// This structure exposed a builder-like interface and is primarily consumed by
/// [`Engine::new()`]
/// This structure exposes a builder-like interface and is primarily
/// consumed by `wasmer_engine::Engine::new`.
#[derive(Debug, Clone)]
pub struct Cranelift {
enable_nan_canonicalization: bool,
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub enum WasmError {
}

/// The error that can happen while parsing a `str`
/// to retrieve a [`CpuFeature`].
/// to retrieve a [`CpuFeature`](crate::target::CpuFeature).
#[derive(Debug)]
#[cfg_attr(feature = "std", derive(Error))]
pub enum ParseCpuFeatureError {
Expand Down
4 changes: 2 additions & 2 deletions lib/compiler/src/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ pub type CustomSections = PrimaryMap<SectionIndex, CustomSection>;
#[derive(Debug, PartialEq, Eq, Clone)]
pub struct Dwarf {
/// The section index in the [`Compilation`] that corresponds to the exception frames.
/// More info:
/// https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-PDA/LSB-PDA/ehframechpt.html
/// [Learn
/// more](https://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-PDA/LSB-PDA/ehframechpt.html).
pub eh_frame: SectionIndex,
}

Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/src/jump_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! to another part of a program (or a different program that may have
//! been dynamically loaded) using a table of branch or jump instructions.
//!
//! Source: https://en.wikipedia.org/wiki/Branch_table
//! [Learn more](https://en.wikipedia.org/wiki/Branch_table).
use super::CodeOffset;
#[cfg(feature = "enable-serde")]
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/src/relocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! code and data of a program and adjusting the code and data to reflect the
//! assigned addresses.
//!
//! Source: https://en.wikipedia.org/wiki/Relocation_(computing)
//! [Learn more](https://en.wikipedia.org/wiki/Relocation_(computing)).
//!
//! Each time a `Compiler` compiles a WebAssembly function (into machine code),
//! it also attaches if there are any relocations that need to be patched into
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler/src/unwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! called the function that threw the exception, and which
//! function called that one, and so forth.
//!
//! More info: https://en.wikipedia.org/wiki/Call_stack
//! [Learn more](https://en.wikipedia.org/wiki/Call_stack).
use crate::lib::std::vec::Vec;
#[cfg(feature = "enable-serde")]
use serde::{Deserialize, Serialize};
Expand Down
11 changes: 6 additions & 5 deletions lib/engine/src/trap/frame_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,14 @@ pub fn register(
Some(GlobalFrameInfoRegistration { key: max })
}

/// Description of a frame in a backtrace for a [`Trap`].
/// Description of a frame in a backtrace for a [`RuntimeError::trace`](crate::RuntimeError::trace).
///
/// Whenever a WebAssembly trap occurs an instance of [`Trap`] is created. Each
/// [`Trap`] has a backtrace of the WebAssembly frames that led to the trap, and
/// each frame is described by this structure.
/// Whenever a WebAssembly trap occurs an instance of [`RuntimeError`]
/// is created. Each [`RuntimeError`] has a backtrace of the
/// WebAssembly frames that led to the trap, and each frame is
/// described by this structure.
///
/// [`Trap`]: crate::Trap
/// [`RuntimeError`]: crate::RuntimeError
#[derive(Debug, Clone)]
pub struct FrameInfo {
module_name: String,
Expand Down
2 changes: 2 additions & 0 deletions lib/vm/src/instance/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ impl InstanceAllocator {
/// correspond to the location in memory for the local memories and
/// tables respectively. These pointers should be written to before
/// calling [`InstanceHandle::new`].
///
/// [`InstanceHandle::new`]: super::InstanceHandle::new
pub fn new(
module: &ModuleInfo,
) -> (
Expand Down
4 changes: 2 additions & 2 deletions lib/vm/src/module.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// This file contains code from external sources.
// Attributions: https://github.com/wasmerio/wasmer/blob/master/ATTRIBUTIONS.md

//! Data structure for representing WebAssembly modules
//! in a [`Module`].
//! Data structure for representing WebAssembly modules in a
//! `wasmer::Module`.
use indexmap::IndexMap;
use serde::{Deserialize, Serialize};
Expand Down
4 changes: 2 additions & 2 deletions lib/vm/src/vmcontext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ mod test_vmfunction_body {
#[repr(C)]
pub enum VMFunctionKind {
/// A static function has the native signature:
/// extern "C" (vmctx, arg1, arg2...) -> (result1, result2, ...)
/// `extern "C" (vmctx, arg1, arg2...) -> (result1, result2, ...)`.
///
/// This is the default for functions that are defined:
/// 1. In the Host, natively
/// 2. In the WebAssembly file
Static,

/// A dynamic function has the native signature:
/// extern "C" (ctx, &[Value]) -> Vec<Value>
/// `extern "C" (ctx, &[Value]) -> Vec<Value>`.
///
/// This is the default for functions that are defined:
/// 1. In the Host, dynamically
Expand Down
4 changes: 2 additions & 2 deletions lib/wasi/src/state/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! WARNING: the API exposed here is unstable and very experimental. Certain things are not ready
//! yet and may be broken in patch releases. If you're using this and have any specific needs,
//! please let us know here https://github.com/wasmerio/wasmer/issues/583 or by filing an issue.
//! please [let us know here](https://github.com/wasmerio/wasmer/issues/583) or by filing an issue.
//!
//! Wasmer always has a virtual root directory located at `/` at which all pre-opened directories can
//! be found. It's possible to traverse between preopened directories this way as well (for example
Expand Down Expand Up @@ -539,7 +539,7 @@ impl WasiFs {
/// # Safety
/// - Virtual directories created with this function must not conflict with
/// the standard operation of the WASI filesystem. This is vague and
/// unlikely in pratice. Join the discussion at https://github.com/wasmerio/wasmer/issues/1219
/// unlikely in pratice. [Join the discussion](https://github.com/wasmerio/wasmer/issues/1219)
/// for what the newer, safer WASI FS APIs should look like.
#[allow(dead_code)]
pub unsafe fn open_dir_all(
Expand Down
21 changes: 10 additions & 11 deletions lib/wasmer-types/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,9 @@ pub struct GlobalType {

/// A WebAssembly global descriptor.
///
/// This type describes an instance of a global in a WebAssembly module. Globals
/// are local to an [`Instance`](crate::Instance) and are either immutable or
/// mutable.
/// This type describes an instance of a global in a WebAssembly
/// module. Globals are local to an `Instance` and are either
/// immutable or mutable.
impl GlobalType {
/// Create a new Global variable
/// # Usage:
Expand Down Expand Up @@ -520,10 +520,10 @@ impl fmt::Display for MemoryType {

/// A descriptor for an imported value into a wasm module.
///
/// This type is primarily accessed from the
/// [`Module::imports`](crate::Module::imports) API. Each [`ImportType`]
/// describes an import into the wasm module with the module/name that it's
/// imported from as well as the type of item that's being imported.
/// This type is primarily accessed from the `Module::imports`
/// API. Each `ImportType` describes an import into the wasm module
/// with the module/name that it's imported from as well as the type
/// of item that's being imported.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))]
pub struct ImportType<T = ExternType> {
Expand Down Expand Up @@ -564,10 +564,9 @@ impl<T> ImportType<T> {

/// A descriptor for an exported WebAssembly value.
///
/// This type is primarily accessed from the
/// [`Module::exports`](crate::Module::exports) accessor and describes what
/// names are exported from a wasm module and the type of the item that is
/// exported.
/// This type is primarily accessed from the `Module::exports`
/// accessor and describes what names are exported from a wasm module
/// and the type of the item that is exported.
///
/// The `<T>` refefers to `ExternType`, however it can also refer to use
/// `MemoryType`, `TableType`, `FunctionType` and `GlobalType` for ease of
Expand Down

0 comments on commit 8e34363

Please sign in to comment.