Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to feature-gate some web apis #20475

Open
fabricedesre opened this issue Mar 29, 2018 · 0 comments
Open

Make it possible to feature-gate some web apis #20475

fabricedesre opened this issue Mar 29, 2018 · 0 comments

Comments

@fabricedesre
Copy link
Contributor

@fabricedesre fabricedesre commented Mar 29, 2018

Currently the webidl bindings are generated from component/dom/build.rs which in turn invokes cmake on components/script/CMakeLists.txt : this creates the list of all webidl interfaces as dependencies and then run a python script to finally generate the Rust bindings!

This setup makes it difficult to cleanly disable apis that we may not want in some situations, like custom embeddings or when porting to new platforms where there is eg. not yet a Bluetooth backend, or no VR support.

Instead, we should get rid of the whole cmake part, and implement the same features in component/dom/build.rs. The dependencies are simple enough that we don't really need a fully featured dependency resolver although something like https://docs.rs/solvent/0.8.1/solvent/ could be useful.

Once this first step is done and we are at parity with the current build system, we'll add a way to filter out webidls based on features. We could use a configuration file, with a syntax like:

[disable-web-bluetooth]
exclude = ["Bluetooth.webidl", "BluetoothDevice.webidl"]

Getting disabled features to build and work properly will also include some refactoring of the relevant integration.

cc @mamins1376 and @jdm

@ferjm ferjm mentioned this issue Jul 11, 2018
6 of 6 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.