Rename the wasmtime_api library to match the containing wasmtime crate (#594)

* Rename the `wasmtime_api` library to match the containing `wasmtime` crate

Commit d9ca508f80 renamed the
`wasmtime-api` crate to `wasmtime`, but left the name of the library it
contains as `wasmtime_api`.

It's fairly unusual for a crate to contain a library with a different
name, and it results in rather confusing error messages for a user; if
you list `wasmtime = "0.7"` in `Cargo.toml`, you can't `use
wasmtime::*`, you have to `use wasmtime_api::*;`.

Rename the `wasmtime_api` library to `wasmtime`.

* Stop renaming wasmtime to api on imports

Various users renamed the crate formerly known as wasmtime_api to api,
and then used api:: prefixes everywhere; change those all to wasmtime::
and drop the renaming.
This commit is contained in:
Josh Triplett
2019-11-19 14:47:39 -08:00
committed by Dan Gohman
parent 58dd4c6c88
commit 2635ccb742
21 changed files with 70 additions and 78 deletions

View File

@@ -191,7 +191,7 @@ jobs:
name: wheels-${{ matrix.os }}
path: crates/misc/py/wheelhouse
# Perform release builds of `wasmtime` and `libwasmtime_api.so`. Builds on
# Perform release builds of `wasmtime` and `libwasmtime.so`. Builds on
# Windows/Mac/Linux, and artifacts are uploaded after the build is finished.
# Note that we also run tests here to test exactly what we're deploying.
build:
@@ -215,7 +215,7 @@ jobs:
# Build `wasmtime` and executables
- run: $CENTOS cargo build --release --bin wasmtime --bin wasm2obj
shell: bash
# Build `libwasmtime_api.so`
# Build `libwasmtime.so`
- run: $CENTOS cargo build --release --manifest-path crates/api/Cargo.toml
shell: bash
# Test what we just built
@@ -237,12 +237,12 @@ jobs:
shell: bash
if: matrix.os == 'windows-latest'
# Move libwasmtime_api dylib to dist folder
- run: cp target/release/libwasmtime_api.{so,a} dist
# Move libwasmtime dylib to dist folder
- run: cp target/release/libwasmtime.{so,a} dist
if: matrix.os == 'ubuntu-latest'
- run: cp target/release/libwasmtime_api.{dylib,a} dist
- run: cp target/release/libwasmtime.{dylib,a} dist
if: matrix.os == 'macos-latest'
- run: cp target/release/wasmtime_api.{dll,lib} dist
- run: cp target/release/wasmtime.{dll,lib} dist
shell: bash
if: matrix.os == 'windows-latest'