Hi!
I was trying to create Node native addon using Neon bindings and stumbled into a problem, that Rust ignores crate-type = ["cdylib"] in Cargo.toml and produces .dylib as a cargo build result.
I tried to reproduce this on other projects, and got reproduction even on a very simple example like GitHub - John2143/rust-example-cdylib: example of a rust -> c library
I even created clean MacOS VM in UTM, installed latest Rust, and got reproduction.
Can someone please help me to investigate this issue?
To clarify, I am using MacOS 14.6.1 on M1 mac, Rust 1.80.1.
When running cargo build --message-format=json I am getting result
crate-type = ["cdylib"] tells Cargo to produce a C-compatible dynamic library. The dynamic library will have a .dylib extension on macOS, a .dll extension on Windows, and a .so extension on Linux and other ELF platforms.
Checked another project using cargo-cp-artifact GitHub - zkemail/relayer-utils and it builds successfully for me. Must be some other reason why cargo-cp-artifact prints Did not copy in my project. Thank you very much for such a quick support!
cdylib is not a real extension, dynamic libraries have had the extension .dylib on macOS by convention (or none when inside a Framework bundle) for decades.