I want to add the dependency mac_address
to my crate, that doesn't officially support the target os android
.
I observed that mac_address
compiles for android by just adding target_os = "android"
to the conditional compiling blocks of that crate.
So I forked it, made my modifications, opened a pull request and I'm currently using this dependency from my forked git repository, not as a crate on crates.io like so:
[dependencies]
my_dep = { git = "https://github.com/myself/my_dep" }
No problems so far.
My problem is that now I'm planning to publish my crate on crates.io and for doing so I need to exclusively use crates from crates.io.
My question is: is there a way to tell cargo to compile mac_address
while mimicking to be a different target_os? Or more generally can I specify to cargo to treat my system as a different target_os?
I tried using cargo --config 'target_os="linux"' build
but without success