Generate mp4parse-rust bindings as part of mach build
Categories
(Core :: Audio/Video: Playback, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: jbauman, Assigned: jbauman)
Details
Attachments
(1 file)
Currently the mp4parse-rust
C bindings are generated manually when the crate is updated from its GitHub source via the update-rust.sh script. This is inconsistent with other integrated rust code which specify binding generation with RunCbindgen.py
in their moz.build
files.
As a result, iterating on changes to the rust/C++ interface requires an inconvenient manual process:
- Remove the
build = false
line and add back thecbindgen
build dependency in media/mp4parse-rust/mp4parse_capi/Cargo.toml - Do a cargo build in the
mp4parse_capi
dir (sincemach build
fails witherror: no matching package named `cbindgen` found
) - Copy
media/mp4parse-rust/mp4parse_capi/include/mp4parse.h
→media/mp4parse-rust/mp4parse.h
- Revert changes to
media/mp4parse-rust/mp4parse_capi/Cargo.toml
somach build
works again mach build
Changing the binding generation process to be consistent with other code will be more convenient and less error-prone.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Now that cbindgen.toml is a required file, update-rust.sh must be
updated to avoid clobbering it.
Comment 2•4 years ago
|
||
Tried to land this on autoland but got the following:
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again. applying /tmp/tmp4MayL7 media/mp4parse-rust/mp4parse.h Hunk #1 FAILED at 2. 1 out of 1 hunk FAILED -- saving rejects to file media/mp4parse-rust/mp4parse.h.rej abort: patch command failed: exited with status 256
Assignee | ||
Comment 3•4 years ago
|
||
I rebased, so hopefully that fixes the conflict. I think it was conflicting with this change since that's the only difference I see between my two phabricator revisions.
Pushed by mgregan@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a431e44d2e6f Generate mp4parse-rust bindings as part of mach build. r=kinetik
Comment 5•4 years ago
|
||
bugherder |
Description
•