Skip to content

Commit

Permalink
Statically link to the C runtime in MSVC
Browse files Browse the repository at this point in the history
Javy version 1.4.0 statically linked to the C runtime. Such version was
built with Rust 1.75.

Javy version 2.0.0, built with Rust 1.79.0, which doesn't perform static
linking by default. This commit adds a directive to preserve the same
behavior as in v 1.4.0.
  • Loading branch information
saulecabrera committed Jun 17, 2024
1 parent 16fcc96 commit e95c407
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@
# https://doc.rust-lang.org/cargo/reference/config.html
[target.wasm32-wasi]
rustflags = ["-C", "target-feature=+simd128"]

# We want to ensure that all the MSVC dependencies are statically resolved and
# included in the final CLI binary.
# Ref: https://github.com/rust-lang/rust/pull/122268
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

cli:
name: test_cli
runs-on: ubuntu-latest
runs-on: [ubuntu-latest]
needs: core
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit e95c407

Please sign in to comment.