From a88bf7f4d58daa9ce5817d73bd385c9cfc936f26 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 20 Apr 2023 10:08:26 +0200 Subject: [PATCH 1/3] Fixed API Doc generation --- lib/api/src/errors.rs | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lib/api/src/errors.rs b/lib/api/src/errors.rs index bb3d7b4db36..a216cdda459 100644 --- a/lib/api/src/errors.rs +++ b/lib/api/src/errors.rs @@ -38,10 +38,3 @@ pub enum InstantiationError { #[cfg_attr(feature = "std", error("incorrect OS or architecture"))] DifferentArchOS, } - -#[cfg(feature = "core")] -impl std::fmt::Display for InstantiationError { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "InstantiationError") - } -} From fdbefde918f38274ff2f4b2e112cf3642be40283 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 20 Apr 2023 10:08:46 +0200 Subject: [PATCH 2/3] Added Makefile option to build API Doc --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 36c1311dc7a..bf879d49add 100644 --- a/Makefile +++ b/Makefile @@ -440,6 +440,9 @@ endif build-docs: $(CARGO_BINARY) doc $(CARGO_TARGET_FLAG) --release $(compiler_features) --document-private-items --no-deps --workspace --exclude wasmer-c-api +build-docs-api: + $(CARGO_BINARY) doc $(CARGO_TARGET_FLAG) --release $(compiler_features) --manifest-path lib/api/Cargo.toml --features compiler,core,cranelift,engine,jit,singlepass,static-artifact-create,static-artifact-load,sys,sys-default,wasmer-artifact-create,wasmer-artifact-load + build-docs-capi: # `wasmer-c-api` lib's name is `wasmer`. To avoid a conflict # when generating the documentation, we rename it to its From c3ee3c101944e0ca1e325b0a8cebc68c0bba5cef Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 20 Apr 2023 10:09:08 +0200 Subject: [PATCH 3/3] Added test of building the API Doc --- .github/workflows/test.yaml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b39dc7fa473..ee970beabe6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -127,7 +127,19 @@ jobs: run: rustup target add wasm32-wasi - name: make build-wasmer-wasm run: make build-wasmer-wasm - + + test_build_docs_api: + name: Test build docs api + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: 1.65 + target: x86_64-unknown-linux-gnu + - name: make build-docs-api + run: make build-docs-api + build_linux_aarch64: name: ${{ matrix.build-what.name }} on linux-aarch64 runs-on: ubuntu-22.04