Improve Rust codegen for nsIInputStream and nsIOutputStream
Categories
(Core :: XPCOM, enhancement)
Tracking
()
People
(Reporter: fabrice, Assigned: nika)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
48 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr102+
|
Details | Review |
Currently some methods are not generated (eg. read() and readSegments() for nsIInputStream) because of complexity with mapping of c++ native types.
However there's hope, since Nika said: "nsIInputStream and nsIOutputStream may be foundational enough we could justify adding a special case for it, but I don't think there's enough demand for full custom support especially as it's a bit more complicated for Rust than C++ due to types both being used in the xpcom crate and in macros."
| Assignee | ||
Comment 1•4 years ago
|
||
This makes the logic for the rust type line up a bit more with the C++
logic for existing types, and adds support for 'char' and 'char16_t'
native types (for 'charPtr').
This specifically enables nsIInputStream::Read to be used from Rust.
Updated•4 years ago
|
Comment 3•4 years ago
•
|
||
Backed out for causing build bustages.
Backout link: https://hg.mozilla.org/integration/autoland/rev/45fe36d96c1d609c971de544719be9aa01af6063
Push with failures: https://treeherder.mozilla.org/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&revision=d4dae48f386a19e37541711fa7d50e9a050510b0
Failure log: https://treeherder.mozilla.org/logviewer?job_id=385518070&repo=autoland&lineNumber=60328
Comment 5•4 years ago
|
||
| bugherder | ||
| Assignee | ||
Updated•4 years ago
|
| Assignee | ||
Comment 6•3 years ago
|
||
Comment on attachment 9286995 [details]
Bug 1779326 - Handle a few more native types in rust-xpidl, r=#xpcom-reviewers
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Required for bug 1834862
- User impact if declined: See bug 1834862
- Fix Landed on Version: 105
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Changes to FFI type declarations, which largely allows some methods to be used in Rust which wouldn't otherwise.
Comment 7•3 years ago
|
||
Comment on attachment 9286995 [details]
Bug 1779326 - Handle a few more native types in rust-xpidl, r=#xpcom-reviewers
Approved for 102.13esr.
Comment 8•3 years ago
|
||
| bugherder uplift | ||
Description
•