Closed
Bug 1804078
Opened 2 years ago
Closed 3 months ago
Create non-generated module for shared UniFFI JS code
Categories
(Toolkit :: UniFFI Bindings, enhancement)
Toolkit
UniFFI Bindings
Tracking
()
RESOLVED
FIXED
142 Branch
| Tracking | Status | |
|---|---|---|
| firefox142 | --- | fixed |
People
(Reporter: bdk, Assigned: bdk)
References
Details
(Whiteboard: [fxsync-])
Attachments
(1 file)
We should create a JS module for shared UniFFI code. This module should just be static code rather than generated. This provides a few benefits:
- Reduces runtime size since each generated component can import from it.
- Makes the code easier to understand since it's regular JS, not JS mixed with template code.
- We can run the code through a JS linter.
Some things to include in this module:
- Most/all of the code in
Helpers.jsincluding:- The
FfiConverterbase class ArrayBufferDataStreamhandleRustResultUniFFIErrorandUniFFIInternalError
- The
- Some commonly used FfiConverters, especially
FfiConverterString UniFFICallbackHandlerandUniFFICallbackMethodHandler
| Assignee | ||
Updated•2 years ago
|
Whiteboard: [fxsync-]
Updated•2 years ago
|
| Assignee | ||
Comment 1•2 years ago
|
||
This is something I'd love to do for all the UniFFI bindings languages, maybe trying it out on JS could be a first step.
| Assignee | ||
Comment 2•4 months ago
|
||
Running ./mach lint revealed a bug: we needed parentheses in the
!(instanceof Uint8Array) check.
Updated•4 months ago
|
Assignee: nobody → bdeankawamura
Status: NEW → ASSIGNED
Pushed by bdeankawamura@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/e9d717fa8206
https://hg.mozilla.org/integration/autoland/rev/acc2fca04c3e
Shared UniFFI module, r=bgruber
Comment 4•3 months ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
status-firefox142:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 142 Branch
Updated•3 months ago
|
QA Whiteboard: [qa-triage-done-c143/b142]
You need to log in
before you can comment on or make changes to this bug.
Description
•