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
This commit is contained in:
Ben Dean-Kawamura
2025-05-20 14:35:05 +00:00
committed by bdeankawamura@mozilla.com
parent 7d8173b3d0
commit 6e1a647b81
212 changed files with 21241 additions and 37443 deletions

129
Cargo.lock generated
View File

@@ -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"
@@ -6996,101 +6978,21 @@ dependencies = [
"clap",
"extend",
"heck",
"indexmap",
"serde",
"textwrap",
"toml",
"uniffi",
"uniffi_bindgen",
"uniffi_pipeline",
]
[[package]]
name = "uniffi-example-arithmetic"
version = "0.22.0"
name = "uniffi-bindgen-gecko-js-test-fixtures"
version = "0.29.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"
dependencies = [
"uniffi",
"uniffi_bindings_tests",
"uniffi_bindings_tests_external_types",
]
[[package]]
@@ -7120,6 +7022,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"