I've encountered a problem where:
- rusqlite will only build on macOS if the
bundled
features is not used - rusqlite will only build on Windows if the
bundled
feature is used
This isn't actually a problem per se; I just need to be able to express this in Cargo.toml
, but I'm having some trouble doing that. I tried:
[target.'cfg(windows)'.depedencies]
rusqlite = { version = "0.3.1", features = ["bundled"] }
[target.'cfg(not(windows))'.depedencies]
rusqlite = { version = "0.3.1" }
But it doesn't appear to be picking the dependencies up at all. (The rusqlite
namespace doesn't exist in the code at all). I have a [dependencies]
section as well for the common dependencies, in case that matters.
Update:
Per https://github.com/rust-lang/cargo/issues/1197 it looks like per-target features is not supported, unless one uses nightly. Assuming that we're not able to do that -- any other tips for how one would accomplish this? I realize that there's the option to generate the Cargo.toml
file from our build script, but that's the kind of hackery I was trying to get away from when choosing Rust for this particular project.