On 12/20/2017 07:33 PM, google via dev-servo wrote:

I feature-gated the bluetooth support in https://github.com/fabricedesre/servo/commit/2afbaf365f6379eedf26e36a33e7cb38aba5c00a#diff-8c43e49d8f1af13938ed86125b97244c There are more changes that really needed because of rustfmt that ran when I saved files :( but look for the web-bluetooth feature.

I'd like to make several features optional, which I'll never need
and don't want on my systems (eg. bluetooth, webvr, ...).

I've already started w/ adding conditional compiles, but that doesn't
catch everything (and i don't like to patches w/ hard removals):

* IDL code generator currently processes all *.webidl files,
   no explicit lists that can be created on build options
* webidl doesn't have any preprocessor/conditional compile yet

I don't know how much of that codegen is driven by cargo vs. mach. I think cargo should let us do that properly.

* cargo seems to compile all *.rs files - no explicit lists, that
   can be made depending on features.

using #[cfg(..)] let you do that in general by selecting the modules you need.

* some code pieces (eg. function call parameters) cant be compiled
   conditionally yet

Not sure what you mean here. Can you elaborate? For sure sometimes there will be some refactoring needed (my patch should turn the IpcSender<BluetoothRequest> into Option<IpcSender<BluetoothRequest>> for instance) but that doesn't seem like a huge issue.

  Fabrice

_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to