Open est31 opened 5 years ago
Maybe just both could be provided to users of the crate: either using the C macros (less ergonomic), or using objcopy (less portable, but getting more portable in the future).
Hmmm it seems that the llvm-tools-preview
rustup component already includes llvm-objcopy. It's available to users through the cargo-binutils crate.
Hi, I've just been pointed out the PR to ring and this is how I found this crate. It IMO solves a real problem in the Rust ecosystem that I ran into already multiple times.
As for using it, it seems quite unergonomic to me.
Apparently GNU objcopy from binutils has a feature to prefix all symbols by a given string. So for the C side: what about using that feature instead of the headers/macros/etc? Then you could essentially leave the way the C library is built alone.
Yes, Rust also targets non-gnu platforms. For these (or in general) we could use llvm-objcopy which seems to have the option to prefix symbols as well. What do you think?