diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2449c5a..13115fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Build precompiled NIFs on: push: branches: - - main + - master tags: - '*' diff --git a/native/captcha_nif/.cargo/config.toml b/native/captcha_nif/.cargo/config.toml index 20f03f3..8bd97f9 100644 --- a/native/captcha_nif/.cargo/config.toml +++ b/native/captcha_nif/.cargo/config.toml @@ -1,5 +1,26 @@ -[target.'cfg(target_os = "macos")'] +[target.x86_64-apple-darwin] rustflags = [ - "-C", "link-arg=-undefined", - "-C", "link-arg=dynamic_lookup", + "-C", "link-arg=-undefined", + "-C", "link-arg=dynamic_lookup", ] + +[target.aarch64-apple-darwin] +rustflags = [ + "-C", "link-arg=-undefined", + "-C", "link-arg=dynamic_lookup", +] + +# See https://github.com/rust-lang/rust/issues/59302 +[target.x86_64-unknown-linux-musl] +rustflags = [ + "-C", "target-feature=-crt-static" +] + +# See https://github.com/rust-lang/rust/issues/59302 +[target.aarch64-unknown-linux-musl] +rustflags = [ + "-C", "target-feature=-crt-static" +] + +[profile.release] +lto = true \ No newline at end of file