Support Rust for Thunderbird development
Categories
(Thunderbird :: Build Config, enhancement)
Tracking
(thunderbird_esr115 wontfix)
| Tracking | Status | |
|---|---|---|
| thunderbird_esr115 | --- | wontfix |
People
(Reporter: ikey, Assigned: ikey)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 1 obsolete file)
In order to facilitate more modern development practices within Thunderbird, we should enable Rust for development of both libraries and xpcom crates. In order to land this work, we require upstream support by way of elimination of RustLibrary() limits (Bug 1860246).
At minimum, we must provide:
- A custom cargo workspace within
comm-centralthat obeys themozilla-central-workspace-hackrequirements, to eliminate unnecessary rebuilds and ensure proper dependency management - Support for Rust xpcom components in Thunderbird
- Build integrations to trivially extend our own equivalent of
gkrustwith new crates + xpcom components - Simple management of the Cargo.toml - such that we can safely reuse mozilla-central crates / xpcom without requiring upstream changes to the lock file
- Easy rebase of the toml file (python script)
- Ease of development experience with Thunderbird+Rust to lower the complexity and cost of feature delivery while leveraging memory safety + other desirable oxide traits
| Assignee | ||
Comment 1•2 years ago
|
||
Add the necessary scaffolding to Thunderbird to support the build
of Rust crates + xpcom components under a dedicated workspace that
follows mozilla-central vendorered dependencies for a sane build
approach.
The included example_xpcom tree can be built to verify the machinery
but exists purely for documentation purposes, and is excluded in all
build configurations.
The new rustbird library is built and merged with gkrust by
allowing duplicate symbol definitions (ie don't error out, and use
the gkrust-defined symbols) into the final libxul, allowing us to
implement our own downstream oxidisation efforts.
Note that this work is dependent on upstream support landing for more
than one RustLibrary within the (derived) tree:
Updated•2 years ago
|
Updated•2 years ago
|
| Assignee | ||
Updated•2 years ago
|
| Assignee | ||
Comment 2•2 years ago
|
||
This (admittedly extensive) modification adds a new comm/rust directory
used to build the upstream gkrust-shared library within our newly provided
gkrust Rust library.
We also expose a new dedicated workspace and vendoring system, allowing us
to add our own dependencies within the tree, and solve the issue of having
drift in Cargo.lock from mozilla-central and comm-central.
This is a vital change to unlock Rust for Thunderbird development.
Unfortunately phab will not let us push the vendored deps as they're simply
too massive. They will need vendoring (per rust/README.md) on landing this
patch.
Updated•2 years ago
|
Comment 3•2 years ago
•
|
||
Heads up landing this patch should include (or be immediately followed by) committing the Rust vendored tree (which is too large for Phab so must be built and pushed locally). The process for this is:
- run
mach tb-rust vendor - add changes and new files in
comm/rust, as well ascomm/third_party/rustto a commit - push that alongside the two patches mentioned above (or immediately following the push that contains them)
Edit: try run as example: https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=3bc716e690d93b001ba8598c3eaa36cdb66e09b0
Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/8a0750b85f6d
Support Rust for Thunderbird development. r=rjl
https://hg.mozilla.org/comm-central/rev/71f0b3cd1905
Add vendored Rust deps. rs=me
Comment 5•2 years ago
|
||
The final patch is missing some files unfortunately. Follow-ups coming in shortly.
Comment 6•2 years ago
|
||
Comment 7•2 years ago
|
||
Depends on D196323
Pushed by daniel@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/41090156b609
Update .hgignore to allow for JetBrains .idea directories outside of root directory. r=thunderbird-build-system-reviewers,rjl
https://hg.mozilla.org/comm-central/rev/a3228aa361eb
Vendor in new application-services / Glean / UniFFI. r=thunderbird-build-system-reviewers,rjl
Updated•2 years ago
|
Description
•