-
- Downloads
Bug 1766045 - Initial work for UniFFI JS bindings r=nika
Generate the C++ and JS code to handle UniFFI bindings. The WebIDL code is completely static and doesn't need to be generated. There's support for both synchronus and async functions, but we haven't decided the how we want this to be configured. In practice, almost all functions will need to be async, so for now we're just forcing all functions to be. The `uniffi-bindgen-gecko-js` crate builds the binary that generates the bindings. This binary needs to be fed a list of UDL files, the path of the .cpp file to generate, and the directory to generate .jsm files in (and also all of those arguments again, but for the test fixtures). This is quiet a horrible UI, but it's going to be wrapped in a mach command. The `uniffi-js` directory contains shared C++ code for `uniffi-bindgen-gecko-js`. As much as possible we tried to put the functionality here and have the generated code simply forward function calls here. Still Todo: - CallbackInterfaces - Custom and external types - Datetime and TimeInterval Differential Revision: https://phabricator.services.mozilla.com/D144472
Showing
- .clang-format-ignore 6 additions, 0 deletions.clang-format-ignore
- .eslintignore 3 additions, 0 deletions.eslintignore
- Cargo.toml 1 addition, 0 deletionsCargo.toml
- dom/chrome-webidl/UniFFI.webidl 59 additions, 0 deletionsdom/chrome-webidl/UniFFI.webidl
- dom/chrome-webidl/moz.build 1 addition, 0 deletionsdom/chrome-webidl/moz.build
- toolkit/components/moz.build 1 addition, 0 deletionstoolkit/components/moz.build
- toolkit/components/uniffi-bindgen-gecko-js/Cargo.toml 19 additions, 0 deletionstoolkit/components/uniffi-bindgen-gecko-js/Cargo.toml
- toolkit/components/uniffi-bindgen-gecko-js/askama.toml 2 additions, 0 deletionstoolkit/components/uniffi-bindgen-gecko-js/askama.toml
- toolkit/components/uniffi-bindgen-gecko-js/src/ci_list.rs 139 additions, 0 deletionstoolkit/components/uniffi-bindgen-gecko-js/src/ci_list.rs
- toolkit/components/uniffi-bindgen-gecko-js/src/lib.rs 123 additions, 0 deletionstoolkit/components/uniffi-bindgen-gecko-js/src/lib.rs
- toolkit/components/uniffi-bindgen-gecko-js/src/main.rs 9 additions, 0 deletionstoolkit/components/uniffi-bindgen-gecko-js/src/main.rs
- toolkit/components/uniffi-bindgen-gecko-js/src/render/cpp.rs 154 additions, 0 deletionstoolkit/components/uniffi-bindgen-gecko-js/src/render/cpp.rs
- toolkit/components/uniffi-bindgen-gecko-js/src/render/js.rs 232 additions, 0 deletionstoolkit/components/uniffi-bindgen-gecko-js/src/render/js.rs
- toolkit/components/uniffi-bindgen-gecko-js/src/render/mod.rs 7 additions, 0 deletionstoolkit/components/uniffi-bindgen-gecko-js/src/render/mod.rs
- toolkit/components/uniffi-bindgen-gecko-js/src/render/shared.rs 39 additions, 0 deletions...t/components/uniffi-bindgen-gecko-js/src/render/shared.rs
- toolkit/components/uniffi-bindgen-gecko-js/src/templates/UniFFIScaffolding.cpp 105 additions, 0 deletions...iffi-bindgen-gecko-js/src/templates/UniFFIScaffolding.cpp
- toolkit/components/uniffi-bindgen-gecko-js/src/templates/js/Boolean.jsm 21 additions, 0 deletions...ents/uniffi-bindgen-gecko-js/src/templates/js/Boolean.jsm
- toolkit/components/uniffi-bindgen-gecko-js/src/templates/js/Enum.jsm 103 additions, 0 deletions...ponents/uniffi-bindgen-gecko-js/src/templates/js/Enum.jsm
- toolkit/components/uniffi-bindgen-gecko-js/src/templates/js/Error.jsm 51 additions, 0 deletions...onents/uniffi-bindgen-gecko-js/src/templates/js/Error.jsm
- toolkit/components/uniffi-bindgen-gecko-js/src/templates/js/Float32.jsm 17 additions, 0 deletions...ents/uniffi-bindgen-gecko-js/src/templates/js/Float32.jsm
Loading
Please register or sign in to comment