diff --git a/README.md b/README.md index 78172d7..721fe66 100644 --- a/README.md +++ b/README.md @@ -131,16 +131,17 @@ Next up you'll want to have a [local Wasmtime build available](https://bytecodealliance.github.io/wasmtime/contributing-building.html). You'll need to build at least the `wasmtime-c-api` crate, which, at the time of -this writing, would be: +this writing, would be (apple m1 example): ```sh -$ cargo build -p wasmtime-c-api +$ rustup target add aarch64-apple-darwin +$ cargo build --release --target aarch64-apple-darwin -p wasmtime-c-api ``` -Once you've got that you can set up the environment of this library with: +Once you've got that you can set up the environment of this library with (apple m1 example): ```sh -$ ./ci/local.sh /path/to/wasmtime +$ ./ci/local.sh /path/to/wasmtime aarch64-apple-darwin ``` This will create a `build` directory which has the compiled libraries and header diff --git a/ci/local.sh b/ci/local.sh index d211ebe..c860289 100755 --- a/ci/local.sh +++ b/ci/local.sh @@ -1,6 +1,7 @@ #!/bin/bash wasmtime=$1 +target=$2 if [ "$wasmtime" = "" ]; then echo "must pass path to wasmtime" exit 1 @@ -15,9 +16,9 @@ for d in "include" "include/wasmtime" "linux-x86_64" "macos-x86_64" "windows-x86 echo "package ${name/-/_}" > "$path/empty.go" done -build="$wasmtime/target/release" +build="$wasmtime/target/"$target"/release" if [ ! -d "$build" ]; then - build="$wasmtime/target/debug" + build="$wasmtime/target/"$target"/debug" fi # Use absolute path for symbolic links build=$(cd "$build" && pwd)