From fa89412a57d6af4e8dd11f99611786c180082971 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 27 Apr 2023 13:36:12 +0200 Subject: [PATCH 1/8] Made test-build-docs-rs tests docs generation for all crates under libs --- Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Makefile b/Makefile index 079842f566e..984c258c2be 100644 --- a/Makefile +++ b/Makefile @@ -452,6 +452,14 @@ test-build-docs-rs: printf "Following features are inferred from Cargo.toml: $$features\n\n\n"; \ $(CARGO_BINARY) doc $(CARGO_TARGET_FLAG) --manifest-path "$$manifest_path" --features "$$features" || exit 1; \ done + for manifest_path in lib/*/Cargo.toml; do \ + toml get "$$manifest_path" "$$manifest_docs_rs_features_path" >/dev/null 2>&1; \ + if [ $$? -eq 0 ]; then \ + continue; \ + fi; \ + printf "*** Building doc for package with manifest $$manifest_path ***\n\n"; \ + $(CARGO_BINARY) doc $(CARGO_TARGET_FLAG) --manifest-path "$$manifest_path" || exit 1; \ + done build-docs-capi: # `wasmer-c-api` lib's name is `wasmer`. To avoid a conflict From e828da74311c737ada96925d74e34f105a87ed01 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 27 Apr 2023 14:21:03 +0200 Subject: [PATCH 2/8] Fixed testing of docs --- Makefile | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 984c258c2be..89f083eb9d1 100644 --- a/Makefile +++ b/Makefile @@ -445,20 +445,17 @@ test-build-docs-rs: for manifest_path in lib/*/Cargo.toml; do \ toml get "$$manifest_path" "$$manifest_docs_rs_features_path" >/dev/null 2>&1; \ if [ $$? -ne 0 ]; then \ - continue; \ + features=""; \ + else \ + features=$$(toml get "$$manifest_path" "$$manifest_docs_rs_features_path" | sed 's/\[//; s/\]//; s/"\([^"]*\)"/\1/g'); \ fi; \ - features=$$(toml get "$$manifest_path" "$$manifest_docs_rs_features_path" | sed 's/\[//; s/\]//; s/"\([^"]*\)"/\1/g'); \ printf "*** Building doc for package with manifest $$manifest_path ***\n\n"; \ - printf "Following features are inferred from Cargo.toml: $$features\n\n\n"; \ - $(CARGO_BINARY) doc $(CARGO_TARGET_FLAG) --manifest-path "$$manifest_path" --features "$$features" || exit 1; \ - done - for manifest_path in lib/*/Cargo.toml; do \ - toml get "$$manifest_path" "$$manifest_docs_rs_features_path" >/dev/null 2>&1; \ - if [ $$? -eq 0 ]; then \ - continue; \ + if [ -z "$$features" ]; then \ + $(CARGO_BINARY) doc $(CARGO_TARGET_FLAG) --manifest-path "$$manifest_path" || exit 1; \ + else \ + printf "Following features are inferred from Cargo.toml: $$features\n\n\n"; \ + $(CARGO_BINARY) doc $(CARGO_TARGET_FLAG) --manifest-path "$$manifest_path" --features "$$features" || exit 1; \ fi; \ - printf "*** Building doc for package with manifest $$manifest_path ***\n\n"; \ - $(CARGO_BINARY) doc $(CARGO_TARGET_FLAG) --manifest-path "$$manifest_path" || exit 1; \ done build-docs-capi: From 6f56fc16b8c3ebf248bda6251b2f0d9d53bff8f5 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 27 Apr 2023 14:21:25 +0200 Subject: [PATCH 3/8] Fixed docs generation for wasmer-cache crate --- lib/cache/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cache/Cargo.toml b/lib/cache/Cargo.toml index d1544af922c..c49e8c94919 100644 --- a/lib/cache/Cargo.toml +++ b/lib/cache/Cargo.toml @@ -26,3 +26,6 @@ wasmer-compiler-singlepass = { path = "../compiler-singlepass", version = "=3.2. default = ["filesystem"] filesystem = [] blake3-pure = ["blake3/pure"] + +[package.metadata.docs.rs] +features = ["wasmer/sys"] \ No newline at end of file From 836456dc5cf2f6dd3a3ce20ec4e7dc4132249abb Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 27 Apr 2023 14:52:18 +0200 Subject: [PATCH 4/8] Fixed emscripten crate doc generation --- lib/emscripten/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/emscripten/Cargo.toml b/lib/emscripten/Cargo.toml index f848abe41e9..3c6ee2d8dd1 100644 --- a/lib/emscripten/Cargo.toml +++ b/lib/emscripten/Cargo.toml @@ -21,3 +21,6 @@ wasmer-types = { path = "../types", version = "=3.2.1" } [target.'cfg(windows)'.dependencies] getrandom = "0.2" + +[package.metadata.docs.rs] +features = ["wasmer/sys"] From d1067dd1d68d2306748e6c65f0cedb2bacdbcd0d Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 27 Apr 2023 15:31:27 +0200 Subject: [PATCH 5/8] Fixed doc generation for wai-bindgen-wasmer crate --- lib/wai-bindgen-wasmer/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/wai-bindgen-wasmer/Cargo.toml b/lib/wai-bindgen-wasmer/Cargo.toml index 754ab422eda..2d6649f31ba 100644 --- a/lib/wai-bindgen-wasmer/Cargo.toml +++ b/lib/wai-bindgen-wasmer/Cargo.toml @@ -33,3 +33,6 @@ async = ["async-trait", "wai-bindgen-wasmer-impl/async"] # Wasmer features js = ["wasmer/js", "wasmer/std"] sys = ["wasmer/sys"] + +[package.metadata.docs.rs] +features = ["wasmer/sys"] From 66cc4811f47dec731310d89eee06530a417f0d27 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 27 Apr 2023 15:32:15 +0200 Subject: [PATCH 6/8] Fixed doc generation for wasix-types crate --- lib/wasi-types/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/wasi-types/Cargo.toml b/lib/wasi-types/Cargo.toml index 7bc9e64709c..6079a488005 100644 --- a/lib/wasi-types/Cargo.toml +++ b/lib/wasi-types/Cargo.toml @@ -34,3 +34,6 @@ version = "1.3.0" [features] enable-serde = ["serde", "wasmer-types/serde"] + +[package.metadata.docs.rs] +features = ["wasmer/sys"] From fae3bc53b34938a80f7d0241f1666182ebb907d6 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 27 Apr 2023 16:31:00 +0200 Subject: [PATCH 7/8] Fixed Corgo.toml for wasmer-web crate --- lib/wasi-web/Cargo.lock | 58 ++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 15 deletions(-) diff --git a/lib/wasi-web/Cargo.lock b/lib/wasi-web/Cargo.lock index 79b77500e79..83dfcce4310 100644 --- a/lib/wasi-web/Cargo.lock +++ b/lib/wasi-web/Cargo.lock @@ -391,6 +391,19 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "dashmap" +version = "5.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" +dependencies = [ + "cfg-if", + "hashbrown", + "lock_api", + "once_cell", + "parking_lot_core 0.9.7", +] + [[package]] name = "derivative" version = "2.2.0" @@ -894,9 +907,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.6.5" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" dependencies = [ "autocfg", ] @@ -985,7 +998,7 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core", + "parking_lot_core 0.8.6", ] [[package]] @@ -1002,6 +1015,19 @@ dependencies = [ "winapi", ] +[[package]] +name = "parking_lot_core" +version = "0.9.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-sys 0.45.0", +] + [[package]] name = "path-clean" version = "0.1.0" @@ -1938,7 +1964,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "virtual-fs" -version = "0.1.1" +version = "0.2.0" dependencies = [ "anyhow", "async-trait", @@ -2031,7 +2057,7 @@ dependencies = [ [[package]] name = "wai-bindgen-wasmer" -version = "0.2.5" +version = "0.3.1" dependencies = [ "anyhow", "bitflags", @@ -2215,7 +2241,7 @@ dependencies = [ [[package]] name = "wasmer" -version = "3.2.0-beta.2" +version = "3.2.1" dependencies = [ "bytes", "cfg-if", @@ -2223,6 +2249,7 @@ dependencies = [ "indexmap", "js-sys", "more-asserts", + "rustc-demangle", "serde", "serde-wasm-bindgen", "target-lexicon", @@ -2240,7 +2267,7 @@ dependencies = [ [[package]] name = "wasmer-compiler" -version = "3.2.0-beta.2" +version = "3.2.1" dependencies = [ "backtrace", "cfg-if", @@ -2251,7 +2278,6 @@ dependencies = [ "memmap2", "more-asserts", "region", - "rustc-demangle", "smallvec", "thiserror", "wasmer-types", @@ -2261,7 +2287,7 @@ dependencies = [ [[package]] name = "wasmer-derive" -version = "3.2.0-beta.2" +version = "3.2.1" dependencies = [ "proc-macro-error", "proc-macro2", @@ -2271,7 +2297,7 @@ dependencies = [ [[package]] name = "wasmer-types" -version = "3.2.0-beta.2" +version = "3.2.1" dependencies = [ "bytecheck", "enum-iterator", @@ -2285,14 +2311,16 @@ dependencies = [ [[package]] name = "wasmer-vm" -version = "3.2.0-beta.2" +version = "3.2.1" dependencies = [ "backtrace", "cc", "cfg-if", "corosensei", + "dashmap", "derivative", "enum-iterator", + "fnv", "indexmap", "lazy_static", "libc", @@ -2308,7 +2336,7 @@ dependencies = [ [[package]] name = "wasmer-wasix" -version = "0.2.0" +version = "0.3.1" dependencies = [ "anyhow", "async-trait", @@ -2356,7 +2384,7 @@ dependencies = [ [[package]] name = "wasmer-wasix-types" -version = "0.2.0" +version = "0.3.1" dependencies = [ "anyhow", "bitflags", @@ -2456,9 +2484,9 @@ dependencies = [ [[package]] name = "webc" -version = "5.0" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa158c77bd41040f4b9a4b91be63446885ce9b04bc9a5bb457fa586e7a8c9815" +checksum = "06bee486f9207604f99bfa3c95afcd03272d95db5872c6c1b11470be4390d514" dependencies = [ "anyhow", "base64 0.21.0", From 233cb1f7c2b75a9d9643dcc3a0aefb4ee22d2b50 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 27 Apr 2023 17:47:08 +0200 Subject: [PATCH 8/8] Don't try to generate doc for wasmer-web crate --- Makefile | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 89f083eb9d1..36dfef6bfd7 100644 --- a/Makefile +++ b/Makefile @@ -443,18 +443,20 @@ build-docs: test-build-docs-rs: @manifest_docs_rs_features_path="package.metadata.docs.rs.features"; \ for manifest_path in lib/*/Cargo.toml; do \ - toml get "$$manifest_path" "$$manifest_docs_rs_features_path" >/dev/null 2>&1; \ - if [ $$? -ne 0 ]; then \ - features=""; \ - else \ - features=$$(toml get "$$manifest_path" "$$manifest_docs_rs_features_path" | sed 's/\[//; s/\]//; s/"\([^"]*\)"/\1/g'); \ - fi; \ - printf "*** Building doc for package with manifest $$manifest_path ***\n\n"; \ - if [ -z "$$features" ]; then \ - $(CARGO_BINARY) doc $(CARGO_TARGET_FLAG) --manifest-path "$$manifest_path" || exit 1; \ - else \ - printf "Following features are inferred from Cargo.toml: $$features\n\n\n"; \ - $(CARGO_BINARY) doc $(CARGO_TARGET_FLAG) --manifest-path "$$manifest_path" --features "$$features" || exit 1; \ + if [ "$$manifest_path" != "lib/wasi-web/Cargo.toml" ]; then \ + toml get "$$manifest_path" "$$manifest_docs_rs_features_path" >/dev/null 2>&1; \ + if [ $$? -ne 0 ]; then \ + features=""; \ + else \ + features=$$(toml get "$$manifest_path" "$$manifest_docs_rs_features_path" | sed 's/\[//; s/\]//; s/"\([^"]*\)"/\1/g'); \ + fi; \ + printf "*** Building doc for package with manifest $$manifest_path ***\n\n"; \ + if [ -z "$$features" ]; then \ + $(CARGO_BINARY) doc $(CARGO_TARGET_FLAG) --manifest-path "$$manifest_path" || exit 1; \ + else \ + printf "Following features are inferred from Cargo.toml: $$features\n\n\n"; \ + $(CARGO_BINARY) doc $(CARGO_TARGET_FLAG) --manifest-path "$$manifest_path" --features "$$features" || exit 1; \ + fi; \ fi; \ done