When I compile the following lib.rs with the accompanying Cargo.toml for x86_64-pc-windows-gnu, the function test_fn is missing from the resulting DLL. However, this code compiles and exposes test_fn for x86_64-unknown-linux-gnu, aarch64-apple-darwin.
I compile the code with cargo zigbuild --release --target *insert_target* using a slightly modified version of the cargo-zigbuild Docker image
Mostly likely a zig cc issue since there isn't any special handling for DLL in this project, try to reproduce it using zig cc directly and report to zig for help.
When I compile the following
lib.rs
with the accompanyingCargo.toml
forx86_64-pc-windows-gnu
, the functiontest_fn
is missing from the resulting DLL. However, this code compiles and exposestest_fn
forx86_64-unknown-linux-gnu, aarch64-apple-darwin
.I compile the code with
cargo zigbuild --release --target *insert_target*
using a slightly modified version of thecargo-zigbuild
Docker imagesource:
Cargo.toml: