Repository: bytecodealliance/wasmtime
Pull request #1693 (2020-05-13 20:13:57)

Move `crates/api` to `crates/wasmtime`
The `wasmtime` crate currently lives in `crates/api` for historical
reasons, because we once called it `wasmtime-api` crate. This creates a
stumbling block for new contributors.

As discussed on Zulip, rename the directory to `crates/wasmtime`.

github-actions[bot]: #### Subscribe to Label Action

cc @fitzgen, @kubkon, @peterhuene

<details>
This issue or pull request has been labeled: "fuzzing", "wasi", "wasmtime:c-api"

Thus the following users have been cc'd because of the following labels:

* fitzgen: fuzzing
* kubkon: wasi
* peterhuene: wasmtime:c-api

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

[Learn more.](https://github.com/bytecodealliance/subscribe-to-label-action)
</details>

Patch:
diff --git a/.github/labeler.yml b/.github/labeler.yml
index c332a8a7c..5ad56966e 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -53,7 +53,7 @@
   - "crates/wiggle/**"
 
 "wasmtime:api":
-  - "crates/api/**"
+  - "crates/wasmtime/**"
 
 "wasmtime:c-api":
   - "crates/c-api/**"
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 428c3b910..e99a2c6b3 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -75,10 +75,10 @@ jobs:
         toolchain: nightly
 
     # Check some feature combinations of the `wasmtime` crate
-    - run: cargo check --manifest-path crates/api/Cargo.toml --no-default-features
-    - run: cargo check --manifest-path crates/api/Cargo.toml --features wat
-    - run: cargo check --manifest-path crates/api/Cargo.toml --features lightbeam
-    - run: cargo check --manifest-path crates/api/Cargo.toml --features jitdump
+    - run: cargo check --manifest-path crates/wasmtime/Cargo.toml --no-default-features
+    - run: cargo check --manifest-path crates/wasmtime/Cargo.toml --features wat
+    - run: cargo check --manifest-path crates/wasmtime/Cargo.toml --features lightbeam
+    - run: cargo check --manifest-path crates/wasmtime/Cargo.toml --features jitdump
 
     # Check some feature combinations of the `wasmtime-c-api` crate
     - run: cargo check --manifest-path crates/c-api/Cargo.toml --no-default-features
diff --git a/Cargo.toml b/Cargo.toml
index 7184ecd47..9439ed5c0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,7 +22,7 @@ doc = false
 
 [dependencies]
 # Enable all supported architectures by default.
-wasmtime = { path = "crates/api", version = "0.16.0", default-features = false }
+wasmtime = { path = "crates/wasmtime", version = "0.16.0", default-features = false }
 wasmtime-debug = { path = "crates/debug", version = "0.16.0" }
 wasmtime-environ = { path = "crates/environ", version = "0.16.0" }
 wasmtime-jit = { path = "crates/jit", version = "0.16.0" }
diff --git a/crates/c-api/Cargo.toml b/crates/c-api/Cargo.toml
index f87c150b0..f81723285 100644
--- a/crates/c-api/Cargo.toml
+++ b/crates/c-api/Cargo.toml
@@ -19,7 +19,7 @@ doctest = false
 [dependencies]
 anyhow = "1.0"
 once_cell = "1.3"
-wasmtime = { path = "../api", default-features = false }
+wasmtime = { path = "../wasmtime", default-features = false }
 wasmtime-c-api-macros = { path = "macros" }
 
 # Optional dependency for the `wat2wasm` API
diff --git a/crates/fuzzing/Cargo.toml b/crates/fuzzing/Cargo.toml
index 830bbc692..4b2778d6b 100644
--- a/crates/fuzzing/Cargo.toml
+++ b/crates/fuzzing/Cargo.toml
@@ -15,7 +15,7 @@ log = "0.4.8"
 rayon = "1.2.1"
 wasmparser = "0.52.0"
 wasmprinter = "0.2.1"
-wasmtime = { path = "../api" }
+wasmtime = { path = "../wasmtime" }
 wasmtime-wast = { path = "../wast" }
 
 [dev-dependencies]
diff --git a/crates/misc/rust/Cargo.toml b/crates/misc/rust/Cargo.toml
index 875ac99b2..61f804a23 100644
--- a/crates/misc/rust/Cargo.toml
+++ b/crates/misc/rust/Cargo.toml
@@ -17,7 +17,7 @@ doctest = false
 [dependencies]
 wasmtime-rust-macro = { path = "./macro", version = "0.16.0" }
 wasmtime-wasi = { path = "../../wasi", version = "0.16.0" }
-wasmtime = { path = "../../api", version = "0.16.0" }
+wasmtime = { path = "../../wasmtime", version = "0.16.0" }
 anyhow = "1.0.19"
 
 [badges]
diff --git a/crates/wasi/Cargo.toml b/crates/wasi/Cargo.toml
index ab84856a4..8d0b67701 100644
--- a/crates/wasi/Cargo.toml
+++ b/crates/wasi/Cargo.toml
@@ -15,7 +15,7 @@ edition = "2018"
 anyhow = "1.0"
 log = { version = "0.4.8", default-features = false }
 wasi-common = { path = "../wasi-common", version = "0.16.0" }
-wasmtime = { path = "../api", version = "0.16.0", default-features = false }
+wasmtime = { path = "../wasmtime", version = "0.16.0", default-features = false }
 wasmtime-runtime = { path = "../runtime", version = "0.16.0" }
 wig = { path = "../wasi-common/wig", version = "0.16.0" }
 wiggle = { path = "../wiggle", version = "0.16.0" }
diff --git a/crates/api/Cargo.toml b/crates/wasmtime/Cargo.toml
similarity index 100%
rename from crates/api/Cargo.toml
rename to crates/wasmtime/Cargo.toml
diff --git a/crates/api/LICENSE b/crates/wasmtime/LICENSE
similarity index 100%
rename from crates/api/LICENSE
rename to crates/wasmtime/LICENSE
diff --git a/crates/api/README.md b/crates/wasmtime/README.md
similarity index 100%
rename from crates/api/README.md
rename to crates/wasmtime/README.md
diff --git a/crates/api/src/externals.rs b/crates/wasmtime/src/externals.rs
similarity index 100%
rename from crates/api/src/externals.rs
rename to crates/wasmtime/src/externals.rs
diff --git a/crates/api/src/frame_info.rs b/crates/wasmtime/src/frame_info.rs
similarity index 100%
rename from crates/api/src/frame_info.rs
rename to crates/wasmtime/src/frame_info.rs
diff --git a/crates/api/src/func.rs b/crates/wasmtime/src/func.rs
similarity index 100%
rename from crates/api/src/func.rs
rename to crates/wasmtime/src/func.rs
diff --git a/crates/api/src/instance.rs b/crates/wasmtime/src/instance.rs
similarity index 100%
rename from crates/api/src/instance.rs
rename to crates/wasmtime/src/instance.rs
diff --git a/crates/api/src/lib.rs b/crates/wasmtime/src/lib.rs
similarity index 100%
rename from crates/api/src/lib.rs
rename to crates/wasmtime/src/lib.rs
diff --git a/crates/api/src/linker.rs b/crates/wasmtime/src/linker.rs
similarity index 100%
rename from crates/api/src/linker.rs
rename to crates/wasmtime/src/linker.rs
diff --git a/crates/api/src/module.rs b/crates/wasmtime/src/module.rs
similarity index 100%
rename from crates/api/src/module.rs
rename to crates/wasmtime/src/module.rs
diff --git a/crates/api/src/ref.rs b/crates/wasmtime/src/ref.rs
similarity index 100%
rename from crates/api/src/ref.rs
rename to crates/wasmtime/src/ref.rs
diff --git a/crates/api/src/runtime.rs b/crates/wasmtime/src/runtime.rs
similarity index 100%
rename from crates/api/src/runtime.rs
rename to crates/wasmtime/src/runtime.rs
diff --git a/crates/api/src/trampoline/create_handle.rs b/crates/wasmtime/src/trampoline/create_handle.rs
similarity index 100%
rename from crates/api/src/trampoline/create_handle.rs
rename to crates/wasmtime/src/trampoline/create_handle.rs
diff --git a/crates/api/src/trampoline/func.rs b/crates/wasmtime/src/trampoline/func.rs
similarity index 100%
rename from crates/api/src/trampoline/func.rs
rename to crates/wasmtime/src/trampoline/func.rs
diff --git a/crates/api/src/trampoline/global.rs b/crates/wasmtime/src/trampoline/global.rs
similarity index 100%
rename from crates/api/src/trampoline/global.rs
rename to crates/wasmtime/src/trampoline/global.rs
diff --git a/crates/api/src/trampoline/memory.rs b/crates/wasmtime/src/trampoline/memory.rs
similarity index 100%
rename from crates/api/src/trampoline/memory.rs
rename to crates/wasmtime/src/trampoline/memory.rs
diff --git a/crates/api/src/trampoline/mod.rs b/crates/wasmtime/src/trampoline/mod.rs
similarity index 100%
rename from crates/api/src/trampoline/mod.rs
rename to crates/wasmtime/src/trampoline/mod.rs
diff --git a/crates/api/src/trampoline/table.rs b/crates/wasmtime/src/trampoline/table.rs
similarity index 100%
rename from crates/api/src/trampoline/table.rs
rename to crates/wasmtime/src/trampoline/table.rs
diff --git a/crates/api/src/trap.rs b/crates/wasmtime/src/trap.rs
similarity index 100%
rename from crates/api/src/trap.rs
rename to crates/wasmtime/src/trap.rs
diff --git a/crates/api/src/types.rs b/crates/wasmtime/src/types.rs
similarity index 100%
rename from crates/api/src/types.rs
rename to crates/wasmtime/src/types.rs
diff --git a/crates/api/src/unix.rs b/crates/wasmtime/src/unix.rs
similarity index 100%
rename from crates/api/src/unix.rs
rename to crates/wasmtime/src/unix.rs
diff --git a/crates/api/src/values.rs b/crates/wasmtime/src/values.rs
similarity index 100%
rename from crates/api/src/values.rs
rename to crates/wasmtime/src/values.rs
diff --git a/crates/api/src/windows.rs b/crates/wasmtime/src/windows.rs
similarity index 100%
rename from crates/api/src/windows.rs
rename to crates/wasmtime/src/windows.rs
diff --git a/crates/wast/Cargo.toml b/crates/wast/Cargo.toml
index b83b3fec5..e0759cf54 100644
--- a/crates/wast/Cargo.toml
+++ b/crates/wast/Cargo.toml
@@ -12,7 +12,7 @@ edition = "2018"
 
 [dependencies]
 anyhow = "1.0.19"
-wasmtime = { path = "../api", version = "0.16.0", default-features = false }
+wasmtime = { path = "../wasmtime", version = "0.16.0", default-features = false }
 wast = "15.0.0"
 
 [badges]
diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml
index ace402161..38fa092d5 100644
--- a/fuzz/Cargo.toml
+++ b/fuzz/Cargo.toml
@@ -14,7 +14,7 @@ cranelift-reader = { path = "../cranelift/reader" }
 cranelift-wasm = { path = "../cranelift/wasm" }
 libfuzzer-sys = "0.3.2"
 target-lexicon = "0.10"
-wasmtime = { path = "../crates/api" }
+wasmtime = { path = "../crates/wasmtime" }
 wasmtime-fuzzing = { path = "../crates/fuzzing" }
 
 [[bin]]
diff --git a/scripts/publish-wasmtime.sh b/scripts/publish-wasmtime.sh
index 7b7908b1c..67e1d0d65 100755
--- a/scripts/publish-wasmtime.sh
+++ b/scripts/publish-wasmtime.sh
@@ -32,7 +32,7 @@ for cargo_toml in \
     crates/profiling/Cargo.toml \
     crates/debug/Cargo.toml \
     crates/jit/Cargo.toml \
-    crates/api/Cargo.toml \
+    crates/wasmtime/Cargo.toml \
     crates/wasi/Cargo.toml \
     crates/wast/Cargo.toml \
     crates/misc/rust/macro/Cargo.toml \


Test patch:
diff --git a/crates/test-programs/Cargo.toml b/crates/test-programs/Cargo.toml
index a42189620..d6657fe10 100644
--- a/crates/test-programs/Cargo.toml
+++ b/crates/test-programs/Cargo.toml
@@ -12,7 +12,7 @@ cfg-if = "0.1.9"
 [dev-dependencies]
 wasi-common = { path = "../wasi-common", version = "0.16.0" }
 wasmtime-wasi = { path = "../wasi", version = "0.16.0" }
-wasmtime = { path = "../api", version = "0.16.0" }
+wasmtime = { path = "../wasmtime", version = "0.16.0" }
 target-lexicon = "0.10.0"
 pretty_env_logger = "0.4.0"
 tempfile = "3.1.0"