mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 19:33:18 +00:00
a55ba11b63
There were 2 issues: - I didn't finish renaming `free` to `destroy` in all places. - The code in CallbackInterfaceRuntime.sys.mjs was still expecting an ArrayBuffer with serialized arguments, rather than an array with each argument separately. The tests were passing because of a lack of typing and dumb luck. Added some more tests to hopefully avoid this in the future. There's a few other changes as well: - Moved the callbacks fixture to using proc-macros. - Added an if in the template code to avoid an `AppendElements` call with 0 elements. - Made `uniffiArgs` an `nsTArray` rather than a `Sequence`. `nsTArray` is easier to find in the docs and it's what the `Call` method expects anyways. Differential Revision: https://phabricator.services.mozilla.com/D227763 |
||
---|---|---|
.. | ||
js | ||
moz.build | ||
OwnedRustBuffer.cpp | ||
OwnedRustBuffer.h | ||
README.md | ||
ScaffoldingConverter.h | ||
UniFFICall.cpp | ||
UniFFICall.h | ||
UniFFICallbacks.cpp | ||
UniFFICallbacks.h | ||
UniFFIGeneratedScaffolding.cpp | ||
UniFFIPointer.cpp | ||
UniFFIPointer.h | ||
UniFFIPointerType.h | ||
UniFFIRust.h | ||
UniFFIScaffolding.cpp | ||
UniFFIScaffolding.h |
uniffi-js
This directory contains C++ helper code for the UniFFI Rust library (https://github.com/mozilla/uniffi-rs/).
-
UniFFIPointer.*
andUniFFIPointerType.*
implement theUniFFIPointer
WebIDL class -
UniFFI*Scaffolding.cpp
implements theUniFFIScaffolding
WebIDL class.- UniFFIGeneratedScaffolding.cpp contains the generated C++ code
- UniFFIScaffolding.cpp is a facade that wraps UniFFIFixtureScaffolding, and UniFFIGeneratedScaffolding if enabled, to implement the interface.
-
ScaffoldingConverter.h
contain helper code to convert values between JS and Rust. This is used by the generated code to make scaffolding calls. -
OwnedRustBuffer.*
implements a C++ class to help manager ownership of a RustBuffer. -
UniFFIRust.h
contains definitions for the C functions that UniFFI exports.