Skip to content

Commit

Permalink
undo deleting the makefile rust build commands as it is apperantly us…
Browse files Browse the repository at this point in the history
…ed by the test yaml as well

Signed-off-by: Georgi Georgiev <[email protected]>
  • Loading branch information
georg-getz committed Jun 4, 2024
1 parent 53c1d98 commit 8b363de
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,40 @@ build: build-headers build-rust build-java
# artifacts are set properly.
build-rust: build-rust-$(build_arch)-$(build_os)

# Compile the Rust part.
build-rust-all-targets: build-rust-amd64-darwin build-rust-arm64-darwin build-rust-amd64-linux build-rust-amd64-windows

build-rust-amd64-darwin:
rustup target add x86_64-apple-darwin
cargo build --release --target=x86_64-apple-darwin
mkdir -p artifacts/darwin-amd64
cp target/x86_64-apple-darwin/release/libwasmer_jni.dylib artifacts/darwin-amd64
install_name_tool -id "@rpath/libwasmer_jni.dylib" ./artifacts/darwin-amd64/libwasmer_jni.dylib
test -h target/current || ln -s x86_64-apple-darwin/release target/current

build-rust-arm64-darwin:
rustup target add aarch64-apple-darwin
cargo build --release --target=aarch64-apple-darwin
mkdir -p artifacts/darwin-arm64
cp target/aarch64-apple-darwin/release/libwasmer_jni.dylib artifacts/darwin-arm64
install_name_tool -id "@rpath/libwasmer_jni.dylib" ./artifacts/darwin-arm64/libwasmer_jni.dylib
test -h target/current || ln -s aarch64-apple-darwin/release target/current

build-rust-amd64-linux:
rustup target add x86_64-unknown-linux-gnu
cargo build --release --target=x86_64-unknown-linux-gnu
mkdir -p artifacts/linux-amd64
cp target/x86_64-unknown-linux-gnu/release/libwasmer_jni.so artifacts/linux-amd64/
test -h target/current || ln -s x86_64-unknown-linux-gnu/release target/current

build-rust-amd64-windows:
rustup target add x86_64-pc-windows-msvc
cargo build --release --target=x86_64-pc-windows-msvc
mkdir -p artifacts/windows-amd64
cp target/x86_64-pc-windows-msvc/release/wasmer_jni.dll artifacts/windows-amd64/
mkdir -p target/current
cp target/x86_64-pc-windows-msvc/release/wasmer_jni.dll target/current/

# Compile the Java part (incl. `build-test`, see `gradlew`).
build-java:
"./gradlew" --info build
Expand Down

0 comments on commit 8b363de

Please sign in to comment.