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

Fixed residual package-doc issues #3027

Merged
merged 4 commits into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
9 changes: 9 additions & 0 deletions .github/workflows/test-sys.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
run_test: true
run_test_capi: true
run_integration_tests: true
run_build_docs: true
use_sccache: true
- build: macos-x64
os: macos-11
Expand All @@ -63,12 +64,14 @@ jobs:
use_sccache: true
run_integration_tests: true
run_ios_tests: true
run_build_docs: false
- build: macos-arm64
os: macos-11.0
target: aarch64-apple-darwin
use_sccache: true
run_test: false
run_test_capi: false
run_build_docs: false
- build: windows-x64
os: windows-2019
#target: x86_64-pc-windows-msvc commented because of bug in rust setup action
Expand All @@ -78,13 +81,15 @@ jobs:
use_sccache: true
run_test: true
run_test_capi: false # We can't run yet the capi tests on Windows
run_build_docs: true
- build: linux-musl-x64
target: x86_64-unknown-linux-musl
os: ubuntu-latest
container: alpine:latest
run_test: true
run_test_capi: false # It can't run the capi tests because of a cc linker issue (`wasm_engine_new` is redefined)
run_integration_tests: false
run_build_docs: false
use_sccache: false
container: ${{ matrix.container }}
env:
Expand Down Expand Up @@ -218,6 +223,10 @@ jobs:
if: matrix.run_test_capi && matrix.os == 'windows-2019'
run: |
make test-capi
- name: Build Doc
if: matrix.run_build_docs
run: |
make package-docs

audit:
name: Audit
Expand Down
4 changes: 0 additions & 4 deletions lib/api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,6 @@
//! A Host function is any function implemented on the host, in this case in
//! Rust.
//!
//! Host functions can optionally be created with an environment that
//! implements [`WasmerEnv`]. This environment is useful for maintaining
//! host state (for example the filesystem in WASI).
//!
//! Thus WebAssembly modules by themselves cannot do anything but computation
//! on the core types in [`Value`]. In order to make them more useful we
//! give them access to the outside world with [`imports`].
Expand Down
10 changes: 5 additions & 5 deletions lib/api/src/sys/externals/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub struct Global {
}

impl Global {
/// Create a new `Global` with the initial value [`Val`].
/// Create a new `Global` with the initial value [`Value`].
///
/// # Example
///
Expand All @@ -36,7 +36,7 @@ impl Global {
Self::from_value(ctx, val, Mutability::Const).unwrap()
}

/// Create a mutable `Global` with the initial value [`Val`].
/// Create a mutable `Global` with the initial value [`Value`].
///
/// # Example
///
Expand All @@ -53,7 +53,7 @@ impl Global {
Self::from_value(ctx, val, Mutability::Var).unwrap()
}

/// Create a `Global` with the initial value [`Val`] and the provided [`Mutability`].
/// Create a `Global` with the initial value [`Value`] and the provided [`Mutability`].
fn from_value(
ctx: &mut impl AsStoreMut,
val: Value,
Expand Down Expand Up @@ -95,7 +95,7 @@ impl Global {
*self.handle.get(ctx.as_store_ref().objects()).ty()
}

/// Retrieves the current value [`Val`] that the Global has.
/// Retrieves the current value [`Value`] that the Global has.
///
/// # Example
///
Expand All @@ -120,7 +120,7 @@ impl Global {
}
}

/// Sets a custom value [`Val`] to the runtime Global.
/// Sets a custom value [`Value`] to the runtime Global.
///
/// # Example
///
Expand Down
6 changes: 3 additions & 3 deletions lib/api/src/sys/function_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@ impl<T> Clone for FunctionEnv<T> {
}
}

/// A temporary handle to a [`Context`].
/// A temporary handle to a [`FunctionEnv`].
pub struct FunctionEnvMut<'a, T: 'a> {
pub(crate) store_mut: StoreMut<'a>,
pub(crate) func_env: FunctionEnv<T>,
}

impl<T: Send + 'static> FunctionEnvMut<'_, T> {
/// Returns a reference to the host state in this context.
/// Returns a reference to the host state in this function environement.
pub fn data(&self) -> &T {
self.func_env.as_ref(&self.store_mut)
}

/// Returns a mutable- reference to the host state in this context.
/// Returns a mutable- reference to the host state in this function environement.
pub fn data_mut(&mut self) -> &mut T {
self.func_env.as_mut(&mut self.store_mut)
}
Expand Down
2 changes: 1 addition & 1 deletion lib/api/src/sys/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub enum InstantiationError {
#[error("missing required CPU features: {0:?}")]
CpuFeature(String),

/// Import from a different [`Store`].
/// Import from a different Store.
/// This error occurs when an import from a different store is used.
#[error("cannot mix imports from different stores")]
DifferentStores,
Expand Down
4 changes: 2 additions & 2 deletions lib/api/src/sys/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl fmt::Debug for Store {
}
}

/// A temporary handle to a [`Context`].
/// A temporary handle to a [`Store`].
pub struct StoreRef<'a> {
pub(crate) inner: &'a StoreInner,
}
Expand Down Expand Up @@ -182,7 +182,7 @@ impl<'a> StoreRef<'a> {
}
}

/// A temporary handle to a [`Context`].
/// A temporary handle to a [`Store`].
pub struct StoreMut<'a> {
pub(crate) inner: &'a mut StoreInner,
}
Expand Down