Skip to content

Commit c7725a7

Browse files
committed
servo: Merge #14244 - Use build script to generate binding files (from upsuper:buildtime-bindgen); r=emilio
<!-- Please describe your changes on the following line: --> This is a WIP patch to make rust-bindgen a build time dependency of style component for stylo. This should make things more automatic. I convert majority of `regen.py` to `build_gecko.rs`. It currently doesn't work on Windows, because of rust-lang/rust-bindgen#271 (it works when I fix the generated file manually, though). I haven't tested other platforms. It would break servo's CI for geckolib, because: 1. it needs libclang (which is probably easy to solve) 2. it needs `MOZ_OBJDIR` to be passed in so that it can generate bindings Manishearth emilio Do you agree with this change? Do you have suggestion for the issues above? --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: 872ec89a9c546eb05246b5047aabfc032d140eff UltraBlame original commit: 78635ebabfc9e63971829a549388d1b61a75a503
1 parent cccf27d commit c7725a7

File tree

12 files changed

+6391
-7292
lines changed

12 files changed

+6391
-7292
lines changed

servo/Cargo.lock

+1,550-306
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

servo/components/style/Cargo.toml

+47
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,16 @@ rayon
8080
unstable
8181
"
8282
]
83+
bindgen
84+
=
85+
[
86+
"
87+
libbindgen
88+
"
89+
"
90+
regex
91+
"
92+
]
8393
servo
8494
=
8595
[
@@ -538,6 +548,29 @@ build
538548
-
539549
dependencies
540550
]
551+
lazy_static
552+
=
553+
"
554+
0
555+
.
556+
2
557+
"
558+
libbindgen
559+
=
560+
{
561+
version
562+
=
563+
"
564+
0
565+
.
566+
1
567+
.
568+
1
569+
"
570+
optional
571+
=
572+
true
573+
}
541574
phf_codegen
542575
=
543576
"
@@ -547,6 +580,20 @@ phf_codegen
547580
.
548581
20
549582
"
583+
regex
584+
=
585+
{
586+
version
587+
=
588+
"
589+
0
590+
.
591+
1
592+
"
593+
optional
594+
=
595+
true
596+
}
550597
walkdir
551598
=
552599
"

servo/components/style/binding_tools/README.md

-50
Original file line numberDiff line numberDiff line change
@@ -69,53 +69,3 @@ the
6969
Rust
7070
bindings
7171
.
72-
#
73-
#
74-
regen
75-
.
76-
sh
77-
This
78-
will
79-
regenerate
80-
the
81-
bindings
82-
for
83-
the
84-
ServoBindings
85-
.
86-
h
87-
file
88-
in
89-
your
90-
gecko
91-
build
92-
.
93-
The
94-
generated
95-
bindings
96-
live
97-
in
98-
components
99-
/
100-
style
101-
/
102-
gecko_bindings
103-
/
104-
bindings
105-
.
106-
rs
107-
.
108-
For
109-
structs
110-
the
111-
bindings
112-
are
113-
in
114-
components
115-
/
116-
style
117-
/
118-
gecko_bindings
119-
/
120-
structs_
121-
*

0 commit comments

Comments
 (0)