Commit d166ac94 authored by Ben Dean-Kawamura's avatar Ben Dean-Kawamura Committed by bdeankawamura@mozilla.com
Browse files

Bug 1955298 - uniffi-bindgen-gecko-js: start using the IR pipeline,...

Bug 1955298 - uniffi-bindgen-gecko-js: start using the IR pipeline, r=markh,frontend-codestyle-reviewers

Updated the uniffi-bindgen-gecko-js code to use two things I've been
experimenting with:

* Use the IR pipeline code to generate the structs used to render the
  templates.
* A new test fixture for bindings generators.  This one targets bindings
  generators specifically, it doesn't try test the scaffolding code and
  it's not based on real-world example code.  I originally thought it
  would be a single crate, but I ended up needed 2 in order to test
  external types. (https://bugzilla.mozilla.org/show_bug.cgi?id=1948961)

Differential Revision: https://phabricator.services.mozilla.com/D242385
parent 12c18c67
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1251,6 +1251,7 @@ browser/extensions/translations/extension/
# "scaffolding" used by uniffi which isn't valid JS in its original form.
toolkit/components/uniffi-bindgen-gecko-js/src/templates/js/
toolkit/components/uniffi-bindgen-gecko-js/components/generated/*
toolkit/components/uniffi-bindgen-gecko-js/tests/generated/*

##############################################################################
# The list below is copied from ThirdPartyPaths.txt. Prettier doesn't currently
+24 −105
Original line number Diff line number Diff line
@@ -2584,7 +2584,6 @@ dependencies = [
 "gecko_logger",
 "geckoservo",
 "gkrust-uniffi-components",
 "gkrust-uniffi-fixtures",
 "gkrust_utils",
 "http_sfv",
 "idna_glue",
@@ -2635,6 +2634,7 @@ dependencies = [
 "unic-langid-ffi",
 "unicode-bidi",
 "unicode-bidi-ffi",
 "uniffi-bindgen-gecko-js-test-fixtures",
 "url",
 "viaduct",
 "webext-storage",
@@ -2657,24 +2657,6 @@ dependencies = [
 "webext-storage",
]

[[package]]
name = "gkrust-uniffi-fixtures"
version = "0.1.0"
dependencies = [
 "uniffi",
 "uniffi-example-arithmetic",
 "uniffi-example-custom-types",
 "uniffi-example-geometry",
 "uniffi-example-rondpoint",
 "uniffi-example-sprites",
 "uniffi-example-todolist",
 "uniffi-fixture-callbacks",
 "uniffi-fixture-external-types",
 "uniffi-fixture-futures",
 "uniffi-fixture-refcounts",
 "uniffi-trait-interfaces",
]

[[package]]
name = "gkrust_utils"
version = "0.1.0"
@@ -6992,101 +6974,21 @@ dependencies = [
 "clap",
 "extend",
 "heck",
 "indexmap",
 "serde",
 "textwrap",
 "toml",
 "uniffi",
 "uniffi_bindgen",
 "uniffi_pipeline",
]

[[package]]
name = "uniffi-example-arithmetic"
version = "0.22.0"
dependencies = [
 "thiserror 1.999.999",
 "uniffi",
]

[[package]]
name = "uniffi-example-custom-types"
version = "0.19.6"
dependencies = [
 "anyhow",
 "bytes",
 "serde_json",
 "uniffi",
 "url",
]

[[package]]
name = "uniffi-example-geometry"
version = "0.22.0"
dependencies = [
 "uniffi",
]

[[package]]
name = "uniffi-example-rondpoint"
version = "0.22.0"
dependencies = [
 "uniffi",
]

[[package]]
name = "uniffi-example-sprites"
version = "0.22.0"
dependencies = [
 "uniffi",
]

[[package]]
name = "uniffi-example-todolist"
version = "0.22.0"
dependencies = [
 "once_cell",
 "thiserror 1.999.999",
 "uniffi",
]

[[package]]
name = "uniffi-fixture-callbacks"
version = "0.21.0"
dependencies = [
 "thiserror 1.999.999",
 "uniffi",
]

[[package]]
name = "uniffi-fixture-external-types"
version = "0.21.0"
dependencies = [
 "thiserror 1.999.999",
 "uniffi",
 "uniffi-example-geometry",
 "uniffi-example-sprites",
]

[[package]]
name = "uniffi-fixture-futures"
version = "0.21.0"
dependencies = [
 "log",
 "moz_task",
 "uniffi",
]

[[package]]
name = "uniffi-fixture-refcounts"
version = "0.21.0"
dependencies = [
 "uniffi",
]

[[package]]
name = "uniffi-trait-interfaces"
version = "0.22.0"
name = "uniffi-bindgen-gecko-js-test-fixtures"
version = "0.29.0"
dependencies = [
 "uniffi",
 "uniffi_bindings_tests",
 "uniffi_bindings_tests_external_types",
]

[[package]]
@@ -7116,6 +7018,23 @@ dependencies = [
 "uniffi_udl",
]

[[package]]
name = "uniffi_bindings_tests"
version = "0.29.0"
dependencies = [
 "thiserror 1.999.999",
 "uniffi",
]

[[package]]
name = "uniffi_bindings_tests_external_types"
version = "0.29.0"
dependencies = [
 "thiserror 1.999.999",
 "uniffi",
 "uniffi_bindings_tests",
]

[[package]]
name = "uniffi_build"
version = "0.29.2"
+1 −0
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ rust-version = "1.82.0"
# Shared across multiple UniFFI consumers.
uniffi = "0.29.2"
uniffi_bindgen = "0.29.2"
uniffi_pipeline = "0.29.2"
# Shared across multiple application-services consumers.
rusqlite = "0.33.0"
# Shared across multiple glean consumers.
+0 −1
Original line number Diff line number Diff line
# RustContextId.sys.mjs

```{js:autoclass} RustContextId.sys.ContextIdComponent
    :members:
    :exclude-members: ContextIdComponent
+0 −1
Original line number Diff line number Diff line
# RustErrorsupport.sys.mjs

```{js:autofunction} RustErrorsupport.sys.setApplicationErrorReporter
```
```{js:autofunction} RustErrorsupport.sys.unsetApplicationErrorReporter
Loading