Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ jobs:
- name: Setup Rust
if: matrix.project.name == 'rust'
uses: dtolnay/rust-toolchain@stable
with:
target: x86_64-apple-darwin,aarch64-apple-darwin

- name: Build
shell: bash
Expand Down
19 changes: 6 additions & 13 deletions rustast/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,12 @@ ARCH=$(uname -m)

echo "Building on $OS for $ARCH"

if [ "$OS" = "darwin" ]; then
if [ "$ARCH" = "arm64" ]; then
cargo build --release
cp target/release/librustast.dylib ./librustast-arm64.dylib

elif [ "$ARCH" = "x86_64" ]; then
cargo build --release
cp target/release/librustast.dylib ./librustast-amd64.dylib

else
echo "Unsupported macOS architecture: $ARCH"
exit 1
fi
if [ "$OS" = "darwin" ]; then
cargo build --release --target aarch64-apple-darwin
cargo build --release --target x86_64-apple-darwin

cp target/aarch64-apple-darwin/release/librustast.dylib ./librustast-arm64.dylib
cp target/x86_64-apple-darwin/release/librustast.dylib ./librustast-amd64.dylib

elif [ "$OS" = "linux" ]; then
if [ "$ARCH" = "aarch64" ]; then
Expand Down
Loading