Files
tubestation/toolkit/components/uniffi-js
Ben Dean-Kawamura 69ae7d9fef Bug 1938588 - Fixing external object support, r=markh
Added code to check if a pointer type is for an external type and if so,
use the correct namespace.

It doesn't feel great to me to iterate over all external types for this.
Also the `crate_name_to_namespace` function seems hacky.  I hope to fix
this soon, maybe once the UniFFI bindgen pipline changes are merged and
vendored in.

Refactored some of the test crates to use proc-macros, which made the
testing easier.

Differential Revision: https://phabricator.services.mozilla.com/D232770
2024-12-31 15:48:55 +00:00
..

uniffi-js

This directory contains C++ helper code for the UniFFI Rust library (https://github.com/mozilla/uniffi-rs/).

  • UniFFIPointer.* and UniFFIPointerType.* implement the UniFFIPointer WebIDL class

  • UniFFI*Scaffolding.cpp implements the UniFFIScaffolding 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.