If the `bluetooth` feature is enabled by default, then you will also need to pass `--no-default-features` to the `cargo build` command (and then add back any features that you *do* want). We don't currently have a way to do this through `mach build` but it would be easy to add by adding a new argument to the command here:
https://github.com/servo/servo/blob/cba47174e0b104ddb701c5b733a06509a21174dc/python/servo/build_commands.py#L116-L151 On Wed, Jun 1, 2016 at 1:53 AM, Manish Goregaokar <manishsm...@gmail.com> wrote: > It should be net/device/bluetooth. For some reason the crate is imported as > "device" instead of "devices" in net > > -Manish Goregaokar > > On Wed, Jun 1, 2016 at 1:29 PM, Dirkjan Ochtman <dirk...@ochtman.nl> > wrote: > > > On Tue, May 31, 2016 at 4:51 PM, Simon Sapin <simon.sa...@exyr.org> > wrote: > > >> It is possible currently to do `cargo build --features > > >> net/devices/nameoffeature` without polluting cargo.tomls, > > > > > > I think we can have something like this in components/servo/Cargo.toml > : > > > > > > [features] > > > no-bluetooth = ["net/devices/no-bluetooth"] > > > > FWIW, with this diff: > > > > djc@dochtman-dev servo $ git diff > > diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml > > index a0ff462..3380450 100644 > > --- a/components/servo/Cargo.toml > > +++ b/components/servo/Cargo.toml > > @@ -23,6 +23,7 @@ default = ["glutin_app", "webdriver", "max_log_level"] > > max_log_level = ["log/release_max_level_info"] > > webdriver = ["webdriver_server"] > > energy-profiling = ["profile_traits/energy-profiling"] > > +bluetooth = ["net/devices/bluetooth"] > > > > [profile.release] > > opt-level = 3 > > > > I get an error: > > > > djc@dochtman-dev servo $ ./mach build --dev --features "" > > error: Package `net v0.0.1 > > (file:///home/djc/src/servo/components/net)` does not have these > > features: `devices` > > Build completed in 0:00:00 > > > > So not sure that actually works recursively? > > > > I think having positive features ("bluetooth") is better than having > > negative features ("no-bluetooth"), so I'm checking whether I can get > > that to work cleanly. It looks like cargo doesn't really support it > > cleanly... > > > > Cheers, > > > > Dirkjan > > _______________________________________________ > > dev-servo mailing list > > dev-servo@lists.mozilla.org > > https://lists.mozilla.org/listinfo/dev-servo > > > _______________________________________________ > dev-servo mailing list > dev-servo@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-servo > _______________________________________________ dev-servo mailing list dev-servo@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-servo