servo/components/style/binding_tools
bors-servo 7e192ce644 Auto merge of #13700 - Manishearth:bindgen-testing, r=emilio
Run bindings tests with whole crate

We currently run bindgen's autogenerated `#[test]` blocks directly on the structs files.

That is, after generating them, we run `rustc --test` on them. This works fine for now, but
if you want to refer to types defined outside of these files (e.g. in https://bugzilla.mozilla.org/show_bug.cgi?id=1309165),
the tests are broken.

This puts a `cargo test -p style` in `./mach test-stylo`. I disabled doctests because they were failing (unable to find the `ns!()` and `atom!()` macros), and I couldn't figure out why -- will investigate in a later bug.

r? @emilio

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13700)
<!-- Reviewable:end -->
2016-10-12 00:14:35 -05:00
..
.gitignore Move gecko_bindings and gecko_string_cache into the style crate 2016-09-24 19:25:55 +05:30
check_bindings.py Script-generated tests for Servo_* gecko bindings 2016-10-06 16:18:54 +01:00
README.md Update README for bindgen tools 2016-09-27 18:07:30 +05:30
regen.py Auto merge of #13700 - Manishearth:bindgen-testing, r=emilio 2016-10-12 00:14:35 -05:00
regen.sh Minor cleanup to the bindgen scripts 2016-09-27 18:07:39 +05:30
regen_atoms.py Eliminate warning about unsafe references to extern static variables. 2016-10-11 14:05:27 +05:30
setup_bindgen.sh Minor cleanup to the bindgen scripts 2016-09-27 18:07:39 +05:30

Geckolib tools

This directory contains simple tools for generating the Rust bindings for stylo.

setup_bindgen.sh

This clones Servo's version of bindgen, and uses llvm-3.8 library to build it. It will then be used to generate the Rust bindings.

regen.sh

This will regenerate the bindings for the ServoBindings.h file in your gecko build. The generated bindings live in components/style/gecko_bindings/bindings.rs. For structs, the bindings are in components/style/gecko_bindings/structs_*