Added rules_rust_pyo3 (#3648)

This is a contribution of https://github.com/abrisco/rules_pyo3 to
`rules_rust`.
diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml
index 9daa50e..8d2ee4a 100644
--- a/.bazelci/presubmit.yml
+++ b/.bazelci/presubmit.yml
@@ -1101,6 +1101,49 @@
       - "//..."
     test_targets:
       - "//..."
+  extensions_pyo3_linux:
+    platform: ubuntu2204
+    name: Extensions PyO3
+    working_directory: extensions/pyo3
+    build_flags: *aspects_flags
+    test_flags: *aspects_flags
+    build_targets:
+      - "//..."
+    test_targets:
+      - "//..."
+  extensions_pyo3_linux_rbe:
+    platform: rbe_ubuntu2204
+    name: Extensions PyO3
+    working_directory: extensions/pyo3
+    shell_commands:
+      - sed -i 's/^# load("@bazel_ci_rules/load("@bazel_ci_rules/' WORKSPACE.bazel
+      - sed -i 's/^# rbe_preconfig/rbe_preconfig/' WORKSPACE.bazel
+    build_flags: *aspects_flags
+    test_flags: *aspects_flags
+    build_targets:
+      - "//..."
+    test_targets:
+      - "//..."
+  extensions_pyo3_macos:
+    platform: macos_arm64
+    name: Extensions PyO3
+    working_directory: extensions/pyo3
+    build_flags: *aspects_flags
+    test_flags: *aspects_flags
+    build_targets:
+      - "//..."
+    test_targets:
+      - "//..."
+  extensions_pyo3_windows:
+    platform: windows
+    name: Extensions PyO3
+    working_directory: extensions/pyo3
+    build_flags: *aspects_flags
+    test_flags: *aspects_flags
+    build_targets:
+      - "//..."
+    test_targets:
+      - "//..."
   extensions_wasm_bindgen_linux:
     platform: ubuntu2204
     name: Extensions wasm-bindgen
diff --git a/.bcr/config.yml b/.bcr/config.yml
index 8d12fed..8857042 100644
--- a/.bcr/config.yml
+++ b/.bcr/config.yml
@@ -7,4 +7,5 @@
   - "extensions/mdbook"
   - "extensions/prost"
   - "extensions/protobuf"
+  - "extensions/pyo3"
   - "extensions/wasm_bindgen"
diff --git a/.bcr/extensions/pyo3/metadata.template.json b/.bcr/extensions/pyo3/metadata.template.json
new file mode 100644
index 0000000..295f1a0
--- /dev/null
+++ b/.bcr/extensions/pyo3/metadata.template.json
@@ -0,0 +1,23 @@
+{
+  "homepage": "https://github.com/bazelbuild/rules_rust",
+  "maintainers": [
+    {
+        "email": "26427366+UebelAndre@users.noreply.github.com",
+        "github": "UebelAndre",
+        "name": "UebelAndre"
+    },
+    {
+      "email": "1131704+illicitonion@users.noreply.github.com",
+      "github": "illicitonion",
+      "name": "Daniel Wagner-Hall"
+    },
+    {
+      "email": "11149636+scentini@users.noreply.github.com",
+      "github": "scentini",
+      "name": "Rosica Dejanovska"
+    }
+  ],
+  "repository": ["github:bazelbuild/rules_rust"],
+  "versions": [],
+  "yanked_versions": {}
+}
diff --git a/.bcr/extensions/pyo3/presubmit.yml b/.bcr/extensions/pyo3/presubmit.yml
new file mode 100644
index 0000000..6618ebb
--- /dev/null
+++ b/.bcr/extensions/pyo3/presubmit.yml
@@ -0,0 +1,12 @@
+bcr_test_module:
+  module_path: ""
+  matrix:
+    platform: ["macos_arm64", "ubuntu2004", "windows"]
+    bazel: ["7.x", "8.x"]
+  tasks:
+    run_tests:
+      name: "Run test module"
+      platform: ${{ platform }}
+      bazel: ${{ bazel }}
+      test_targets:
+        - "//..."
diff --git a/.bcr/extensions/pyo3/source.template.json b/.bcr/extensions/pyo3/source.template.json
new file mode 100644
index 0000000..8aae584
--- /dev/null
+++ b/.bcr/extensions/pyo3/source.template.json
@@ -0,0 +1,5 @@
+{
+  "integrity": "**leave this alone**",
+  "strip_prefix": "extensions/pyo3",
+  "url": "https://github.com/{OWNER}/{REPO}/releases/download/{TAG}/{REPO}-{VERSION}.tar.gz"
+}
diff --git a/.github/release_notes.template b/.github/release_notes.template
index a0127ff..fc0f6b3 100644
--- a/.github/release_notes.template
+++ b/.github/release_notes.template
@@ -103,6 +103,11 @@
 
 ```python
 bazel_dep(name = "rules_rust_protobuf", version = "{version}")
+
+register_toolchains(
+    "@rules_rust_pyo3//toolchains:toolchain",
+    "@rules_rust_pyo3//toolchains:rust_toolchain",
+)
 ```
 
 #### WORKSPACE
@@ -119,6 +124,16 @@
 
 </details>
 
+### PyO3
+
+<details>
+
+```python
+bazel_dep(name = "rules_rust_pyo3", version = "{version}")
+```
+
+</details>
+
 ### Wasm-Bindgen
 
 <details>
diff --git a/docs/BUILD.bazel b/docs/BUILD.bazel
index 4b6a8fb..27ebee5 100644
--- a/docs/BUILD.bazel
+++ b/docs/BUILD.bazel
@@ -243,6 +243,13 @@
 )
 
 stardoc(
+    name = "rust_pyo3",
+    out = "src/rust_pyo3.md",
+    input = "@rules_rust_pyo3//:defs.bzl",
+    deps = ["@rules_rust_pyo3//:bzl_lib"],
+)
+
+stardoc(
     name = "rust_wasm_bindgen",
     out = "src/rust_wasm_bindgen.md",
     input = "@rules_rust_wasm_bindgen//:defs.bzl",
@@ -283,6 +290,7 @@
         ":rust_mdbook",
         ":rust_prost",
         ":rust_protobuf",
+        ":rust_pyo3",
         ":rust_repositories",
         ":rust_settings",
         ":rust_toolchains",
diff --git a/docs/MODULE.bazel b/docs/MODULE.bazel
index b52684c..94329cc 100644
--- a/docs/MODULE.bazel
+++ b/docs/MODULE.bazel
@@ -29,6 +29,12 @@
     path = "../extensions/prost",
 )
 
+bazel_dep(name = "rules_rust_pyo3", version = "0.0.0")
+local_path_override(
+    module_name = "rules_rust_pyo3",
+    path = "../extensions/pyo3",
+)
+
 bazel_dep(name = "rules_rust_protobuf", version = "0.0.0")
 local_path_override(
     module_name = "rules_rust_protobuf",
diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md
index 793f9bd..f84a9f4 100644
--- a/docs/src/SUMMARY.md
+++ b/docs/src/SUMMARY.md
@@ -27,4 +27,5 @@
     - [mdbook](./rust_mdbook.md)
     - [prost](./rust_prost.md)
     - [protobuf](./rust_protobuf.md)
+    - [pyo3](./rust_pyo3.md)
     - [wasm_bindgen](./rust_wasm_bindgen.md)
diff --git a/docs/src/rules.md b/docs/src/rules.md
index 1140730..c8e9f86 100644
--- a/docs/src/rules.md
+++ b/docs/src/rules.md
@@ -16,4 +16,5 @@
 - [rust_bindgen](rust_bindgen.md): rules for generating C++ bindings.
 - [rust_prost](rust_prost.md): rules for generating [protobuf](https://developers.google.com/protocol-buffers) and [gRPC](https://grpc.io) stubs using [prost](https://github.com/tokio-rs/prost).
 - [rust_protobuf](rust_protobuf.md): rules for generating [protobuf](https://developers.google.com/protocol-buffers) and [gRPC](https://grpc.io) stubs with [rust-protobuf](https://github.com/stepancheg/rust-protobuf/)
+- [rust_pyo3](rust_pyo3.md): Bazel rules for [PyO3](https://pyo3.rs/v0.23.4/).
 - [rust_wasm_bindgen](rust_wasm_bindgen.md): rules for generating [WebAssembly](https://www.rust-lang.org/what/wasm) bindings.
diff --git a/extensions/pyo3/.bazelignore b/extensions/pyo3/.bazelignore
new file mode 100644
index 0000000..413a58a
--- /dev/null
+++ b/extensions/pyo3/.bazelignore
@@ -0,0 +1,4 @@
+bazel-out
+bazel-testlogs
+bazel-pyo3
+bazel-bin
diff --git a/extensions/pyo3/.bazelrc b/extensions/pyo3/.bazelrc
new file mode 100644
index 0000000..1e36b9b
--- /dev/null
+++ b/extensions/pyo3/.bazelrc
@@ -0,0 +1,92 @@
+###############################################################################
+## Bazel Configuration Flags
+##
+## `.bazelrc` is a Bazel configuration file.
+## https://bazel.build/docs/best-practices#bazelrc-file
+###############################################################################
+
+# https://bazel.build/reference/command-line-reference#flag--enable_platform_specific_config
+common --enable_platform_specific_config
+
+# Enable the only currently supported report type
+# https://bazel.build/reference/command-line-reference#flag--combined_report
+coverage --combined_report=lcov
+
+# Avoid fully cached builds reporting no coverage and failing CI
+# https://bazel.build/reference/command-line-reference#flag--experimental_fetch_all_coverage_outputs
+coverage --experimental_fetch_all_coverage_outputs
+
+# Disable network access in the sandbox by default.
+build --sandbox_default_allow_network=false
+
+# Do not use the host detected python toolchain. Always use one explicitly
+# registered in the WORKSPACE.
+common --repo_env=BAZEL_DO_NOT_DETECT_PYTHON_TOOLCHAIN=1
+
+# # Enable rustfmt for all targets in the workspace
+build --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect
+build:rustfmt --output_groups=+rustfmt_checks
+build:no_rustfmt --output_groups=-rustfmt_checks
+
+# Enable clippy for all targets in the workspace
+build --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect
+build:clippy --output_groups=+clippy_checks
+build:no_clippy --output_groups=-clippy_checks
+
+# Enable unpretty for all targets in the workspace
+build:unpretty --aspects=@rules_rust//rust:defs.bzl%rust_unpretty_aspect
+build:unpretty --output_groups=+rust_unpretty
+
+# `unpretty` requires the nightly toolchain. See tracking issue:
+# https://github.com/rust-lang/rust/issues/43364
+build:unpretty --config=nightly
+
+# Convenience configs for enabling linting and formatting
+build:strict --config=rustfmt
+build:strict --config=clippy
+build:no_strict --config=no_rustfmt
+build:no_strict --config=no_clippy
+
+# When running test enable all linters and formatters
+test --config=strict
+
+###############################################################################
+## Incompatibility flags
+###############################################################################
+
+# https://github.com/bazelbuild/bazel/issues/8195
+build --incompatible_disallow_empty_glob=true
+
+# https://github.com/bazelbuild/bazel/issues/12821
+build --nolegacy_external_runfiles
+
+# Required for cargo_build_script support before Bazel 7
+build --incompatible_merge_fixed_and_default_shell_env
+
+# Disable legacy __init__.py behavior which is known to conflict with
+# modern python versions (3.9+)
+build --incompatible_default_to_explicit_init_py
+
+###############################################################################
+## Bzlmod
+###############################################################################
+
+# A configuration for disabling bzlmod.
+common:no-bzlmod --noenable_bzlmod --enable_workspace
+
+# Disable the bzlmod lockfile, so we don't accidentally commit MODULE.bazel.lock
+common --lockfile_mode=off
+
+# Allow bazel configuration flags to locate the core rules to avoid adding local
+# override paths to the `MODULE.bazel` file and breaking downstream consumers.
+common --override_module=rules_rust=../../
+
+###############################################################################
+## Custom user flags
+##
+## This should always be the last thing in the `.bazelrc` file to ensure
+## consistent behavior when setting flags in that file as `.bazelrc` files are
+## evaluated top to bottom.
+###############################################################################
+
+try-import %workspace%/user.bazelrc
diff --git a/extensions/pyo3/.gitignore b/extensions/pyo3/.gitignore
new file mode 100644
index 0000000..777e0ae
--- /dev/null
+++ b/extensions/pyo3/.gitignore
@@ -0,0 +1,10 @@
+# Git ignore patterns
+
+/bazel-*
+user.bazelrc
+
+/*venv*/
+/.vscode/
+
+/rust-project.json
+/target
diff --git a/extensions/pyo3/3rdparty/BUILD.bazel b/extensions/pyo3/3rdparty/BUILD.bazel
new file mode 100644
index 0000000..4d5396e
--- /dev/null
+++ b/extensions/pyo3/3rdparty/BUILD.bazel
@@ -0,0 +1,78 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_vendor")
+
+crates_vendor(
+    name = "crates_vendor",
+    annotations = {
+        "pyo3-build-config": [
+            crate.annotation(
+                build_script_data = [
+                    "@rules_rust_pyo3//:current_pyo3_toolchain",
+                ],
+                build_script_env = {
+                    "PYO3_CROSS": "$(PYO3_CROSS)",
+                    "PYO3_CROSS_LIB_DIR": "$(PYO3_CROSS_LIB_DIR)",
+                    "PYO3_CROSS_PYTHON_IMPLEMENTATION": "$(PYO3_CROSS_PYTHON_IMPLEMENTATION)",
+                    "PYO3_CROSS_PYTHON_VERSION": "$(PYO3_CROSS_PYTHON_VERSION)",
+                    "PYO3_NO_PYTHON": "$(PYO3_NO_PYTHON)",
+                    "PYO3_PYTHON": "$(PYO3_PYTHON)",
+                },
+                build_script_toolchains = [
+                    "@rules_rust_pyo3//:current_pyo3_toolchain",
+                ],
+                patch_args = ["-p1"],
+                patches = ["@rules_rust_pyo3//3rdparty/patches:resolve_cross_compile_config_path.patch"],
+            ),
+        ],
+        "pyo3-ffi": [
+            crate.annotation(
+                build_script_data = [
+                    "@rules_rust_pyo3//:current_pyo3_toolchain",
+                ],
+                build_script_env = {
+                    "PYO3_CROSS": "$(PYO3_CROSS)",
+                    "PYO3_CROSS_LIB_DIR": "$(PYO3_CROSS_LIB_DIR)",
+                    "PYO3_CROSS_PYTHON_IMPLEMENTATION": "$(PYO3_CROSS_PYTHON_IMPLEMENTATION)",
+                    "PYO3_CROSS_PYTHON_VERSION": "$(PYO3_CROSS_PYTHON_VERSION)",
+                    "PYO3_NO_PYTHON": "$(PYO3_NO_PYTHON)",
+                    "PYO3_PYTHON": "$(PYO3_PYTHON)",
+                },
+                build_script_toolchains = [
+                    "@rules_rust_pyo3//:current_pyo3_toolchain",
+                ],
+            ),
+        ],
+    },
+    cargo_lockfile = "Cargo.Bazel.lock",
+    mode = "remote",
+    packages = {
+        "pyo3": crate.spec(
+            features = [
+                "abi3",
+                "abi3-py311",
+                "extension-module",
+                "experimental-inspect",
+            ],
+            version = "0.26.0",
+        ),
+        "pyo3-ffi": crate.spec(
+            version = "0.26.0",
+        ),
+        "pyo3-introspection": crate.spec(
+            version = "0.26.0",
+        ),
+    },
+    # Name is short to avoid windows paths being too long
+    # https://github.com/bazelbuild/rules_rust/issues/1120
+    repository_name = "rpyo3c",
+    tags = ["manual"],
+)
+
+bzl_library(
+    name = "bzl_lib",
+    srcs = [
+        "//3rdparty/crates:crates.bzl",
+        "//3rdparty/crates:defs.bzl",
+    ],
+    visibility = ["//:__pkg__"],
+)
diff --git a/extensions/pyo3/3rdparty/Cargo.Bazel.lock b/extensions/pyo3/3rdparty/Cargo.Bazel.lock
new file mode 100644
index 0000000..5848cd5
--- /dev/null
+++ b/extensions/pyo3/3rdparty/Cargo.Bazel.lock
@@ -0,0 +1,288 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "anyhow"
+version = "1.0.100"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
+
+[[package]]
+name = "autocfg"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
+
+[[package]]
+name = "direct-cargo-bazel-deps"
+version = "0.0.1"
+dependencies = [
+ "pyo3",
+ "pyo3-ffi",
+ "pyo3-introspection",
+]
+
+[[package]]
+name = "goblin"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6a80adfd63bd7ffd94fefc3d22167880c440a724303080e5aa686fa36abaa96"
+dependencies = [
+ "log",
+ "plain",
+ "scroll",
+]
+
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "indoc"
+version = "2.0.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd"
+
+[[package]]
+name = "itoa"
+version = "1.0.15"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
+
+[[package]]
+name = "libc"
+version = "0.2.176"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174"
+
+[[package]]
+name = "log"
+version = "0.4.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
+
+[[package]]
+name = "memchr"
+version = "2.7.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
+
+[[package]]
+name = "memoffset"
+version = "0.9.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.21.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
+
+[[package]]
+name = "plain"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"
+
+[[package]]
+name = "portable-atomic"
+version = "1.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.101"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "pyo3"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ba0117f4212101ee6544044dae45abe1083d30ce7b29c4b5cbdfa2354e07383"
+dependencies = [
+ "indoc",
+ "libc",
+ "memoffset",
+ "once_cell",
+ "portable-atomic",
+ "pyo3-build-config",
+ "pyo3-ffi",
+ "pyo3-macros",
+ "unindent",
+]
+
+[[package]]
+name = "pyo3-build-config"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fc6ddaf24947d12a9aa31ac65431fb1b851b8f4365426e182901eabfb87df5f"
+dependencies = [
+ "target-lexicon",
+]
+
+[[package]]
+name = "pyo3-ffi"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "025474d3928738efb38ac36d4744a74a400c901c7596199e20e45d98eb194105"
+dependencies = [
+ "libc",
+ "pyo3-build-config",
+]
+
+[[package]]
+name = "pyo3-introspection"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c3470294ce4d56fa74c996e4244ec3ac04db0c621975993e62ff725844ab509"
+dependencies = [
+ "anyhow",
+ "goblin",
+ "serde",
+ "serde_json",
+ "unicode-ident",
+]
+
+[[package]]
+name = "pyo3-macros"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2e64eb489f22fe1c95911b77c44cc41e7c19f3082fc81cce90f657cdc42ffded"
+dependencies = [
+ "proc-macro2",
+ "pyo3-macros-backend",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "pyo3-macros-backend"
+version = "0.26.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "100246c0ecf400b475341b8455a9213344569af29a3c841d29270e53102e0fcf"
+dependencies = [
+ "heck",
+ "proc-macro2",
+ "pyo3-build-config",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.41"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
+
+[[package]]
+name = "scroll"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1257cd4248b4132760d6524d6dda4e053bc648c9070b960929bf50cfb1e7add"
+dependencies = [
+ "scroll_derive",
+]
+
+[[package]]
+name = "scroll_derive"
+version = "0.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed76efe62313ab6610570951494bdaa81568026e0318eaa55f167de70eeea67d"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.228"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
+dependencies = [
+ "serde_core",
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_core"
+version = "1.0.228"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.228"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.145"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
+dependencies = [
+ "itoa",
+ "memchr",
+ "ryu",
+ "serde",
+ "serde_core",
+]
+
+[[package]]
+name = "syn"
+version = "2.0.106"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "target-lexicon"
+version = "0.13.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d"
+
+[[package]]
+name = "unindent"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.anyhow-1.0.100.bazel b/extensions/pyo3/3rdparty/crates/BUILD.anyhow-1.0.100.bazel
new file mode 100644
index 0000000..3c2d53a
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.anyhow-1.0.100.bazel
@@ -0,0 +1,169 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+    "cargo_toml_env_vars",
+)
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "anyhow",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+        "std",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2018",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=anyhow",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "1.0.100",
+    deps = [
+        "@rpyo3c__anyhow-1.0.100//:build_script_build",
+    ],
+)
+
+cargo_build_script(
+    name = "_bs",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            "**/*.rs",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+        "std",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    edition = "2018",
+    pkg_name = "anyhow",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=anyhow",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "1.0.100",
+    visibility = ["//visibility:private"],
+)
+
+alias(
+    name = "build_script_build",
+    actual = ":_bs",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.autocfg-1.5.0.bazel b/extensions/pyo3/3rdparty/crates/BUILD.autocfg-1.5.0.bazel
new file mode 100644
index 0000000..31963b8
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.autocfg-1.5.0.bazel
@@ -0,0 +1,96 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "autocfg",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_root = "src/lib.rs",
+    edition = "2015",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=autocfg",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "1.5.0",
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.bazel b/extensions/pyo3/3rdparty/crates/BUILD.bazel
new file mode 100644
index 0000000..b28d1f5
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.bazel
@@ -0,0 +1,68 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+package(default_visibility = ["//visibility:public"])
+
+exports_files(
+    [
+        "cargo-bazel.json",
+        "crates.bzl",
+        "defs.bzl",
+    ] + glob(
+        include = ["*.bazel"],
+        allow_empty = True,
+    ),
+)
+
+filegroup(
+    name = "srcs",
+    srcs = glob(
+        include = [
+            "*.bazel",
+            "*.bzl",
+        ],
+        allow_empty = True,
+    ),
+)
+
+# Workspace Member Dependencies
+alias(
+    name = "pyo3-0.26.0",
+    actual = "@rpyo3c__pyo3-0.26.0//:pyo3",
+    tags = ["manual"],
+)
+
+alias(
+    name = "pyo3",
+    actual = "@rpyo3c__pyo3-0.26.0//:pyo3",
+    tags = ["manual"],
+)
+
+alias(
+    name = "pyo3-ffi-0.26.0",
+    actual = "@rpyo3c__pyo3-ffi-0.26.0//:pyo3_ffi",
+    tags = ["manual"],
+)
+
+alias(
+    name = "pyo3-ffi",
+    actual = "@rpyo3c__pyo3-ffi-0.26.0//:pyo3_ffi",
+    tags = ["manual"],
+)
+
+alias(
+    name = "pyo3-introspection-0.26.0",
+    actual = "@rpyo3c__pyo3-introspection-0.26.0//:pyo3_introspection",
+    tags = ["manual"],
+)
+
+alias(
+    name = "pyo3-introspection",
+    actual = "@rpyo3c__pyo3-introspection-0.26.0//:pyo3_introspection",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.goblin-0.10.1.bazel b/extensions/pyo3/3rdparty/crates/BUILD.goblin-0.10.1.bazel
new file mode 100644
index 0000000..66528cc
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.goblin-0.10.1.bazel
@@ -0,0 +1,116 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "goblin",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "alloc",
+        "archive",
+        "default",
+        "elf32",
+        "elf64",
+        "endian_fd",
+        "log",
+        "mach32",
+        "mach64",
+        "pe32",
+        "pe64",
+        "std",
+        "te",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2024",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=goblin",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.10.1",
+    deps = [
+        "@rpyo3c__log-0.4.28//:log",
+        "@rpyo3c__plain-0.2.3//:plain",
+        "@rpyo3c__scroll-0.13.0//:scroll",
+    ],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.heck-0.5.0.bazel b/extensions/pyo3/3rdparty/crates/BUILD.heck-0.5.0.bazel
new file mode 100644
index 0000000..b2c32a9
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.heck-0.5.0.bazel
@@ -0,0 +1,96 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "heck",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=heck",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.5.0",
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.indoc-2.0.6.bazel b/extensions/pyo3/3rdparty/crates/BUILD.indoc-2.0.6.bazel
new file mode 100644
index 0000000..aa2b32f
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.indoc-2.0.6.bazel
@@ -0,0 +1,96 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_proc_macro")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_proc_macro(
+    name = "indoc",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=indoc",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "2.0.6",
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.itoa-1.0.15.bazel b/extensions/pyo3/3rdparty/crates/BUILD.itoa-1.0.15.bazel
new file mode 100644
index 0000000..f5cb4ec
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.itoa-1.0.15.bazel
@@ -0,0 +1,96 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "itoa",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_root = "src/lib.rs",
+    edition = "2018",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=itoa",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "1.0.15",
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.libc-0.2.176.bazel b/extensions/pyo3/3rdparty/crates/BUILD.libc-0.2.176.bazel
new file mode 100644
index 0000000..fcf956d
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.libc-0.2.176.bazel
@@ -0,0 +1,169 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+    "cargo_toml_env_vars",
+)
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "libc",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+        "std",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=libc",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.2.176",
+    deps = [
+        "@rpyo3c__libc-0.2.176//:build_script_build",
+    ],
+)
+
+cargo_build_script(
+    name = "_bs",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            "**/*.rs",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+        "std",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    edition = "2021",
+    pkg_name = "libc",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=libc",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "0.2.176",
+    visibility = ["//visibility:private"],
+)
+
+alias(
+    name = "build_script_build",
+    actual = ":_bs",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.log-0.4.28.bazel b/extensions/pyo3/3rdparty/crates/BUILD.log-0.4.28.bazel
new file mode 100644
index 0000000..fc0d889
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.log-0.4.28.bazel
@@ -0,0 +1,96 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "log",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=log",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.4.28",
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.memchr-2.7.6.bazel b/extensions/pyo3/3rdparty/crates/BUILD.memchr-2.7.6.bazel
new file mode 100644
index 0000000..332888f
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.memchr-2.7.6.bazel
@@ -0,0 +1,100 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "memchr",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "alloc",
+        "std",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=memchr",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "2.7.6",
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.memoffset-0.9.1.bazel b/extensions/pyo3/3rdparty/crates/BUILD.memoffset-0.9.1.bazel
new file mode 100644
index 0000000..8b3f338
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.memoffset-0.9.1.bazel
@@ -0,0 +1,170 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+    "cargo_toml_env_vars",
+)
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "memoffset",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2015",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=memoffset",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.9.1",
+    deps = [
+        "@rpyo3c__memoffset-0.9.1//:build_script_build",
+    ],
+)
+
+cargo_build_script(
+    name = "_bs",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            "**/*.rs",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    edition = "2015",
+    pkg_name = "memoffset",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=memoffset",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "0.9.1",
+    visibility = ["//visibility:private"],
+    deps = [
+        "@rpyo3c__autocfg-1.5.0//:autocfg",
+    ],
+)
+
+alias(
+    name = "build_script_build",
+    actual = ":_bs",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.once_cell-1.21.3.bazel b/extensions/pyo3/3rdparty/crates/BUILD.once_cell-1.21.3.bazel
new file mode 100644
index 0000000..2e21cff
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.once_cell-1.21.3.bazel
@@ -0,0 +1,102 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "once_cell",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "alloc",
+        "default",
+        "race",
+        "std",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=once_cell",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "1.21.3",
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.plain-0.2.3.bazel b/extensions/pyo3/3rdparty/crates/BUILD.plain-0.2.3.bazel
new file mode 100644
index 0000000..2a1b5da
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.plain-0.2.3.bazel
@@ -0,0 +1,96 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "plain",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_root = "src/lib.rs",
+    edition = "2015",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=plain",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.2.3",
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.portable-atomic-1.11.1.bazel b/extensions/pyo3/3rdparty/crates/BUILD.portable-atomic-1.11.1.bazel
new file mode 100644
index 0000000..2fda768
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.portable-atomic-1.11.1.bazel
@@ -0,0 +1,169 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+    "cargo_toml_env_vars",
+)
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "portable_atomic",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+        "fallback",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2018",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=portable-atomic",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "1.11.1",
+    deps = [
+        "@rpyo3c__portable-atomic-1.11.1//:build_script_build",
+    ],
+)
+
+cargo_build_script(
+    name = "_bs",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            "**/*.rs",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+        "fallback",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    edition = "2018",
+    pkg_name = "portable-atomic",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=portable-atomic",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "1.11.1",
+    visibility = ["//visibility:private"],
+)
+
+alias(
+    name = "build_script_build",
+    actual = ":_bs",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.proc-macro2-1.0.101.bazel b/extensions/pyo3/3rdparty/crates/BUILD.proc-macro2-1.0.101.bazel
new file mode 100644
index 0000000..477eb02
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.proc-macro2-1.0.101.bazel
@@ -0,0 +1,170 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+    "cargo_toml_env_vars",
+)
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "proc_macro2",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+        "proc-macro",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=proc-macro2",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "1.0.101",
+    deps = [
+        "@rpyo3c__proc-macro2-1.0.101//:build_script_build",
+        "@rpyo3c__unicode-ident-1.0.19//:unicode_ident",
+    ],
+)
+
+cargo_build_script(
+    name = "_bs",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            "**/*.rs",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+        "proc-macro",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    edition = "2021",
+    pkg_name = "proc-macro2",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=proc-macro2",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "1.0.101",
+    visibility = ["//visibility:private"],
+)
+
+alias(
+    name = "build_script_build",
+    actual = ":_bs",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.pyo3-0.26.0.bazel b/extensions/pyo3/3rdparty/crates/BUILD.pyo3-0.26.0.bazel
new file mode 100644
index 0000000..5949457
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.pyo3-0.26.0.bazel
@@ -0,0 +1,218 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+    "cargo_toml_env_vars",
+)
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "pyo3",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "abi3",
+        "abi3-py311",
+        "abi3-py312",
+        "abi3-py313",
+        "abi3-py314",
+        "default",
+        "experimental-inspect",
+        "extension-module",
+        "indoc",
+        "macros",
+        "pyo3-macros",
+        "unindent",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    proc_macro_deps = [
+        "@rpyo3c__indoc-2.0.6//:indoc",
+        "@rpyo3c__pyo3-macros-0.26.0//:pyo3_macros",
+    ],
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=pyo3",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.26.0",
+    deps = [
+        "@rpyo3c__libc-0.2.176//:libc",
+        "@rpyo3c__memoffset-0.9.1//:memoffset",
+        "@rpyo3c__once_cell-1.21.3//:once_cell",
+        "@rpyo3c__pyo3-0.26.0//:build_script_build",
+        "@rpyo3c__pyo3-ffi-0.26.0//:pyo3_ffi",
+        "@rpyo3c__unindent-0.2.4//:unindent",
+    ] + select({
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [
+            "@rpyo3c__portable-atomic-1.11.1//:portable_atomic",  # cfg(not(target_has_atomic = "64"))
+        ],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [
+            "@rpyo3c__portable-atomic-1.11.1//:portable_atomic",  # cfg(not(target_has_atomic = "64"))
+        ],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [
+            "@rpyo3c__portable-atomic-1.11.1//:portable_atomic",  # cfg(not(target_has_atomic = "64"))
+        ],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [
+            "@rpyo3c__portable-atomic-1.11.1//:portable_atomic",  # cfg(not(target_has_atomic = "64"))
+        ],
+        "//conditions:default": [],
+    }),
+)
+
+cargo_build_script(
+    name = "_bs",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            "**/*.rs",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "abi3",
+        "abi3-py311",
+        "abi3-py312",
+        "abi3-py313",
+        "abi3-py314",
+        "default",
+        "experimental-inspect",
+        "extension-module",
+        "indoc",
+        "macros",
+        "pyo3-macros",
+        "unindent",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    edition = "2021",
+    link_deps = [
+        "@rpyo3c__pyo3-ffi-0.26.0//:pyo3_ffi",
+    ],
+    pkg_name = "pyo3",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=pyo3",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "0.26.0",
+    visibility = ["//visibility:private"],
+    deps = [
+        "@rpyo3c__pyo3-build-config-0.26.0//:pyo3_build_config",
+    ],
+)
+
+alias(
+    name = "build_script_build",
+    actual = ":_bs",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.pyo3-build-config-0.26.0.bazel b/extensions/pyo3/3rdparty/crates/BUILD.pyo3-build-config-0.26.0.bazel
new file mode 100644
index 0000000..9b50d88
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.pyo3-build-config-0.26.0.bazel
@@ -0,0 +1,196 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+    "cargo_toml_env_vars",
+)
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "pyo3_build_config",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "abi3",
+        "abi3-py311",
+        "abi3-py312",
+        "abi3-py313",
+        "abi3-py314",
+        "default",
+        "extension-module",
+        "resolve-config",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=pyo3-build-config",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.26.0",
+    deps = [
+        "@rpyo3c__pyo3-build-config-0.26.0//:build_script_build",
+        "@rpyo3c__target-lexicon-0.13.3//:target_lexicon",
+    ],
+)
+
+cargo_build_script(
+    name = "_bs",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    build_script_env = {
+        "PYO3_CROSS": "$(PYO3_CROSS)",
+        "PYO3_CROSS_LIB_DIR": "$(PYO3_CROSS_LIB_DIR)",
+        "PYO3_CROSS_PYTHON_IMPLEMENTATION": "$(PYO3_CROSS_PYTHON_IMPLEMENTATION)",
+        "PYO3_CROSS_PYTHON_VERSION": "$(PYO3_CROSS_PYTHON_VERSION)",
+        "PYO3_NO_PYTHON": "$(PYO3_NO_PYTHON)",
+        "PYO3_PYTHON": "$(PYO3_PYTHON)",
+    },
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            "**/*.rs",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "abi3",
+        "abi3-py311",
+        "abi3-py312",
+        "abi3-py313",
+        "abi3-py314",
+        "default",
+        "extension-module",
+        "resolve-config",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ) + [
+        "@rules_rust_pyo3//:current_pyo3_toolchain",
+    ],
+    edition = "2021",
+    pkg_name = "pyo3-build-config",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=pyo3-build-config",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    toolchains = ["@rules_rust_pyo3//:current_pyo3_toolchain"],
+    version = "0.26.0",
+    visibility = ["//visibility:private"],
+    deps = [
+        "@rpyo3c__target-lexicon-0.13.3//:target_lexicon",
+    ],
+)
+
+alias(
+    name = "build_script_build",
+    actual = ":_bs",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.pyo3-ffi-0.26.0.bazel b/extensions/pyo3/3rdparty/crates/BUILD.pyo3-ffi-0.26.0.bazel
new file mode 100644
index 0000000..206d161
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.pyo3-ffi-0.26.0.bazel
@@ -0,0 +1,195 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+    "cargo_toml_env_vars",
+)
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "pyo3_ffi",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "abi3",
+        "abi3-py311",
+        "abi3-py312",
+        "abi3-py313",
+        "abi3-py314",
+        "default",
+        "extension-module",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=pyo3-ffi",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.26.0",
+    deps = [
+        "@rpyo3c__libc-0.2.176//:libc",
+        "@rpyo3c__pyo3-ffi-0.26.0//:build_script_build",
+    ],
+)
+
+cargo_build_script(
+    name = "_bs",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    build_script_env = {
+        "PYO3_CROSS": "$(PYO3_CROSS)",
+        "PYO3_CROSS_LIB_DIR": "$(PYO3_CROSS_LIB_DIR)",
+        "PYO3_CROSS_PYTHON_IMPLEMENTATION": "$(PYO3_CROSS_PYTHON_IMPLEMENTATION)",
+        "PYO3_CROSS_PYTHON_VERSION": "$(PYO3_CROSS_PYTHON_VERSION)",
+        "PYO3_NO_PYTHON": "$(PYO3_NO_PYTHON)",
+        "PYO3_PYTHON": "$(PYO3_PYTHON)",
+    },
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            "**/*.rs",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "abi3",
+        "abi3-py311",
+        "abi3-py312",
+        "abi3-py313",
+        "abi3-py314",
+        "default",
+        "extension-module",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ) + [
+        "@rules_rust_pyo3//:current_pyo3_toolchain",
+    ],
+    edition = "2021",
+    links = "python",
+    pkg_name = "pyo3-ffi",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=pyo3-ffi",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    toolchains = ["@rules_rust_pyo3//:current_pyo3_toolchain"],
+    version = "0.26.0",
+    visibility = ["//visibility:private"],
+    deps = [
+        "@rpyo3c__pyo3-build-config-0.26.0//:pyo3_build_config",
+    ],
+)
+
+alias(
+    name = "build_script_build",
+    actual = ":_bs",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.pyo3-introspection-0.26.0.bazel b/extensions/pyo3/3rdparty/crates/BUILD.pyo3-introspection-0.26.0.bazel
new file mode 100644
index 0000000..b838365
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.pyo3-introspection-0.26.0.bazel
@@ -0,0 +1,103 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "pyo3_introspection",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=pyo3-introspection",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.26.0",
+    deps = [
+        "@rpyo3c__anyhow-1.0.100//:anyhow",
+        "@rpyo3c__goblin-0.10.1//:goblin",
+        "@rpyo3c__serde-1.0.228//:serde",
+        "@rpyo3c__serde_json-1.0.145//:serde_json",
+        "@rpyo3c__unicode-ident-1.0.19//:unicode_ident",
+    ],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.pyo3-macros-0.26.0.bazel b/extensions/pyo3/3rdparty/crates/BUILD.pyo3-macros-0.26.0.bazel
new file mode 100644
index 0000000..6df5935
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.pyo3-macros-0.26.0.bazel
@@ -0,0 +1,105 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_proc_macro")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_proc_macro(
+    name = "pyo3_macros",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "experimental-inspect",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=pyo3-macros",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.26.0",
+    deps = [
+        "@rpyo3c__proc-macro2-1.0.101//:proc_macro2",
+        "@rpyo3c__pyo3-macros-backend-0.26.0//:pyo3_macros_backend",
+        "@rpyo3c__quote-1.0.41//:quote",
+        "@rpyo3c__syn-2.0.106//:syn",
+    ],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.pyo3-macros-backend-0.26.0.bazel b/extensions/pyo3/3rdparty/crates/BUILD.pyo3-macros-backend-0.26.0.bazel
new file mode 100644
index 0000000..d497679
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.pyo3-macros-backend-0.26.0.bazel
@@ -0,0 +1,175 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+    "cargo_toml_env_vars",
+)
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "pyo3_macros_backend",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "experimental-inspect",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=pyo3-macros-backend",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.26.0",
+    deps = [
+        "@rpyo3c__heck-0.5.0//:heck",
+        "@rpyo3c__proc-macro2-1.0.101//:proc_macro2",
+        "@rpyo3c__pyo3-build-config-0.26.0//:pyo3_build_config",
+        "@rpyo3c__pyo3-macros-backend-0.26.0//:build_script_build",
+        "@rpyo3c__quote-1.0.41//:quote",
+        "@rpyo3c__syn-2.0.106//:syn",
+    ],
+)
+
+cargo_build_script(
+    name = "_bs",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            "**/*.rs",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "experimental-inspect",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    edition = "2021",
+    pkg_name = "pyo3-macros-backend",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=pyo3-macros-backend",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "0.26.0",
+    visibility = ["//visibility:private"],
+    deps = [
+        "@rpyo3c__pyo3-build-config-0.26.0//:pyo3_build_config",
+    ],
+)
+
+alias(
+    name = "build_script_build",
+    actual = ":_bs",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.quote-1.0.41.bazel b/extensions/pyo3/3rdparty/crates/BUILD.quote-1.0.41.bazel
new file mode 100644
index 0000000..e3bd9a0
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.quote-1.0.41.bazel
@@ -0,0 +1,170 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+    "cargo_toml_env_vars",
+)
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "quote",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+        "proc-macro",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2018",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=quote",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "1.0.41",
+    deps = [
+        "@rpyo3c__proc-macro2-1.0.101//:proc_macro2",
+        "@rpyo3c__quote-1.0.41//:build_script_build",
+    ],
+)
+
+cargo_build_script(
+    name = "_bs",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            "**/*.rs",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+        "proc-macro",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    edition = "2018",
+    pkg_name = "quote",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=quote",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "1.0.41",
+    visibility = ["//visibility:private"],
+)
+
+alias(
+    name = "build_script_build",
+    actual = ":_bs",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.ryu-1.0.20.bazel b/extensions/pyo3/3rdparty/crates/BUILD.ryu-1.0.20.bazel
new file mode 100644
index 0000000..61bb772
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.ryu-1.0.20.bazel
@@ -0,0 +1,96 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "ryu",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_root = "src/lib.rs",
+    edition = "2018",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=ryu",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "1.0.20",
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.scroll-0.13.0.bazel b/extensions/pyo3/3rdparty/crates/BUILD.scroll-0.13.0.bazel
new file mode 100644
index 0000000..b7fc05e
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.scroll-0.13.0.bazel
@@ -0,0 +1,103 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "scroll",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "derive",
+        "std",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2024",
+    proc_macro_deps = [
+        "@rpyo3c__scroll_derive-0.13.1//:scroll_derive",
+    ],
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=scroll",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.13.0",
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.scroll_derive-0.13.1.bazel b/extensions/pyo3/3rdparty/crates/BUILD.scroll_derive-0.13.1.bazel
new file mode 100644
index 0000000..3e56b30
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.scroll_derive-0.13.1.bazel
@@ -0,0 +1,101 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_proc_macro")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_proc_macro(
+    name = "scroll_derive",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_root = "src/lib.rs",
+    edition = "2024",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=scroll_derive",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.13.1",
+    deps = [
+        "@rpyo3c__proc-macro2-1.0.101//:proc_macro2",
+        "@rpyo3c__quote-1.0.41//:quote",
+        "@rpyo3c__syn-2.0.106//:syn",
+    ],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.serde-1.0.228.bazel b/extensions/pyo3/3rdparty/crates/BUILD.serde-1.0.228.bazel
new file mode 100644
index 0000000..20ea394
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.serde-1.0.228.bazel
@@ -0,0 +1,177 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+    "cargo_toml_env_vars",
+)
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "serde",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+        "derive",
+        "serde_derive",
+        "std",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    proc_macro_deps = [
+        "@rpyo3c__serde_derive-1.0.228//:serde_derive",
+    ],
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=serde",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "1.0.228",
+    deps = [
+        "@rpyo3c__serde-1.0.228//:build_script_build",
+        "@rpyo3c__serde_core-1.0.228//:serde_core",
+    ],
+)
+
+cargo_build_script(
+    name = "_bs",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            "**/*.rs",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+        "derive",
+        "serde_derive",
+        "std",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    edition = "2021",
+    pkg_name = "serde",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=serde",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "1.0.228",
+    visibility = ["//visibility:private"],
+)
+
+alias(
+    name = "build_script_build",
+    actual = ":_bs",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.serde_core-1.0.228.bazel b/extensions/pyo3/3rdparty/crates/BUILD.serde_core-1.0.228.bazel
new file mode 100644
index 0000000..6d5b668
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.serde_core-1.0.228.bazel
@@ -0,0 +1,169 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+    "cargo_toml_env_vars",
+)
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "serde_core",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "result",
+        "std",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=serde_core",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "1.0.228",
+    deps = [
+        "@rpyo3c__serde_core-1.0.228//:build_script_build",
+    ],
+)
+
+cargo_build_script(
+    name = "_bs",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            "**/*.rs",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "result",
+        "std",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    edition = "2021",
+    pkg_name = "serde_core",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=serde_core",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "1.0.228",
+    visibility = ["//visibility:private"],
+)
+
+alias(
+    name = "build_script_build",
+    actual = ":_bs",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.serde_derive-1.0.228.bazel b/extensions/pyo3/3rdparty/crates/BUILD.serde_derive-1.0.228.bazel
new file mode 100644
index 0000000..4fcf128
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.serde_derive-1.0.228.bazel
@@ -0,0 +1,104 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_proc_macro")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_proc_macro(
+    name = "serde_derive",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=serde_derive",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "1.0.228",
+    deps = [
+        "@rpyo3c__proc-macro2-1.0.101//:proc_macro2",
+        "@rpyo3c__quote-1.0.41//:quote",
+        "@rpyo3c__syn-2.0.106//:syn",
+    ],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.serde_json-1.0.145.bazel b/extensions/pyo3/3rdparty/crates/BUILD.serde_json-1.0.145.bazel
new file mode 100644
index 0000000..d2ef89e
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.serde_json-1.0.145.bazel
@@ -0,0 +1,173 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+    "cargo_toml_env_vars",
+)
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "serde_json",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+        "std",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=serde_json",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "1.0.145",
+    deps = [
+        "@rpyo3c__itoa-1.0.15//:itoa",
+        "@rpyo3c__memchr-2.7.6//:memchr",
+        "@rpyo3c__ryu-1.0.20//:ryu",
+        "@rpyo3c__serde_core-1.0.228//:serde_core",
+        "@rpyo3c__serde_json-1.0.145//:build_script_build",
+    ],
+)
+
+cargo_build_script(
+    name = "_bs",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            "**/*.rs",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+        "std",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    edition = "2021",
+    pkg_name = "serde_json",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=serde_json",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "1.0.145",
+    visibility = ["//visibility:private"],
+)
+
+alias(
+    name = "build_script_build",
+    actual = ":_bs",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.syn-2.0.106.bazel b/extensions/pyo3/3rdparty/crates/BUILD.syn-2.0.106.bazel
new file mode 100644
index 0000000..9f20133
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.syn-2.0.106.bazel
@@ -0,0 +1,112 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "syn",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "clone-impls",
+        "default",
+        "derive",
+        "extra-traits",
+        "full",
+        "parsing",
+        "printing",
+        "proc-macro",
+        "visit-mut",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=syn",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "2.0.106",
+    deps = [
+        "@rpyo3c__proc-macro2-1.0.101//:proc_macro2",
+        "@rpyo3c__quote-1.0.41//:quote",
+        "@rpyo3c__unicode-ident-1.0.19//:unicode_ident",
+    ],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.target-lexicon-0.13.3.bazel b/extensions/pyo3/3rdparty/crates/BUILD.target-lexicon-0.13.3.bazel
new file mode 100644
index 0000000..4d69bc7
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.target-lexicon-0.13.3.bazel
@@ -0,0 +1,167 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load(
+    "@rules_rust//cargo:defs.bzl",
+    "cargo_build_script",
+    "cargo_toml_env_vars",
+)
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "target_lexicon",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+    ],
+    crate_root = "src/lib.rs",
+    edition = "2018",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=target-lexicon",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.13.3",
+    deps = [
+        "@rpyo3c__target-lexicon-0.13.3//:build_script_build",
+    ],
+)
+
+cargo_build_script(
+    name = "_bs",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            "**/*.rs",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_features = [
+        "default",
+    ],
+    crate_name = "build_script_build",
+    crate_root = "build.rs",
+    data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    edition = "2018",
+    pkg_name = "target-lexicon",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=target-lexicon",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    version = "0.13.3",
+    visibility = ["//visibility:private"],
+)
+
+alias(
+    name = "build_script_build",
+    actual = ":_bs",
+    tags = ["manual"],
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.unicode-ident-1.0.19.bazel b/extensions/pyo3/3rdparty/crates/BUILD.unicode-ident-1.0.19.bazel
new file mode 100644
index 0000000..8b2034d
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.unicode-ident-1.0.19.bazel
@@ -0,0 +1,96 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "unicode_ident",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_root = "src/lib.rs",
+    edition = "2018",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=unicode-ident",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "1.0.19",
+)
diff --git a/extensions/pyo3/3rdparty/crates/BUILD.unindent-0.2.4.bazel b/extensions/pyo3/3rdparty/crates/BUILD.unindent-0.2.4.bazel
new file mode 100644
index 0000000..30fe0bd
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/BUILD.unindent-0.2.4.bazel
@@ -0,0 +1,96 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+
+load("@rules_rust//cargo:defs.bzl", "cargo_toml_env_vars")
+load("@rules_rust//rust:defs.bzl", "rust_library")
+
+package(default_visibility = ["//visibility:public"])
+
+cargo_toml_env_vars(
+    name = "cargo_toml_env_vars",
+    src = "Cargo.toml",
+)
+
+rust_library(
+    name = "unindent",
+    srcs = glob(
+        include = ["**/*.rs"],
+        allow_empty = True,
+    ),
+    compile_data = glob(
+        include = ["**"],
+        allow_empty = True,
+        exclude = [
+            "**/* *",
+            ".tmp_git_root/**/*",
+            "BUILD",
+            "BUILD.bazel",
+            "WORKSPACE",
+            "WORKSPACE.bazel",
+        ],
+    ),
+    crate_root = "src/lib.rs",
+    edition = "2021",
+    rustc_env_files = [
+        ":cargo_toml_env_vars",
+    ],
+    rustc_flags = [
+        "--cap-lints=allow",
+    ],
+    tags = [
+        "cargo-bazel",
+        "crate-name=unindent",
+        "manual",
+        "noclippy",
+        "norustfmt",
+    ],
+    target_compatible_with = select({
+        "@rules_rust//rust/platform:aarch64-apple-darwin": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios": [],
+        "@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
+        "@rules_rust//rust/platform:aarch64-linux-android": [],
+        "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
+        "@rules_rust//rust/platform:aarch64-unknown-uefi": [],
+        "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:armv7-linux-androideabi": [],
+        "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
+        "@rules_rust//rust/platform:i686-apple-darwin": [],
+        "@rules_rust//rust/platform:i686-linux-android": [],
+        "@rules_rust//rust/platform:i686-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:i686-unknown-freebsd": [],
+        "@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
+        "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:thumbv7em-none-eabi": [],
+        "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
+        "@rules_rust//rust/platform:wasm32-unknown-emscripten": [],
+        "@rules_rust//rust/platform:wasm32-unknown-unknown": [],
+        "@rules_rust//rust/platform:wasm32-wasip1": [],
+        "@rules_rust//rust/platform:wasm32-wasip1-threads": [],
+        "@rules_rust//rust/platform:wasm32-wasip2": [],
+        "@rules_rust//rust/platform:x86_64-apple-darwin": [],
+        "@rules_rust//rust/platform:x86_64-apple-ios": [],
+        "@rules_rust//rust/platform:x86_64-linux-android": [],
+        "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
+        "@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
+        "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [],
+        "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
+        "@rules_rust//rust/platform:x86_64-unknown-none": [],
+        "@rules_rust//rust/platform:x86_64-unknown-uefi": [],
+        "//conditions:default": ["@platforms//:incompatible"],
+    }),
+    version = "0.2.4",
+)
diff --git a/extensions/pyo3/3rdparty/crates/alias_rules.bzl b/extensions/pyo3/3rdparty/crates/alias_rules.bzl
new file mode 100644
index 0000000..14b04c1
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/alias_rules.bzl
@@ -0,0 +1,47 @@
+"""Alias that transitions its target to `compilation_mode=opt`.  Use `transition_alias="opt"` to enable."""
+
+load("@rules_cc//cc:defs.bzl", "CcInfo")
+load("@rules_rust//rust:rust_common.bzl", "COMMON_PROVIDERS")
+
+def _transition_alias_impl(ctx):
+    # `ctx.attr.actual` is a list of 1 item due to the transition
+    providers = [ctx.attr.actual[0][provider] for provider in COMMON_PROVIDERS]
+    if CcInfo in ctx.attr.actual[0]:
+        providers.append(ctx.attr.actual[0][CcInfo])
+    return providers
+
+def _change_compilation_mode(compilation_mode):
+    def _change_compilation_mode_impl(_settings, _attr):
+        return {
+            "//command_line_option:compilation_mode": compilation_mode,
+        }
+
+    return transition(
+        implementation = _change_compilation_mode_impl,
+        inputs = [],
+        outputs = [
+            "//command_line_option:compilation_mode",
+        ],
+    )
+
+def _transition_alias_rule(compilation_mode):
+    return rule(
+        implementation = _transition_alias_impl,
+        provides = COMMON_PROVIDERS,
+        attrs = {
+            "actual": attr.label(
+                mandatory = True,
+                doc = "`rust_library()` target to transition to `compilation_mode=opt`.",
+                providers = COMMON_PROVIDERS,
+                cfg = _change_compilation_mode(compilation_mode),
+            ),
+            "_allowlist_function_transition": attr.label(
+                default = "@bazel_tools//tools/allowlists/function_transition_allowlist",
+            ),
+        },
+        doc = "Transitions a Rust library crate to the `compilation_mode=opt`.",
+    )
+
+transition_alias_dbg = _transition_alias_rule("dbg")
+transition_alias_fastbuild = _transition_alias_rule("fastbuild")
+transition_alias_opt = _transition_alias_rule("opt")
diff --git a/extensions/pyo3/3rdparty/crates/crates.bzl b/extensions/pyo3/3rdparty/crates/crates.bzl
new file mode 100644
index 0000000..27de4a0
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/crates.bzl
@@ -0,0 +1,32 @@
+###############################################################################
+# @generated
+# This file is auto-generated by the cargo-bazel tool.
+#
+# DO NOT MODIFY: Local changes may be replaced in future executions.
+###############################################################################
+"""Rules for defining repositories for remote `crates_vendor` repositories"""
+
+load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
+
+# buildifier: disable=bzl-visibility
+load("@rules_rust//crate_universe/private:crates_vendor.bzl", "crates_vendor_remote_repository")
+
+# buildifier: disable=bzl-visibility
+load("//3rdparty/crates:defs.bzl", _crate_repositories = "crate_repositories")
+
+def crate_repositories():
+    """Generates repositories for vendored crates.
+
+    Returns:
+      A list of repos visible to the module through the module extension.
+    """
+    maybe(
+        crates_vendor_remote_repository,
+        name = "rpyo3c",
+        build_file = Label("//3rdparty/crates:BUILD.bazel"),
+        defs_module = Label("//3rdparty/crates:defs.bzl"),
+    )
+
+    direct_deps = [struct(repo = "rpyo3c", is_dev_dep = False)]
+    direct_deps.extend(_crate_repositories())
+    return direct_deps
diff --git a/extensions/pyo3/3rdparty/crates/defs.bzl b/extensions/pyo3/3rdparty/crates/defs.bzl
new file mode 100644
index 0000000..5d0e4f7
--- /dev/null
+++ b/extensions/pyo3/3rdparty/crates/defs.bzl
@@ -0,0 +1,745 @@
+###############################################################################
+# @generated
+# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
+# regenerate this file, run the following:
+#
+#     bazel run @@//3rdparty:crates_vendor
+###############################################################################
+"""
+# `crates_repository` API
+
+- [aliases](#aliases)
+- [crate_deps](#crate_deps)
+- [all_crate_deps](#all_crate_deps)
+- [crate_repositories](#crate_repositories)
+
+"""
+
+load("@bazel_skylib//lib:selects.bzl", "selects")
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
+
+###############################################################################
+# MACROS API
+###############################################################################
+
+# An identifier that represent common dependencies (unconditional).
+_COMMON_CONDITION = ""
+
+def _flatten_dependency_maps(all_dependency_maps):
+    """Flatten a list of dependency maps into one dictionary.
+
+    Dependency maps have the following structure:
+
+    ```python
+    DEPENDENCIES_MAP = {
+        # The first key in the map is a Bazel package
+        # name of the workspace this file is defined in.
+        "workspace_member_package": {
+
+            # Not all dependencies are supported for all platforms.
+            # the condition key is the condition required to be true
+            # on the host platform.
+            "condition": {
+
+                # An alias to a crate target.     # The label of the crate target the
+                # Aliases are only crate names.   # package name refers to.
+                "package_name":                   "@full//:label",
+            }
+        }
+    }
+    ```
+
+    Args:
+        all_dependency_maps (list): A list of dicts as described above
+
+    Returns:
+        dict: A dictionary as described above
+    """
+    dependencies = {}
+
+    for workspace_deps_map in all_dependency_maps:
+        for pkg_name, conditional_deps_map in workspace_deps_map.items():
+            if pkg_name not in dependencies:
+                non_frozen_map = dict()
+                for key, values in conditional_deps_map.items():
+                    non_frozen_map.update({key: dict(values.items())})
+                dependencies.setdefault(pkg_name, non_frozen_map)
+                continue
+
+            for condition, deps_map in conditional_deps_map.items():
+                # If the condition has not been recorded, do so and continue
+                if condition not in dependencies[pkg_name]:
+                    dependencies[pkg_name].setdefault(condition, dict(deps_map.items()))
+                    continue
+
+                # Alert on any miss-matched dependencies
+                inconsistent_entries = []
+                for crate_name, crate_label in deps_map.items():
+                    existing = dependencies[pkg_name][condition].get(crate_name)
+                    if existing and existing != crate_label:
+                        inconsistent_entries.append((crate_name, existing, crate_label))
+                    dependencies[pkg_name][condition].update({crate_name: crate_label})
+
+    return dependencies
+
+def crate_deps(deps, package_name = None):
+    """Finds the fully qualified label of the requested crates for the package where this macro is called.
+
+    Args:
+        deps (list): The desired list of crate targets.
+        package_name (str, optional): The package name of the set of dependencies to look up.
+            Defaults to `native.package_name()`.
+
+    Returns:
+        list: A list of labels to generated rust targets (str)
+    """
+
+    if not deps:
+        return []
+
+    if package_name == None:
+        package_name = native.package_name()
+
+    # Join both sets of dependencies
+    dependencies = _flatten_dependency_maps([
+        _NORMAL_DEPENDENCIES,
+        _NORMAL_DEV_DEPENDENCIES,
+        _PROC_MACRO_DEPENDENCIES,
+        _PROC_MACRO_DEV_DEPENDENCIES,
+        _BUILD_DEPENDENCIES,
+        _BUILD_PROC_MACRO_DEPENDENCIES,
+    ]).pop(package_name, {})
+
+    # Combine all conditional packages so we can easily index over a flat list
+    # TODO: Perhaps this should actually return select statements and maintain
+    # the conditionals of the dependencies
+    flat_deps = {}
+    for deps_set in dependencies.values():
+        for crate_name, crate_label in deps_set.items():
+            flat_deps.update({crate_name: crate_label})
+
+    missing_crates = []
+    crate_targets = []
+    for crate_target in deps:
+        if crate_target not in flat_deps:
+            missing_crates.append(crate_target)
+        else:
+            crate_targets.append(flat_deps[crate_target])
+
+    if missing_crates:
+        fail("Could not find crates `{}` among dependencies of `{}`. Available dependencies were `{}`".format(
+            missing_crates,
+            package_name,
+            dependencies,
+        ))
+
+    return crate_targets
+
+def all_crate_deps(
+        normal = False,
+        normal_dev = False,
+        proc_macro = False,
+        proc_macro_dev = False,
+        build = False,
+        build_proc_macro = False,
+        package_name = None):
+    """Finds the fully qualified label of all requested direct crate dependencies \
+    for the package where this macro is called.
+
+    If no parameters are set, all normal dependencies are returned. Setting any one flag will
+    otherwise impact the contents of the returned list.
+
+    Args:
+        normal (bool, optional): If True, normal dependencies are included in the
+            output list.
+        normal_dev (bool, optional): If True, normal dev dependencies will be
+            included in the output list..
+        proc_macro (bool, optional): If True, proc_macro dependencies are included
+            in the output list.
+        proc_macro_dev (bool, optional): If True, dev proc_macro dependencies are
+            included in the output list.
+        build (bool, optional): If True, build dependencies are included
+            in the output list.
+        build_proc_macro (bool, optional): If True, build proc_macro dependencies are
+            included in the output list.
+        package_name (str, optional): The package name of the set of dependencies to look up.
+            Defaults to `native.package_name()` when unset.
+
+    Returns:
+        list: A list of labels to generated rust targets (str)
+    """
+
+    if package_name == None:
+        package_name = native.package_name()
+
+    # Determine the relevant maps to use
+    all_dependency_maps = []
+    if normal:
+        all_dependency_maps.append(_NORMAL_DEPENDENCIES)
+    if normal_dev:
+        all_dependency_maps.append(_NORMAL_DEV_DEPENDENCIES)
+    if proc_macro:
+        all_dependency_maps.append(_PROC_MACRO_DEPENDENCIES)
+    if proc_macro_dev:
+        all_dependency_maps.append(_PROC_MACRO_DEV_DEPENDENCIES)
+    if build:
+        all_dependency_maps.append(_BUILD_DEPENDENCIES)
+    if build_proc_macro:
+        all_dependency_maps.append(_BUILD_PROC_MACRO_DEPENDENCIES)
+
+    # Default to always using normal dependencies
+    if not all_dependency_maps:
+        all_dependency_maps.append(_NORMAL_DEPENDENCIES)
+
+    dependencies = _flatten_dependency_maps(all_dependency_maps).pop(package_name, None)
+
+    if not dependencies:
+        if dependencies == None:
+            fail("Tried to get all_crate_deps for package " + package_name + " but that package had no Cargo.toml file")
+        else:
+            return []
+
+    crate_deps = list(dependencies.pop(_COMMON_CONDITION, {}).values())
+    for condition, deps in dependencies.items():
+        crate_deps += selects.with_or({
+            tuple(_CONDITIONS[condition]): deps.values(),
+            "//conditions:default": [],
+        })
+
+    return crate_deps
+
+def aliases(
+        normal = False,
+        normal_dev = False,
+        proc_macro = False,
+        proc_macro_dev = False,
+        build = False,
+        build_proc_macro = False,
+        package_name = None):
+    """Produces a map of Crate alias names to their original label
+
+    If no dependency kinds are specified, `normal` and `proc_macro` are used by default.
+    Setting any one flag will otherwise determine the contents of the returned dict.
+
+    Args:
+        normal (bool, optional): If True, normal dependencies are included in the
+            output list.
+        normal_dev (bool, optional): If True, normal dev dependencies will be
+            included in the output list..
+        proc_macro (bool, optional): If True, proc_macro dependencies are included
+            in the output list.
+        proc_macro_dev (bool, optional): If True, dev proc_macro dependencies are
+            included in the output list.
+        build (bool, optional): If True, build dependencies are included
+            in the output list.
+        build_proc_macro (bool, optional): If True, build proc_macro dependencies are
+            included in the output list.
+        package_name (str, optional): The package name of the set of dependencies to look up.
+            Defaults to `native.package_name()` when unset.
+
+    Returns:
+        dict: The aliases of all associated packages
+    """
+    if package_name == None:
+        package_name = native.package_name()
+
+    # Determine the relevant maps to use
+    all_aliases_maps = []
+    if normal:
+        all_aliases_maps.append(_NORMAL_ALIASES)
+    if normal_dev:
+        all_aliases_maps.append(_NORMAL_DEV_ALIASES)
+    if proc_macro:
+        all_aliases_maps.append(_PROC_MACRO_ALIASES)
+    if proc_macro_dev:
+        all_aliases_maps.append(_PROC_MACRO_DEV_ALIASES)
+    if build:
+        all_aliases_maps.append(_BUILD_ALIASES)
+    if build_proc_macro:
+        all_aliases_maps.append(_BUILD_PROC_MACRO_ALIASES)
+
+    # Default to always using normal aliases
+    if not all_aliases_maps:
+        all_aliases_maps.append(_NORMAL_ALIASES)
+        all_aliases_maps.append(_PROC_MACRO_ALIASES)
+
+    aliases = _flatten_dependency_maps(all_aliases_maps).pop(package_name, None)
+
+    if not aliases:
+        return dict()
+
+    common_items = aliases.pop(_COMMON_CONDITION, {}).items()
+
+    # If there are only common items in the dictionary, immediately return them
+    if not len(aliases.keys()) == 1:
+        return dict(common_items)
+
+    # Build a single select statement where each conditional has accounted for the
+    # common set of aliases.
+    crate_aliases = {"//conditions:default": dict(common_items)}
+    for condition, deps in aliases.items():
+        condition_triples = _CONDITIONS[condition]
+        for triple in condition_triples:
+            if triple in crate_aliases:
+                crate_aliases[triple].update(deps)
+            else:
+                crate_aliases.update({triple: dict(deps.items() + common_items)})
+
+    return select(crate_aliases)
+
+###############################################################################
+# WORKSPACE MEMBER DEPS AND ALIASES
+###############################################################################
+
+_NORMAL_DEPENDENCIES = {
+    "": {
+        _COMMON_CONDITION: {
+            "pyo3": Label("@rpyo3c//:pyo3-0.26.0"),
+            "pyo3-ffi": Label("@rpyo3c//:pyo3-ffi-0.26.0"),
+            "pyo3-introspection": Label("@rpyo3c//:pyo3-introspection-0.26.0"),
+        },
+    },
+}
+
+_NORMAL_ALIASES = {
+    "": {
+        _COMMON_CONDITION: {
+        },
+    },
+}
+
+_NORMAL_DEV_DEPENDENCIES = {
+    "": {
+    },
+}
+
+_NORMAL_DEV_ALIASES = {
+    "": {
+    },
+}
+
+_PROC_MACRO_DEPENDENCIES = {
+    "": {
+    },
+}
+
+_PROC_MACRO_ALIASES = {
+    "": {
+    },
+}
+
+_PROC_MACRO_DEV_DEPENDENCIES = {
+    "": {
+    },
+}
+
+_PROC_MACRO_DEV_ALIASES = {
+    "": {
+    },
+}
+
+_BUILD_DEPENDENCIES = {
+    "": {
+    },
+}
+
+_BUILD_ALIASES = {
+    "": {
+    },
+}
+
+_BUILD_PROC_MACRO_DEPENDENCIES = {
+    "": {
+    },
+}
+
+_BUILD_PROC_MACRO_ALIASES = {
+    "": {
+    },
+}
+
+_CONDITIONS = {
+    "aarch64-apple-darwin": ["@rules_rust//rust/platform:aarch64-apple-darwin"],
+    "aarch64-apple-ios": ["@rules_rust//rust/platform:aarch64-apple-ios"],
+    "aarch64-apple-ios-sim": ["@rules_rust//rust/platform:aarch64-apple-ios-sim"],
+    "aarch64-linux-android": ["@rules_rust//rust/platform:aarch64-linux-android"],
+    "aarch64-pc-windows-msvc": ["@rules_rust//rust/platform:aarch64-pc-windows-msvc"],
+    "aarch64-unknown-fuchsia": ["@rules_rust//rust/platform:aarch64-unknown-fuchsia"],
+    "aarch64-unknown-linux-gnu": ["@rules_rust//rust/platform:aarch64-unknown-linux-gnu"],
+    "aarch64-unknown-nixos-gnu": ["@rules_rust//rust/platform:aarch64-unknown-nixos-gnu"],
+    "aarch64-unknown-nto-qnx710": ["@rules_rust//rust/platform:aarch64-unknown-nto-qnx710"],
+    "aarch64-unknown-uefi": ["@rules_rust//rust/platform:aarch64-unknown-uefi"],
+    "arm-unknown-linux-gnueabi": ["@rules_rust//rust/platform:arm-unknown-linux-gnueabi"],
+    "armv7-linux-androideabi": ["@rules_rust//rust/platform:armv7-linux-androideabi"],
+    "armv7-unknown-linux-gnueabi": ["@rules_rust//rust/platform:armv7-unknown-linux-gnueabi"],
+    "cfg(any())": [],
+    "cfg(not(target_has_atomic = \"64\"))": ["@rules_rust//rust/platform:powerpc-unknown-linux-gnu", "@rules_rust//rust/platform:riscv32imc-unknown-none-elf", "@rules_rust//rust/platform:thumbv7em-none-eabi", "@rules_rust//rust/platform:thumbv8m.main-none-eabi"],
+    "i686-apple-darwin": ["@rules_rust//rust/platform:i686-apple-darwin"],
+    "i686-linux-android": ["@rules_rust//rust/platform:i686-linux-android"],
+    "i686-pc-windows-msvc": ["@rules_rust//rust/platform:i686-pc-windows-msvc"],
+    "i686-unknown-freebsd": ["@rules_rust//rust/platform:i686-unknown-freebsd"],
+    "i686-unknown-linux-gnu": ["@rules_rust//rust/platform:i686-unknown-linux-gnu"],
+    "powerpc-unknown-linux-gnu": ["@rules_rust//rust/platform:powerpc-unknown-linux-gnu"],
+    "riscv32imc-unknown-none-elf": ["@rules_rust//rust/platform:riscv32imc-unknown-none-elf"],
+    "riscv64gc-unknown-linux-gnu": ["@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu"],
+    "riscv64gc-unknown-none-elf": ["@rules_rust//rust/platform:riscv64gc-unknown-none-elf"],
+    "s390x-unknown-linux-gnu": ["@rules_rust//rust/platform:s390x-unknown-linux-gnu"],
+    "thumbv7em-none-eabi": ["@rules_rust//rust/platform:thumbv7em-none-eabi"],
+    "thumbv8m.main-none-eabi": ["@rules_rust//rust/platform:thumbv8m.main-none-eabi"],
+    "wasm32-unknown-emscripten": ["@rules_rust//rust/platform:wasm32-unknown-emscripten"],
+    "wasm32-unknown-unknown": ["@rules_rust//rust/platform:wasm32-unknown-unknown"],
+    "wasm32-wasip1": ["@rules_rust//rust/platform:wasm32-wasip1"],
+    "wasm32-wasip1-threads": ["@rules_rust//rust/platform:wasm32-wasip1-threads"],
+    "wasm32-wasip2": ["@rules_rust//rust/platform:wasm32-wasip2"],
+    "x86_64-apple-darwin": ["@rules_rust//rust/platform:x86_64-apple-darwin"],
+    "x86_64-apple-ios": ["@rules_rust//rust/platform:x86_64-apple-ios"],
+    "x86_64-linux-android": ["@rules_rust//rust/platform:x86_64-linux-android"],
+    "x86_64-pc-windows-msvc": ["@rules_rust//rust/platform:x86_64-pc-windows-msvc"],
+    "x86_64-unknown-freebsd": ["@rules_rust//rust/platform:x86_64-unknown-freebsd"],
+    "x86_64-unknown-fuchsia": ["@rules_rust//rust/platform:x86_64-unknown-fuchsia"],
+    "x86_64-unknown-linux-gnu": ["@rules_rust//rust/platform:x86_64-unknown-linux-gnu"],
+    "x86_64-unknown-nixos-gnu": ["@rules_rust//rust/platform:x86_64-unknown-nixos-gnu"],
+    "x86_64-unknown-none": ["@rules_rust//rust/platform:x86_64-unknown-none"],
+    "x86_64-unknown-uefi": ["@rules_rust//rust/platform:x86_64-unknown-uefi"],
+}
+
+###############################################################################
+
+def crate_repositories():
+    """A macro for defining repositories for all generated crates.
+
+    Returns:
+      A list of repos visible to the module through the module extension.
+    """
+    maybe(
+        http_archive,
+        name = "rpyo3c__anyhow-1.0.100",
+        sha256 = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/anyhow/1.0.100/download"],
+        strip_prefix = "anyhow-1.0.100",
+        build_file = Label("//3rdparty/crates:BUILD.anyhow-1.0.100.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__autocfg-1.5.0",
+        sha256 = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/autocfg/1.5.0/download"],
+        strip_prefix = "autocfg-1.5.0",
+        build_file = Label("//3rdparty/crates:BUILD.autocfg-1.5.0.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__goblin-0.10.1",
+        sha256 = "d6a80adfd63bd7ffd94fefc3d22167880c440a724303080e5aa686fa36abaa96",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/goblin/0.10.1/download"],
+        strip_prefix = "goblin-0.10.1",
+        build_file = Label("//3rdparty/crates:BUILD.goblin-0.10.1.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__heck-0.5.0",
+        sha256 = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/heck/0.5.0/download"],
+        strip_prefix = "heck-0.5.0",
+        build_file = Label("//3rdparty/crates:BUILD.heck-0.5.0.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__indoc-2.0.6",
+        sha256 = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/indoc/2.0.6/download"],
+        strip_prefix = "indoc-2.0.6",
+        build_file = Label("//3rdparty/crates:BUILD.indoc-2.0.6.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__itoa-1.0.15",
+        sha256 = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/itoa/1.0.15/download"],
+        strip_prefix = "itoa-1.0.15",
+        build_file = Label("//3rdparty/crates:BUILD.itoa-1.0.15.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__libc-0.2.176",
+        sha256 = "58f929b4d672ea937a23a1ab494143d968337a5f47e56d0815df1e0890ddf174",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/libc/0.2.176/download"],
+        strip_prefix = "libc-0.2.176",
+        build_file = Label("//3rdparty/crates:BUILD.libc-0.2.176.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__log-0.4.28",
+        sha256 = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/log/0.4.28/download"],
+        strip_prefix = "log-0.4.28",
+        build_file = Label("//3rdparty/crates:BUILD.log-0.4.28.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__memchr-2.7.6",
+        sha256 = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/memchr/2.7.6/download"],
+        strip_prefix = "memchr-2.7.6",
+        build_file = Label("//3rdparty/crates:BUILD.memchr-2.7.6.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__memoffset-0.9.1",
+        sha256 = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/memoffset/0.9.1/download"],
+        strip_prefix = "memoffset-0.9.1",
+        build_file = Label("//3rdparty/crates:BUILD.memoffset-0.9.1.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__once_cell-1.21.3",
+        sha256 = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/once_cell/1.21.3/download"],
+        strip_prefix = "once_cell-1.21.3",
+        build_file = Label("//3rdparty/crates:BUILD.once_cell-1.21.3.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__plain-0.2.3",
+        sha256 = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/plain/0.2.3/download"],
+        strip_prefix = "plain-0.2.3",
+        build_file = Label("//3rdparty/crates:BUILD.plain-0.2.3.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__portable-atomic-1.11.1",
+        sha256 = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/portable-atomic/1.11.1/download"],
+        strip_prefix = "portable-atomic-1.11.1",
+        build_file = Label("//3rdparty/crates:BUILD.portable-atomic-1.11.1.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__proc-macro2-1.0.101",
+        sha256 = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/proc-macro2/1.0.101/download"],
+        strip_prefix = "proc-macro2-1.0.101",
+        build_file = Label("//3rdparty/crates:BUILD.proc-macro2-1.0.101.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__pyo3-0.26.0",
+        sha256 = "7ba0117f4212101ee6544044dae45abe1083d30ce7b29c4b5cbdfa2354e07383",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/pyo3/0.26.0/download"],
+        strip_prefix = "pyo3-0.26.0",
+        build_file = Label("//3rdparty/crates:BUILD.pyo3-0.26.0.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__pyo3-build-config-0.26.0",
+        patch_args = [
+            "-p1",
+        ],
+        patches = [
+            "@rules_rust_pyo3//3rdparty/patches:resolve_cross_compile_config_path.patch",
+        ],
+        sha256 = "4fc6ddaf24947d12a9aa31ac65431fb1b851b8f4365426e182901eabfb87df5f",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/pyo3-build-config/0.26.0/download"],
+        strip_prefix = "pyo3-build-config-0.26.0",
+        build_file = Label("//3rdparty/crates:BUILD.pyo3-build-config-0.26.0.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__pyo3-ffi-0.26.0",
+        sha256 = "025474d3928738efb38ac36d4744a74a400c901c7596199e20e45d98eb194105",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/pyo3-ffi/0.26.0/download"],
+        strip_prefix = "pyo3-ffi-0.26.0",
+        build_file = Label("//3rdparty/crates:BUILD.pyo3-ffi-0.26.0.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__pyo3-introspection-0.26.0",
+        sha256 = "0c3470294ce4d56fa74c996e4244ec3ac04db0c621975993e62ff725844ab509",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/pyo3-introspection/0.26.0/download"],
+        strip_prefix = "pyo3-introspection-0.26.0",
+        build_file = Label("//3rdparty/crates:BUILD.pyo3-introspection-0.26.0.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__pyo3-macros-0.26.0",
+        sha256 = "2e64eb489f22fe1c95911b77c44cc41e7c19f3082fc81cce90f657cdc42ffded",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/pyo3-macros/0.26.0/download"],
+        strip_prefix = "pyo3-macros-0.26.0",
+        build_file = Label("//3rdparty/crates:BUILD.pyo3-macros-0.26.0.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__pyo3-macros-backend-0.26.0",
+        sha256 = "100246c0ecf400b475341b8455a9213344569af29a3c841d29270e53102e0fcf",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/pyo3-macros-backend/0.26.0/download"],
+        strip_prefix = "pyo3-macros-backend-0.26.0",
+        build_file = Label("//3rdparty/crates:BUILD.pyo3-macros-backend-0.26.0.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__quote-1.0.41",
+        sha256 = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/quote/1.0.41/download"],
+        strip_prefix = "quote-1.0.41",
+        build_file = Label("//3rdparty/crates:BUILD.quote-1.0.41.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__ryu-1.0.20",
+        sha256 = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/ryu/1.0.20/download"],
+        strip_prefix = "ryu-1.0.20",
+        build_file = Label("//3rdparty/crates:BUILD.ryu-1.0.20.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__scroll-0.13.0",
+        sha256 = "c1257cd4248b4132760d6524d6dda4e053bc648c9070b960929bf50cfb1e7add",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/scroll/0.13.0/download"],
+        strip_prefix = "scroll-0.13.0",
+        build_file = Label("//3rdparty/crates:BUILD.scroll-0.13.0.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__scroll_derive-0.13.1",
+        sha256 = "ed76efe62313ab6610570951494bdaa81568026e0318eaa55f167de70eeea67d",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/scroll_derive/0.13.1/download"],
+        strip_prefix = "scroll_derive-0.13.1",
+        build_file = Label("//3rdparty/crates:BUILD.scroll_derive-0.13.1.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__serde-1.0.228",
+        sha256 = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/serde/1.0.228/download"],
+        strip_prefix = "serde-1.0.228",
+        build_file = Label("//3rdparty/crates:BUILD.serde-1.0.228.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__serde_core-1.0.228",
+        sha256 = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/serde_core/1.0.228/download"],
+        strip_prefix = "serde_core-1.0.228",
+        build_file = Label("//3rdparty/crates:BUILD.serde_core-1.0.228.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__serde_derive-1.0.228",
+        sha256 = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/serde_derive/1.0.228/download"],
+        strip_prefix = "serde_derive-1.0.228",
+        build_file = Label("//3rdparty/crates:BUILD.serde_derive-1.0.228.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__serde_json-1.0.145",
+        sha256 = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/serde_json/1.0.145/download"],
+        strip_prefix = "serde_json-1.0.145",
+        build_file = Label("//3rdparty/crates:BUILD.serde_json-1.0.145.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__syn-2.0.106",
+        sha256 = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/syn/2.0.106/download"],
+        strip_prefix = "syn-2.0.106",
+        build_file = Label("//3rdparty/crates:BUILD.syn-2.0.106.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__target-lexicon-0.13.3",
+        sha256 = "df7f62577c25e07834649fc3b39fafdc597c0a3527dc1c60129201ccfcbaa50c",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/target-lexicon/0.13.3/download"],
+        strip_prefix = "target-lexicon-0.13.3",
+        build_file = Label("//3rdparty/crates:BUILD.target-lexicon-0.13.3.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__unicode-ident-1.0.19",
+        sha256 = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/unicode-ident/1.0.19/download"],
+        strip_prefix = "unicode-ident-1.0.19",
+        build_file = Label("//3rdparty/crates:BUILD.unicode-ident-1.0.19.bazel"),
+    )
+
+    maybe(
+        http_archive,
+        name = "rpyo3c__unindent-0.2.4",
+        sha256 = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3",
+        type = "tar.gz",
+        urls = ["https://static.crates.io/crates/unindent/0.2.4/download"],
+        strip_prefix = "unindent-0.2.4",
+        build_file = Label("//3rdparty/crates:BUILD.unindent-0.2.4.bazel"),
+    )
+
+    return [
+        struct(repo = "rpyo3c__pyo3-0.26.0", is_dev_dep = False),
+        struct(repo = "rpyo3c__pyo3-ffi-0.26.0", is_dev_dep = False),
+        struct(repo = "rpyo3c__pyo3-introspection-0.26.0", is_dev_dep = False),
+    ]
diff --git a/extensions/pyo3/3rdparty/patches/BUILD.bazel b/extensions/pyo3/3rdparty/patches/BUILD.bazel
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/extensions/pyo3/3rdparty/patches/BUILD.bazel
diff --git a/extensions/pyo3/3rdparty/patches/README.md b/extensions/pyo3/3rdparty/patches/README.md
new file mode 100644
index 0000000..f82a9d5
--- /dev/null
+++ b/extensions/pyo3/3rdparty/patches/README.md
@@ -0,0 +1,11 @@
+# 3rdparty Patches
+
+## [resolve_cross_compile_config_path](./resolve_cross_compile_config_path.patch)
+
+`pyo3-build-config` for the `resolve-config` feature ends up writing the
+`OUT_DIR` environment variable into the compiled library for use in other
+build scripts. This is going to lead to broke behavior in any sandboxed
+build as the `OUT_DIR` will be an absolute path to a sandbox that is most
+likely not going to exist when downstream scripts are run (e.g.
+`pyo3-ffi`). Instead, `OUT_DIR` is parsed at runtime so a writable
+directory can be found.
diff --git a/extensions/pyo3/3rdparty/patches/resolve_cross_compile_config_path.patch b/extensions/pyo3/3rdparty/patches/resolve_cross_compile_config_path.patch
new file mode 100644
index 0000000..59d7faf
--- /dev/null
+++ b/extensions/pyo3/3rdparty/patches/resolve_cross_compile_config_path.patch
@@ -0,0 +1,23 @@
+diff --git a/src/lib.rs b/src/lib.rs
+index 033e7b46..aa6bcae4 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -122,11 +122,13 @@ const HOST_CONFIG: &str = include_str!(concat!(env!("OUT_DIR"), "/pyo3-build-con
+ #[doc(hidden)]
+ #[cfg(feature = "resolve-config")]
+ fn resolve_cross_compile_config_path() -> Option<PathBuf> {
+-    env::var_os("TARGET").map(|target| {
+-        let mut path = PathBuf::from(env!("OUT_DIR"));
+-        path.push(Path::new(&target));
+-        path.push("pyo3-build-config.txt");
+-        path
++    env::var_os("TARGET").and_then(|target| {
++        std::env::var("OUT_DIR").ok().map(|out_dir| {
++            let mut path = PathBuf::from(out_dir);
++            path.push(Path::new(&target));
++            path.push("pyo3-build-config.txt");
++            path
++        })
+     })
+ }
+ 
diff --git a/extensions/pyo3/BUILD.bazel b/extensions/pyo3/BUILD.bazel
new file mode 100644
index 0000000..0ff45be
--- /dev/null
+++ b/extensions/pyo3/BUILD.bazel
@@ -0,0 +1,33 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+load("//private:pyo3_toolchain.bzl", "current_pyo3_toolchain")
+
+exports_files([
+    "defs.bzl",
+    "MODULE.bazel",
+    "version.bzl",
+])
+
+toolchain_type(
+    name = "toolchain_type",
+    visibility = ["//visibility:public"],
+)
+
+toolchain_type(
+    name = "rust_toolchain_type",
+    visibility = ["//visibility:public"],
+)
+
+current_pyo3_toolchain(
+    name = "current_pyo3_toolchain",
+    visibility = ["//visibility:public"],
+)
+
+bzl_library(
+    name = "bzl_lib",
+    srcs = glob(["*.bzl"]),
+    visibility = ["//visibility:public"],
+    deps = [
+        "//3rdparty:bzl_lib",
+        "//private:bzl_lib",
+    ],
+)
diff --git a/extensions/pyo3/MODULE.bazel b/extensions/pyo3/MODULE.bazel
new file mode 100644
index 0000000..6f7d0d3
--- /dev/null
+++ b/extensions/pyo3/MODULE.bazel
@@ -0,0 +1,39 @@
+"""rules_rust_pyo3"""
+
+module(
+    name = "rules_rust_pyo3",
+    version = "0.65.0",
+)
+
+bazel_dep(name = "rules_rust", version = "0.65.0")
+bazel_dep(name = "rules_python", version = "1.6.3")
+bazel_dep(name = "bazel_skylib", version = "1.8.2")
+bazel_dep(name = "platforms", version = "1.0.0")
+
+rust_ext = use_extension("//private:internal_extensions.bzl", "rust_ext")
+use_repo(
+    rust_ext,
+    "rpyo3c",
+    "rpyo3c__pyo3-0.26.0",
+    "rpyo3c__pyo3-ffi-0.26.0",
+    "rpyo3c__pyo3-introspection-0.26.0",
+)
+
+register_toolchains(
+    "//toolchains:toolchain",
+    "//toolchains:rust_toolchain",
+    dev_dependency = True,
+)
+
+bazel_dep(name = "bazel_ci_rules", version = "1.0.0", dev_dependency = True)
+bazel_dep(name = "rules_cc", version = "0.2.4", dev_dependency = True)
+
+rust_ext_dev = use_extension(
+    "//private:internal_extensions_dev.bzl",
+    "rust_ext_dev",
+    dev_dependency = True,
+)
+use_repo(
+    rust_ext_dev,
+    "buildkite_config",
+)
diff --git a/extensions/pyo3/README.md b/extensions/pyo3/README.md
new file mode 100644
index 0000000..950db27
--- /dev/null
+++ b/extensions/pyo3/README.md
@@ -0,0 +1,7 @@
+# rules_rust_pyo3
+
+Bazel rules for [PyO3](https://pyo3.rs/v0.26.0/).
+
+## Documentation
+
+More information can be found in the [rules_rust documentation](https://bazelbuild.github.io/rules_rust/rust_pyo3.html).
diff --git a/extensions/pyo3/WORKSPACE.bazel b/extensions/pyo3/WORKSPACE.bazel
new file mode 100644
index 0000000..a5bfb16
--- /dev/null
+++ b/extensions/pyo3/WORKSPACE.bazel
@@ -0,0 +1 @@
+workspace(name = "rules_rust_pyo3")
diff --git a/extensions/pyo3/WORKSPACE.bzlmod b/extensions/pyo3/WORKSPACE.bzlmod
new file mode 100644
index 0000000..a5bfb16
--- /dev/null
+++ b/extensions/pyo3/WORKSPACE.bzlmod
@@ -0,0 +1 @@
+workspace(name = "rules_rust_pyo3")
diff --git a/extensions/pyo3/defs.bzl b/extensions/pyo3/defs.bzl
new file mode 100644
index 0000000..c263494
--- /dev/null
+++ b/extensions/pyo3/defs.bzl
@@ -0,0 +1,16 @@
+"""# rules_rust_pyo3
+"""
+
+load(
+    "//private:pyo3.bzl",
+    _pyo3_extension = "pyo3_extension",
+)
+load(
+    "//private:pyo3_toolchain.bzl",
+    _pyo3_toolchain = "pyo3_toolchain",
+    _rust_pyo3_toolchain = "rust_pyo3_toolchain",
+)
+
+pyo3_extension = _pyo3_extension
+pyo3_toolchain = _pyo3_toolchain
+rust_pyo3_toolchain = _rust_pyo3_toolchain
diff --git a/extensions/pyo3/private/BUILD.bazel b/extensions/pyo3/private/BUILD.bazel
new file mode 100644
index 0000000..bbd3d8a
--- /dev/null
+++ b/extensions/pyo3/private/BUILD.bazel
@@ -0,0 +1,47 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+load("@rules_rust//rust:defs.bzl", "rust_binary")
+load(
+    ":pyo3_toolchain.bzl",
+    "current_pyo3_toolchain",
+    "current_rust_pyo3_introspection_toolchain",
+    "current_rust_pyo3_toolchain",
+)
+
+bzl_library(
+    name = "bzl_lib",
+    srcs = glob(["*.bzl"]),
+    visibility = ["//:__pkg__"],
+    deps = [
+        "@rules_python//python:defs_bzl",
+        "@rules_rust//rust:bzl_lib",
+    ],
+)
+
+current_pyo3_toolchain(
+    name = "current_pyo3_toolchain",
+)
+
+current_rust_pyo3_toolchain(
+    name = "current_rust_pyo3_toolchain",
+    tags = [
+        "no-clippy",
+        "no-rustfmt",
+    ],
+    visibility = ["//visibility:public"],
+)
+
+current_rust_pyo3_introspection_toolchain(
+    name = "current_rust_pyo3_introspection_toolchain",
+    tags = [
+        "no-clippy",
+        "no-rustfmt",
+    ],
+    visibility = ["//visibility:public"],
+)
+
+rust_binary(
+    name = "stubgen",
+    srcs = ["stubgen.rs"],
+    edition = "2021",
+    deps = [":current_rust_pyo3_introspection_toolchain"],
+)
diff --git a/extensions/pyo3/private/internal_extensions.bzl b/extensions/pyo3/private/internal_extensions.bzl
new file mode 100644
index 0000000..c3e0ec5
--- /dev/null
+++ b/extensions/pyo3/private/internal_extensions.bzl
@@ -0,0 +1,23 @@
+"""Bzlmod module extensions"""
+
+load("//3rdparty/crates:crates.bzl", "crate_repositories")
+
+def _rust_ext_impl(module_ctx):
+    # This should contain the subset of WORKSPACE.bazel that defines
+    # repositories.
+    direct_deps = []
+
+    direct_deps.extend(crate_repositories())
+
+    # is_dev_dep is ignored here. It's not relevant for internal_deps, as dev
+    # dependencies are only relevant for module extensions that can be used
+    # by other MODULES.
+    return module_ctx.extension_metadata(
+        root_module_direct_deps = [repo.repo for repo in direct_deps],
+        root_module_direct_dev_deps = [],
+    )
+
+rust_ext = module_extension(
+    doc = "Dependencies for pyo3 rules extension.",
+    implementation = _rust_ext_impl,
+)
diff --git a/extensions/pyo3/private/internal_extensions_dev.bzl b/extensions/pyo3/private/internal_extensions_dev.bzl
new file mode 100644
index 0000000..23c40d6
--- /dev/null
+++ b/extensions/pyo3/private/internal_extensions_dev.bzl
@@ -0,0 +1,26 @@
+"""Bzlmod internal extensions"""
+
+load("@bazel_ci_rules//:rbe_repo.bzl", "rbe_preconfig")
+
+def _rust_ext_dev_impl(module_ctx):
+    deps = []
+
+    rbe_preconfig(
+        name = "buildkite_config",
+        toolchain = "ubuntu1804-bazel-java11",
+    )
+
+    deps.append(struct(repo = "buildkite_config"))
+
+    # is_dev_dep is ignored here. It's not relevant for internal_deps, as dev
+    # dependencies are only relevant for module extensions that can be used
+    # by other MODULES.
+    return module_ctx.extension_metadata(
+        root_module_direct_deps = [],
+        root_module_direct_dev_deps = [repo.repo for repo in deps],
+    )
+
+rust_ext_dev = module_extension(
+    doc = "Development dependencies for the rules_rust_wasm_bindgen extension.",
+    implementation = _rust_ext_dev_impl,
+)
diff --git a/extensions/pyo3/private/pyo3.bzl b/extensions/pyo3/private/pyo3.bzl
new file mode 100644
index 0000000..0e087b5
--- /dev/null
+++ b/extensions/pyo3/private/pyo3.bzl
@@ -0,0 +1,324 @@
+"""Bazel pyo3 rules"""
+
+load("@bazel_skylib//lib:paths.bzl", "paths")
+load("@rules_python//python:defs.bzl", "PyInfo")
+load(
+    "@rules_rust//rust:defs.bzl",
+    "rust_analyzer_aspect",
+    "rust_clippy_aspect",
+    "rust_common",
+    "rust_shared_library",
+    "rustfmt_aspect",
+)
+load(":pyo3_toolchain.bzl", "PYO3_TOOLCHAIN")
+
+def _compilation_mode_transition_impl(settings, attr):
+    output = dict(settings)
+    if attr.compilation_mode in ["dbg", "fastbuild", "opt"]:
+        output["//command_line_option:compilation_mode"] = attr.compilation_mode
+    return output
+
+_compilation_mode_transition = transition(
+    implementation = _compilation_mode_transition_impl,
+    inputs = ["//command_line_option:compilation_mode"],
+    outputs = ["//command_line_option:compilation_mode"],
+)
+
+def _get_imports(ctx, imports):
+    """Determine the import paths from a target's `imports` attribute.
+
+    Args:
+        ctx (ctx): The rule's context object.
+        imports (list): A list of import paths.
+
+    Returns:
+        depset: A set of the resolved import paths.
+    """
+    workspace_name = ctx.label.workspace_name
+    if not workspace_name:
+        workspace_name = ctx.workspace_name
+
+    import_root = "{}/{}".format(workspace_name, ctx.label.package).rstrip("/")
+
+    result = [workspace_name]
+    for import_str in imports:
+        import_str = ctx.expand_make_variables("imports", import_str, {})
+        if import_str.startswith("/"):
+            continue
+
+        # To prevent "escaping" out of the runfiles tree, we normalize
+        # the path and ensure it doesn't have up-level references.
+        import_path = paths.normalize("{}/{}".format(import_root, import_str))
+        if import_path.startswith("../") or import_path == "..":
+            fail("Path '{}' references a path above the execution root".format(
+                import_str,
+            ))
+        result.append(import_path)
+
+    return depset(result)
+
+def _stubs_enabled(stubs_flag, toolchain):
+    """Determine if stubs should be generated.
+
+    Args:
+        stubs_flag (int): The `py_pyo3_library.stubs` attribute.
+        toolchain (pyo3_toolchain): The current toolchain.
+
+    Returns:
+        bool: Whether or not to generate stubs.
+    """
+
+    if stubs_flag == 1:
+        return True
+
+    if stubs_flag == 0:
+        return False
+
+    return toolchain.experimental_stubgen
+
+def _py_pyo3_library_impl(ctx):
+    toolchain = ctx.toolchains[PYO3_TOOLCHAIN]
+
+    files = []
+
+    crate_info = ctx.attr.extension[rust_common.test_crate_info].crate
+
+    extension = crate_info.output
+    is_windows = extension.basename.endswith(".dll")
+
+    # https://pyo3.rs/v0.26.0/building-and-distribution#manual-builds
+    ext = ctx.actions.declare_file("{}{}".format(
+        ctx.label.name,
+        ".pyd" if is_windows else ".so",
+    ))
+    ctx.actions.symlink(
+        output = ext,
+        target_file = extension,
+    )
+    files.append(ext)
+
+    stub = None
+    if _stubs_enabled(ctx.attr.stubs, toolchain):
+        stub = ctx.actions.declare_file("{}.pyi".format(ctx.label.name))
+
+        args = ctx.actions.args()
+        args.add(ctx.label.name, format = "--module_name=%s")
+        args.add(ext, format = "--module_path=%s")
+        args.add(stub, format = "--output=%s")
+        ctx.actions.run(
+            mnemonic = "PyO3StubGen",
+            outputs = [stub],
+            inputs = [ext],
+            executable = ctx.executable._stubgen,
+            arguments = [args],
+        )
+        files.append(stub)
+
+    providers = [
+        DefaultInfo(
+            files = depset([ext]),
+            runfiles = ctx.runfiles(transitive_files = depset(files, transitive = [crate_info.data])),
+        ),
+        PyInfo(
+            imports = _get_imports(ctx, ctx.attr.imports),
+            transitive_sources = depset(),
+        ),
+        coverage_common.instrumented_files_info(
+            ctx,
+            dependency_attributes = ["extension"],
+        ),
+    ]
+
+    # Forward any aspect-generated outputs for known rules_rust aspects.
+    if OutputGroupInfo in ctx.attr.extension:
+        output_info = ctx.attr.extension[OutputGroupInfo]
+        output_groups = {}
+        for group in ["rusfmt_checks", "clippy_checks", "rust_analyzer_crate_spec"]:
+            if hasattr(output_info, group):
+                output_groups[group] = getattr(output_info, group)
+
+        if stub:
+            output_groups["pyo3_type_stubs"] = depset([stub])
+
+        providers.append(OutputGroupInfo(**output_groups))
+
+    return providers
+
+py_pyo3_library = rule(
+    doc = "Define a Python library for a PyO3 extension.",
+    implementation = _py_pyo3_library_impl,
+    cfg = _compilation_mode_transition,
+    attrs = {
+        "compilation_mode": attr.string(
+            doc = (
+                "Specify the mode `extension` will be built in. For details see " +
+                " [`--compilation_mode`](https://bazel.build/reference/command-line-reference#flag--compilation_mode)"
+            ),
+            values = [
+                "dbg",
+                "fastbuild",
+                "opt",
+                "current",
+            ],
+            default = "opt",
+        ),
+        "extension": attr.label(
+            doc = "The PyO3 library.",
+            cfg = "target",
+            # `rust_shared_library` does not provide `CrateInfo` but
+            # does contain `TestCrateInfo` which wraps the data we need.
+            providers = [rust_common.test_crate_info],
+            # Ensure common linters are run on the extension and yielded by
+            # this rule for ease of access.
+            aspects = [
+                rust_analyzer_aspect,
+                rust_clippy_aspect,
+                rustfmt_aspect,
+            ],
+            mandatory = True,
+        ),
+        "imports": attr.string_list(
+            doc = "List of import directories to be added to the `PYTHONPATH`.",
+        ),
+        "stubs": attr.int(
+            doc = "Whether or not to generate stubs. `-1` will default to the global config, `0` will never generate, and `1` will always generate stubs.",
+            default = -1,
+            values = [
+                -1,
+                0,
+                1,
+            ],
+        ),
+        "_stubgen": attr.label(
+            doc = "A binary used to generate pythons type stubs.",
+            cfg = "exec",
+            executable = True,
+            default = Label("//private:stubgen"),
+        ),
+    },
+    toolchains = [PYO3_TOOLCHAIN],
+)
+
+def pyo3_extension(
+        *,
+        name,
+        srcs,
+        aliases = {},
+        compile_data = [],
+        crate_features = [],
+        crate_root = None,
+        data = [],
+        deps = [],
+        edition = None,
+        imports = [],
+        proc_macro_deps = [],
+        rustc_env = {},
+        rustc_env_files = [],
+        rustc_flags = [],
+        stubs = None,
+        version = None,
+        compilation_mode = "opt",
+        **kwargs):
+    """Define a PyO3 python extension module.
+
+    This target is consumed just as a `py_library` would be.
+
+    [rsl]: https://bazelbuild.github.io/rules_rust/defs.html#rust_shared_library
+    [pli]: https://bazel.build/reference/be/python#py_binary.imports
+
+    Args:
+        name (str): The name of the target.
+        srcs (list): List of Rust `.rs` source files used to build the library.
+            For more details see [rust_shared_library][rsl].
+        aliases (dict, optional): Remap crates to a new name or moniker for linkage to this target.
+            For more details see [rust_shared_library][rsl].
+        compile_data (list, optional): List of files used by this rule at compile time.
+            For more details see [rust_shared_library][rsl].
+        crate_features (list, optional): List of features to enable for this crate.
+            For more details see [rust_shared_library][rsl].
+        crate_root (Label, optional): The file that will be passed to `rustc` to be used for building this crate.
+            For more details see [rust_shared_library][rsl].
+        data (list, optional): List of files used by this rule at compile time and runtime.
+            For more details see [rust_shared_library][rsl].
+        deps (list, optional): List of other libraries to be linked to this library target.
+            For more details see [rust_shared_library][rsl].
+        edition (str, optional): The rust edition to use for this crate. Defaults to the edition specified in the rust_toolchain.
+            For more details see [rust_shared_library][rsl].
+        imports (list, optional): List of import directories to be added to the `PYTHONPATH`.
+            For more details see [py_library.imports][pli].
+        proc_macro_deps (list, optional): List of `rust_proc_macro` targets used to help build this library target.
+            For more details see [rust_shared_library][rsl].
+        rustc_env (dict, optional): Dictionary of additional `"key": "value"` environment variables to set for rustc.
+            For more details see [rust_shared_library][rsl].
+        rustc_env_files (list, optional): Files containing additional environment variables to set for rustc.
+            For more details see [rust_shared_library][rsl].
+        rustc_flags (list, optional): List of compiler flags passed to `rustc`.
+            For more details see [rust_shared_library][rsl].
+        stubs (bool, optional): Whether or not to generate stubs (`.pyi` file) for the module.
+        version (str, optional): A version to inject in the cargo environment variable.
+            For more details see [rust_shared_library][rsl].
+        compilation_mode (str, optional): The [compilation_mode](https://bazel.build/reference/command-line-reference#flag--compilation_mode)
+            value to build the extension for. If set to `"current"`, the current configuration will be used.
+        **kwargs (dict): Additional keyword arguments.
+    """
+    tags = kwargs.pop("tags", [])
+    visibility = kwargs.pop("visibility", None)
+
+    # Add macOS-specific flags
+
+    macos_flags = select({
+        "@platforms//os:macos": [
+            # https://pyo3.rs/v0.26.0/building-and-distribution.html#macos
+            "-C",
+            "link-arg=-undefined",
+            "-C",
+            "link-arg=dynamic_lookup",
+            # Required due to: https://github.com/PyO3/pyo3/issues/5035
+            "--codegen=link-arg=-Wl,-no_fixup_chains",
+        ],
+        "//conditions:default": [],
+    })
+
+    all_rustc_flags = rustc_flags + macos_flags
+
+    rust_shared_library(
+        name = name + "_shared",
+        srcs = srcs,
+        aliases = aliases,
+        compile_data = compile_data,
+        crate_features = crate_features,
+        crate_name = kwargs.pop("crate_name", name),
+        crate_root = crate_root,
+        data = data,
+        deps = [
+            Label("//private:current_rust_pyo3_toolchain"),
+            Label("@rules_python//python/cc:current_py_cc_headers"),
+        ] + deps,
+        edition = edition,
+        proc_macro_deps = proc_macro_deps,
+        rustc_env = rustc_env,
+        rustc_env_files = rustc_env_files,
+        rustc_flags = all_rustc_flags,
+        tags = depset(tags + ["manual"]).to_list(),
+        version = version,
+        visibility = ["//visibility:private"],
+        **kwargs
+    )
+
+    if stubs == None:
+        stubs_int = -1
+    elif stubs:
+        stubs_int = 1
+    else:
+        stubs_int = 0
+
+    py_pyo3_library(
+        name = name,
+        extension = name + "_shared",
+        compilation_mode = compilation_mode,
+        stubs = stubs_int,
+        imports = imports,
+        tags = tags,
+        visibility = visibility,
+        **kwargs
+    )
diff --git a/extensions/pyo3/private/pyo3_toolchain.bzl b/extensions/pyo3/private/pyo3_toolchain.bzl
new file mode 100644
index 0000000..857e0bd
--- /dev/null
+++ b/extensions/pyo3/private/pyo3_toolchain.bzl
@@ -0,0 +1,252 @@
+"""PyO3 Toolchains"""
+
+load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
+load("@rules_rust//rust:defs.bzl", "rust_common")
+
+PYO3_TOOLCHAIN = str(Label("//:toolchain_type"))
+
+RUST_PYO3_TOOLCHAIN = str(Label("//:rust_toolchain_type"))
+
+PY_IMPLEMENTATIONS = {
+    "cpython": "CPython",
+    "graalpy": "GraalVM",
+    "graalvm": "GraalVM",
+    "pypy": "PyPy",
+}
+
+def _pyo3_toolchain_impl(ctx):
+    py_toolchain = ctx.toolchains["@rules_python//python:toolchain_type"]
+
+    py_runtime = py_toolchain.py3_runtime
+    if py_runtime.interpreter:
+        interpreter = py_runtime.interpreter.path
+    else:
+        interpreter = py_runtime.interpreter_path
+
+    version_info = py_runtime.interpreter_version_info
+    version = "{}.{}".format(
+        version_info.major,
+        version_info.minor,
+    )
+
+    py_cc_toolchain = ctx.toolchains["@rules_python//python/cc:toolchain_type"].py_cc_toolchain
+
+    libs = []
+    for linker_input in py_cc_toolchain.libs.providers_map["CcInfo"].linking_context.linker_inputs.to_list():
+        for library in linker_input.libraries:
+            if library.dynamic_library:
+                libs.append(library.dynamic_library)
+            if library.static_library:
+                libs.append(library.static_library)
+
+    implementation = PY_IMPLEMENTATIONS[py_runtime.implementation_name.lower()]
+
+    preferred_lib_exts = (".dylib", ".so", ".lib")
+
+    root_lib = None
+    for lib in libs:
+        if not root_lib:
+            root_lib = lib
+            continue
+
+        if lib.basename.endswith(preferred_lib_exts) and not root_lib.basename.endswith(preferred_lib_exts):
+            root_lib = lib
+
+    if not root_lib:
+        fail("Failed to find python libraries for linking in '{}'".format(ctx.label))
+
+    # This set of environment variables is required for correctly building extension
+    # modules for any target platform.
+    make_variable_info = platform_common.TemplateVariableInfo({
+        "PYO3_CROSS": "1",
+        "PYO3_CROSS_LIB_DIR": root_lib.dirname,
+        "PYO3_CROSS_PYTHON_IMPLEMENTATION": implementation,
+        "PYO3_CROSS_PYTHON_VERSION": version,
+        "PYO3_NO_PYTHON": "1",
+        "PYO3_PYTHON": "$${pwd}/" + interpreter,
+    })
+
+    return [
+        platform_common.ToolchainInfo(
+            make_variable_info = make_variable_info,
+            python_libs = depset(libs),
+            experimental_stubgen = ctx.attr._experimental_stubgen[BuildSettingInfo].value,
+        ),
+        make_variable_info,
+        DefaultInfo(files = depset()),
+    ]
+
+pyo3_toolchain = rule(
+    doc = """\
+Define a toolchain which generates config data for the PyO3 for producing extension modules on any target platform.
+
+Note that this toolchain expects the `pyo3` crate to be built with the following features:
+- [`abi3`](https://pyo3.rs/v0.26.0/features.html?highlight=abi3#abi3)
+- [`abi3-py3*`](https://pyo3.rs/v0.26.0/features.html?highlight=abi3#the-abi3-pyxy-features) (e.g `abi3-py311`)
+- [`extension-module`](https://pyo3.rs/v0.26.0/features.html?highlight=abi3#extension-module)
+
+When using [rules_rust's crate_universe](https://bazelbuild.github.io/rules_rust/crate_universe.html), this data can be plubmed into the target using the following snippet.
+```python
+annotations = {
+    "pyo3-build-config": [
+        crate.annotation(
+            build_script_data = [
+                "@rules_rust_pyo3//:current_pyo3_toolchain",
+            ],
+            build_script_env = {
+                "PYO3_CROSS": "$(PYO3_CROSS)",
+                "PYO3_CROSS_LIB_DIR": "$(PYO3_CROSS_LIB_DIR)",
+                "PYO3_CROSS_PYTHON_IMPLEMENTATION": "$(PYO3_CROSS_PYTHON_IMPLEMENTATION)",
+                "PYO3_CROSS_PYTHON_VERSION": "$(PYO3_CROSS_PYTHON_VERSION)",
+                "PYO3_NO_PYTHON": "$(PYO3_NO_PYTHON)",
+                "PYO3_PYTHON": "$(PYO3_PYTHON)",
+            },
+            build_script_toolchains = [
+                "@rules_rust_pyo3//:current_pyo3_toolchain",
+            ],
+        ),
+    ],
+    "pyo3-ffi": [
+        crate.annotation(
+            build_script_data = [
+                "@rules_rust_pyo3//:current_pyo3_toolchain",
+            ],
+            build_script_env = {
+                "PYO3_CROSS": "$(PYO3_CROSS)",
+                "PYO3_CROSS_LIB_DIR": "$(PYO3_CROSS_LIB_DIR)",
+                "PYO3_CROSS_PYTHON_IMPLEMENTATION": "$(PYO3_CROSS_PYTHON_IMPLEMENTATION)",
+                "PYO3_CROSS_PYTHON_VERSION": "$(PYO3_CROSS_PYTHON_VERSION)",
+                "PYO3_NO_PYTHON": "$(PYO3_NO_PYTHON)",
+                "PYO3_PYTHON": "$(PYO3_PYTHON)",
+            },
+            build_script_toolchains = [
+                "@rules_rust_pyo3//:current_pyo3_toolchain",
+            ],
+        ),
+    ],
+},
+```
+""",
+    implementation = _pyo3_toolchain_impl,
+    attrs = {
+        "_experimental_stubgen": attr.label(
+            default = Label("//settings:experimental_stubgen"),
+        ),
+    },
+    toolchains = [
+        "@rules_python//python/cc:toolchain_type",
+        "@rules_python//python:toolchain_type",
+    ],
+)
+
+def _current_pyo3_toolchain_impl(ctx):
+    toolchain = ctx.toolchains[PYO3_TOOLCHAIN]
+    return [
+        toolchain.make_variable_info,
+        DefaultInfo(
+            files = depset(transitive = [toolchain.python_libs]),
+        ),
+    ]
+
+current_pyo3_toolchain = rule(
+    doc = "A rule for accessing the `pyo3_toolchain` from the current configuration.",
+    implementation = _current_pyo3_toolchain_impl,
+    toolchains = [PYO3_TOOLCHAIN],
+)
+
+def _rust_pyo3_toolchain_impl(ctx):
+    return [
+        platform_common.ToolchainInfo(
+            pyo3 = ctx.attr.pyo3,
+            pyo3_introspection = ctx.attr.pyo3_introspection,
+        ),
+    ]
+
+rust_pyo3_toolchain = rule(
+    doc = """\
+Define a toolchain for PyO3 Rust dependencies which power internal rules.
+
+This toolchain is how the rules know which version of `pyo3` to link against.
+""",
+    implementation = _rust_pyo3_toolchain_impl,
+    attrs = {
+        "pyo3": attr.label(
+            doc = "The PyO3 library.",
+            providers = [[rust_common.crate_info], [rust_common.crate_group_info]],
+            mandatory = True,
+        ),
+        "pyo3_introspection": attr.label(
+            doc = "The PyO3 introspection library.",
+            providers = [[rust_common.crate_info], [rust_common.crate_group_info]],
+            mandatory = True,
+        ),
+    },
+)
+
+def _current_rust_pyo3_toolchain_impl(ctx):
+    toolchain = ctx.toolchains[RUST_PYO3_TOOLCHAIN]
+    target = toolchain.pyo3
+
+    providers = []
+
+    # TODO: Remove this hack when we can just pass the input target's
+    # DefaultInfo provider through. Until then, we need to construct
+    # a new DefaultInfo provider with the files from the input target's
+    # provider.
+    providers.append(
+        DefaultInfo(
+            files = target[DefaultInfo].files,
+            runfiles = target[DefaultInfo].default_runfiles,
+        ),
+    )
+
+    if rust_common.crate_info in target:
+        providers.append(target[rust_common.crate_info])
+
+    if rust_common.dep_info in target:
+        providers.append(target[rust_common.dep_info])
+
+    if rust_common.crate_group_info in target:
+        providers.append(target[rust_common.crate_group_info])
+
+    return providers
+
+current_rust_pyo3_toolchain = rule(
+    doc = "A rule for accessing the `rust_pyo3_toolchain.pyo3` library from the current configuration.",
+    implementation = _current_rust_pyo3_toolchain_impl,
+    toolchains = [RUST_PYO3_TOOLCHAIN],
+)
+
+def _current_rust_pyo3_introspection_toolchain_impl(ctx):
+    toolchain = ctx.toolchains[RUST_PYO3_TOOLCHAIN]
+    target = toolchain.pyo3_introspection
+
+    providers = []
+
+    # TODO: Remove this hack when we can just pass the input target's
+    # DefaultInfo provider through. Until then, we need to construct
+    # a new DefaultInfo provider with the files from the input target's
+    # provider.
+    providers.append(
+        DefaultInfo(
+            files = target[DefaultInfo].files,
+            runfiles = target[DefaultInfo].default_runfiles,
+        ),
+    )
+
+    if rust_common.crate_info in target:
+        providers.append(target[rust_common.crate_info])
+
+    if rust_common.dep_info in target:
+        providers.append(target[rust_common.dep_info])
+
+    if rust_common.crate_group_info in target:
+        providers.append(target[rust_common.crate_group_info])
+
+    return providers
+
+current_rust_pyo3_introspection_toolchain = rule(
+    doc = "A rule for accessing the `rust_pyo3_toolchain.pyo3_introspection` library from the current configuration.",
+    implementation = _current_rust_pyo3_introspection_toolchain_impl,
+    toolchains = [RUST_PYO3_TOOLCHAIN],
+)
diff --git a/extensions/pyo3/private/stubgen.rs b/extensions/pyo3/private/stubgen.rs
new file mode 100644
index 0000000..413e2ad
--- /dev/null
+++ b/extensions/pyo3/private/stubgen.rs
@@ -0,0 +1,72 @@
+//! A tool for writing stubs from a [`pyo3::PyModule`].
+
+use std::env;
+use std::fs;
+use std::path::PathBuf;
+
+use pyo3_introspection::{introspect_cdylib, module_stub_files};
+
+#[derive(Debug)]
+struct Args {
+    /// The name of the PyO3 module.
+    module_name: String,
+
+    /// The path of the PyO3 library file.
+    module_path: PathBuf,
+
+    /// The output path for the stubs file
+    output: PathBuf,
+}
+
+impl Args {
+    pub fn parse() -> Self {
+        let mut module_name = None;
+        let mut module_path = None;
+        let mut output = None;
+
+        for arg in env::args().skip(1) {
+            if let Some((key, value)) = arg.split_once('=') {
+                match key {
+                    "--module_name" => module_name = Some(value.to_string()),
+                    "--module_path" => module_path = Some(PathBuf::from(value)),
+                    "--output" => output = Some(PathBuf::from(value)),
+                    _ => panic!("Unknown argument: {}", key),
+                }
+            } else {
+                panic!("Invalid argument format: {}", arg);
+            }
+        }
+
+        Self {
+            module_name: module_name.expect("Missing --module_name argument"),
+            module_path: module_path.expect("Missing --module_path argument"),
+            output: output.expect("Missing --output argument"),
+        }
+    }
+}
+
+fn main() {
+    let args = Args::parse();
+
+    // Load the module
+    let module = introspect_cdylib(&args.module_path, &args.module_name)
+        .expect("Failed to parse stubs from module.");
+
+    // Generate stubs
+    let mut actual_stubs = module_stub_files(&module);
+
+    // Extract stubs for root module.
+    let content = &actual_stubs
+        .remove(&PathBuf::from("__init__.pyi"))
+        .expect("Failed to locate stubs for root module.");
+
+    if !actual_stubs.is_empty() {
+        eprintln!("WARNING: Dropped stubs: {:#?}", actual_stubs);
+    }
+
+    // Save results
+    if let Some(parent) = args.output.parent() {
+        fs::create_dir_all(parent).unwrap();
+    }
+    fs::write(&args.output, content).unwrap();
+}
diff --git a/extensions/pyo3/settings/BUILD.bazel b/extensions/pyo3/settings/BUILD.bazel
new file mode 100644
index 0000000..573c617
--- /dev/null
+++ b/extensions/pyo3/settings/BUILD.bazel
@@ -0,0 +1,17 @@
+load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
+
+package(default_visibility = ["//visibility:public"])
+
+# A flag controlling whether to generate stubs for pyo3 extensions. This flag
+# requires the creation of binary from the extension crate to generate stubs
+# which means, the extension itself must be usable in some capacity on the
+# exec platform. An additional limitation is that the stubs will only ever
+# be generated for the exec platform so module interfaces should be platform
+# agnostic or incorrect stubs will be generated.
+#
+# The use of this feature requires the `experimental-inspect` feature. For
+# details see: https://pyo3.rs/v0.23.4/features.html#experimental-inspect
+bool_flag(
+    name = "experimental_stubgen",
+    build_setting_default = True,
+)
diff --git a/extensions/pyo3/test/BUILD.bazel b/extensions/pyo3/test/BUILD.bazel
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/extensions/pyo3/test/BUILD.bazel
diff --git a/extensions/pyo3/test/bzl_version/BUILD.bazel b/extensions/pyo3/test/bzl_version/BUILD.bazel
new file mode 100644
index 0000000..c791aa1
--- /dev/null
+++ b/extensions/pyo3/test/bzl_version/BUILD.bazel
@@ -0,0 +1,18 @@
+load("@rules_rust//rust:defs.bzl", "rust_test")
+load("//:version.bzl", "VERSION")
+
+rust_test(
+    name = "bzl_version_test",
+    srcs = ["bzl_version_test.rs"],
+    data = [
+        "//:MODULE.bazel",
+    ],
+    edition = "2021",
+    env = {
+        "MODULE_BAZEL": "$(rlocationpath //:MODULE.bazel)",
+        "VERSION": VERSION,
+    },
+    deps = [
+        "@rules_rust//tools/runfiles",
+    ],
+)
diff --git a/extensions/pyo3/test/bzl_version/bzl_version_test.rs b/extensions/pyo3/test/bzl_version/bzl_version_test.rs
new file mode 100644
index 0000000..85b296b
--- /dev/null
+++ b/extensions/pyo3/test/bzl_version/bzl_version_test.rs
@@ -0,0 +1,40 @@
+//! A test to ensure the rules_rust bzlmod versions match the standard versions.
+
+use runfiles::Runfiles;
+
+fn parse_module_bazel_version(text: &str) -> String {
+    let mut found_module = false;
+    for line in text.split('\n') {
+        if found_module {
+            assert!(!line.ends_with(')'), "Failed to parse version");
+            if let Some((param, value)) = line.rsplit_once(" = ") {
+                if param.trim() == "version" {
+                    return value.trim().trim_matches(',').trim_matches('"').to_owned();
+                }
+            }
+        } else if line.starts_with("module(") {
+            found_module = true;
+            continue;
+        }
+    }
+    panic!("Failed to find MODULE.bazel version");
+}
+
+/// If this test fails it means `//:version.bzl` and `//:MODULE.bazel` need to
+/// be synced up. `//:version.bzl` should contain the source of truth.
+#[test]
+fn module_bzl_has_correct_version() {
+    let version = std::env::var("VERSION").unwrap();
+    let module_bazel_text = {
+        let r = Runfiles::create().unwrap();
+        let path = runfiles::rlocation!(r, std::env::var("MODULE_BAZEL").unwrap()).unwrap();
+        std::fs::read_to_string(path).unwrap()
+    };
+
+    let module_bazel_version = parse_module_bazel_version(&module_bazel_text);
+
+    assert_eq!(
+        version, module_bazel_version,
+        "//:version.bzl and //:MODULE.bazel versions are out of sync"
+    );
+}
diff --git a/extensions/pyo3/test/bzlmod/BUILD.bazel b/extensions/pyo3/test/bzlmod/BUILD.bazel
new file mode 100644
index 0000000..ec89009
--- /dev/null
+++ b/extensions/pyo3/test/bzlmod/BUILD.bazel
@@ -0,0 +1,12 @@
+load("@rules_rust//test/bzl_version:bzl_ext_version_test.bzl", "bzl_ext_version_test")
+load("@rules_rust//test/bzl_version:bzl_version_test.bzl", "bzl_version_test")
+
+bzl_ext_version_test(
+    name = "bzl_ext_version_test",
+    module_bazel = "//:MODULE.bazel",
+)
+
+bzl_version_test(
+    name = "bzl_version_test",
+    module_bazel = "//:MODULE.bazel",
+)
diff --git a/extensions/pyo3/test/compilation_modes/BUILD.bazel b/extensions/pyo3/test/compilation_modes/BUILD.bazel
new file mode 100644
index 0000000..0dad4ae
--- /dev/null
+++ b/extensions/pyo3/test/compilation_modes/BUILD.bazel
@@ -0,0 +1,76 @@
+load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
+load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
+load("@rules_python//python:defs.bzl", "py_test")
+load("//:defs.bzl", "pyo3_extension")
+
+MODES = [
+    "dbg",
+    "opt",
+    "fastbuild",
+    "current",
+]
+
+[
+    expand_template(
+        name = "string_sum_{}_src".format(mode),
+        out = "string_sum_{}.rs".format(mode),
+        substitutions = {
+            "string_sum_current {": "string_sum_%s {" % mode,
+        },
+        template = "string_sum_current.rs",
+    )
+    for mode in MODES
+    # `current` is the actual source file.
+    if mode != "current"
+]
+
+[
+    pyo3_extension(
+        name = "string_sum_{}".format(mode),
+        srcs = ["string_sum_{}.rs".format(mode)],
+        compilation_mode = mode,
+        edition = "2021",
+    )
+    for mode in MODES
+]
+
+[
+    filegroup(
+        name = "string_sum_{}_type_stubs".format(mode),
+        srcs = [":string_sum_{}".format(mode)],
+        output_group = "pyo3_type_stubs",
+    )
+    for mode in MODES
+]
+
+[
+    diff_test(
+        name = "string_sum_{}_type_stubs_diff_test".format(mode),
+        file1 = "string_sum_current_expected.pyi",
+        file2 = "string_sum_{}_type_stubs".format(mode),
+    )
+    for mode in MODES
+]
+
+[
+    expand_template(
+        name = "string_sum_{}_test_src".format(mode),
+        out = "string_sum_{}_test.py".format(mode),
+        substitutions = {
+            "compilation_modes.string_sum_current": "compilation_modes.string_sum_{}".format(mode),
+        },
+        template = "string_sum_current_test.py",
+    )
+    for mode in MODES
+    # `current` is the actual source file.
+    if mode != "current"
+]
+
+[
+    py_test(
+        name = "string_sum_{}_test".format(mode),
+        srcs = ["string_sum_{}_test.py".format(mode)],
+        deps = [":string_sum_{}".format(mode)],
+    )
+    for mode in MODES
+]
diff --git a/extensions/pyo3/test/compilation_modes/string_sum_current.rs b/extensions/pyo3/test/compilation_modes/string_sum_current.rs
new file mode 100644
index 0000000..f2103ff
--- /dev/null
+++ b/extensions/pyo3/test/compilation_modes/string_sum_current.rs
@@ -0,0 +1,18 @@
+//! PyO3 Examples from https://pyo3.rs/v0.26.0/#using-rust-from-python
+
+use pyo3::prelude::*;
+
+/// A Python module implemented in Rust. The name of this function must match
+/// the `lib.name` setting in the `Cargo.toml`, else Python will not be able to
+/// import the module.
+#[pymodule]
+mod string_sum_current {
+
+    use super::*;
+
+    /// Formats the sum of two numbers as string.
+    #[pyfunction]
+    fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
+        Ok((a + b).to_string())
+    }
+}
diff --git a/extensions/pyo3/test/compilation_modes/string_sum_current_expected.pyi b/extensions/pyo3/test/compilation_modes/string_sum_current_expected.pyi
new file mode 100644
index 0000000..5b51ba0
--- /dev/null
+++ b/extensions/pyo3/test/compilation_modes/string_sum_current_expected.pyi
@@ -0,0 +1 @@
+def sum_as_string(a: int, b: int) -> str: ...
diff --git a/extensions/pyo3/test/compilation_modes/string_sum_current_test.py b/extensions/pyo3/test/compilation_modes/string_sum_current_test.py
new file mode 100644
index 0000000..1308462
--- /dev/null
+++ b/extensions/pyo3/test/compilation_modes/string_sum_current_test.py
@@ -0,0 +1,21 @@
+"""Unit tests to show simple interactions with PyO3 modules."""
+
+import unittest
+
+# isort: off
+from test.compilation_modes.string_sum_current import sum_as_string
+
+
+class StringSumTest(unittest.TestCase):
+    """Test Class."""
+
+    def test_sum_as_string(self) -> None:
+        """Simple test of rust defined functions."""
+
+        result = sum_as_string(1337, 42)
+        self.assertIsInstance(result, str)
+        self.assertEqual("1379", result)
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/extensions/pyo3/test/runfiles/BUILD.bazel b/extensions/pyo3/test/runfiles/BUILD.bazel
new file mode 100644
index 0000000..e0170ef
--- /dev/null
+++ b/extensions/pyo3/test/runfiles/BUILD.bazel
@@ -0,0 +1,19 @@
+load("@rules_python//python:defs.bzl", "py_test")
+load("//:defs.bzl", "pyo3_extension")
+
+pyo3_extension(
+    name = "reader",
+    srcs = ["reader.rs"],
+    data = ["data.txt"],
+    edition = "2021",
+    deps = ["@rules_rust//tools/runfiles"],
+)
+
+py_test(
+    name = "reader_test",
+    srcs = ["reader_test.py"],
+    deps = [
+        ":reader",
+        "@rules_python//python/runfiles",
+    ],
+)
diff --git a/extensions/pyo3/test/runfiles/data.txt b/extensions/pyo3/test/runfiles/data.txt
new file mode 100644
index 0000000..f58d689
--- /dev/null
+++ b/extensions/pyo3/test/runfiles/data.txt
@@ -0,0 +1 @@
+La-Li-Lu-Le-Lo
diff --git a/extensions/pyo3/test/runfiles/reader.rs b/extensions/pyo3/test/runfiles/reader.rs
new file mode 100644
index 0000000..d36d58c
--- /dev/null
+++ b/extensions/pyo3/test/runfiles/reader.rs
@@ -0,0 +1,24 @@
+//! A module for loading runfiles data.
+
+use pyo3::exceptions::PyFileNotFoundError;
+use pyo3::prelude::*;
+use runfiles::{rlocation, Runfiles};
+
+/// Formats the sum of two numbers as string.
+#[pyfunction]
+fn read_data() -> PyResult<String> {
+    let r = Runfiles::create().unwrap();
+    let path = rlocation!(r, "rules_rust_pyo3/test/runfiles/data.txt").unwrap();
+
+    std::fs::read_to_string(path).map_err(PyFileNotFoundError::new_err)
+}
+
+/// A Python module implemented in Rust. The name of this function must match
+/// the `lib.name` setting in the `Cargo.toml`, else Python will not be able to
+/// import the module.
+#[pymodule]
+fn reader(m: &Bound<'_, PyModule>) -> PyResult<()> {
+    m.add_function(wrap_pyfunction!(read_data, m)?)?;
+
+    Ok(())
+}
diff --git a/extensions/pyo3/test/runfiles/reader_test.py b/extensions/pyo3/test/runfiles/reader_test.py
new file mode 100644
index 0000000..fd42f2f
--- /dev/null
+++ b/extensions/pyo3/test/runfiles/reader_test.py
@@ -0,0 +1,55 @@
+"""A test that demonstrates rust code being able to interface with runfiles."""
+
+import unittest
+from pathlib import Path
+from test.runfiles import reader
+
+from python.runfiles import Runfiles
+
+
+def _rlocation(runfiles: Runfiles, rlocationpath: str) -> Path:
+    """Look up a runfile and ensure the file exists
+
+    Args:
+        runfiles: The runfiles object
+        rlocationpath: The runfile key
+
+    Returns:
+        The requested runifle.
+    """
+    runfile = runfiles.Rlocation(rlocationpath)
+    if not runfile:
+        raise FileNotFoundError(f"Failed to find runfile: {rlocationpath}")
+    path = Path(runfile)
+    if not path.exists():
+        raise FileNotFoundError(f"Runfile does not exist: ({rlocationpath}) {path}")
+    return path
+
+
+class RunfilesTest(unittest.TestCase):
+    """Test Class."""
+
+    def test_reader(self) -> None:
+        """A test which uses runfile data from rust code."""
+
+        result = reader.read_data()
+        self.assertIsInstance(result, str)
+        self.assertEqual("La-Li-Lu-Le-Lo", result.strip())
+
+    def test_transitive_runfiles_access(self) -> None:
+        """A test which interacts with transitive rust runfiles."""
+
+        runfiles = Runfiles.Create()
+        if not runfiles:
+            raise EnvironmentError("Failed to locate runfiles.")
+
+        rlocationpath = "rules_rust_pyo3/test/runfiles/data.txt"
+        data_file = _rlocation(runfiles, rlocationpath)
+
+        self.assertEqual(
+            "La-Li-Lu-Le-Lo", data_file.read_text(encoding="utf-8").strip()
+        )
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/extensions/pyo3/test/string_sum/BUILD.bazel b/extensions/pyo3/test/string_sum/BUILD.bazel
new file mode 100644
index 0000000..2165539
--- /dev/null
+++ b/extensions/pyo3/test/string_sum/BUILD.bazel
@@ -0,0 +1,27 @@
+load("@rules_python//python:defs.bzl", "py_test")
+load("//:defs.bzl", "pyo3_extension")
+
+pyo3_extension(
+    name = "string_sum",
+    srcs = ["string_sum.rs"],
+    edition = "2021",
+)
+
+py_test(
+    name = "string_sum_test",
+    srcs = ["string_sum_test.py"],
+    deps = [":string_sum"],
+)
+
+pyo3_extension(
+    name = "string_sum_import",
+    srcs = ["string_sum_import.rs"],
+    edition = "2021",
+    imports = ["."],
+)
+
+py_test(
+    name = "string_sum_import_test",
+    srcs = ["string_sum_import_test.py"],
+    deps = [":string_sum_import"],
+)
diff --git a/extensions/pyo3/test/string_sum/string_sum.rs b/extensions/pyo3/test/string_sum/string_sum.rs
new file mode 100644
index 0000000..9dccb5a
--- /dev/null
+++ b/extensions/pyo3/test/string_sum/string_sum.rs
@@ -0,0 +1,18 @@
+//! PyO3 Examples from https://pyo3.rs/v0.26.0/#using-rust-from-python
+
+use pyo3::prelude::*;
+
+/// A Python module implemented in Rust. The name of this function must match
+/// the `lib.name` setting in the `Cargo.toml`, else Python will not be able to
+/// import the module.
+#[pymodule]
+mod string_sum {
+
+    use super::*;
+
+    /// Formats the sum of two numbers as string.
+    #[pyfunction]
+    fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
+        Ok((a + b).to_string())
+    }
+}
diff --git a/extensions/pyo3/test/string_sum/string_sum_import.rs b/extensions/pyo3/test/string_sum/string_sum_import.rs
new file mode 100644
index 0000000..4b2662c
--- /dev/null
+++ b/extensions/pyo3/test/string_sum/string_sum_import.rs
@@ -0,0 +1,18 @@
+//! PyO3 Examples from https://pyo3.rs/v0.26.0/#using-rust-from-python
+
+use pyo3::prelude::*;
+
+/// Formats the sum of two numbers as string.
+#[pyfunction]
+fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
+    Ok((a + b).to_string())
+}
+
+/// A Python module implemented in Rust. The name of this function must match
+/// the `lib.name` setting in the `Cargo.toml`, else Python will not be able to
+/// import the module.
+#[pymodule]
+fn string_sum_import(m: &Bound<'_, PyModule>) -> PyResult<()> {
+    m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
+    Ok(())
+}
diff --git a/extensions/pyo3/test/string_sum/string_sum_import_test.py b/extensions/pyo3/test/string_sum/string_sum_import_test.py
new file mode 100644
index 0000000..379b423
--- /dev/null
+++ b/extensions/pyo3/test/string_sum/string_sum_import_test.py
@@ -0,0 +1,20 @@
+"""Unit tests to show simple interactions with PyO3 modules."""
+
+import unittest
+
+from string_sum_import import sum_as_string
+
+
+class StringSumTest(unittest.TestCase):
+    """Test Class."""
+
+    def test_sum_as_string(self) -> None:
+        """Simple test of rust defined functions."""
+
+        result = sum_as_string(1337, 42)
+        self.assertIsInstance(result, str)
+        self.assertEqual("1379", result)
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/extensions/pyo3/test/string_sum/string_sum_test.py b/extensions/pyo3/test/string_sum/string_sum_test.py
new file mode 100644
index 0000000..f73ce3c
--- /dev/null
+++ b/extensions/pyo3/test/string_sum/string_sum_test.py
@@ -0,0 +1,19 @@
+"""Unit tests to show simple interactions with PyO3 modules."""
+
+import unittest
+from test.string_sum import string_sum
+
+
+class StringSumTest(unittest.TestCase):
+    """Test Class."""
+
+    def test_sum_as_string(self) -> None:
+        """Simple test of rust defined functions."""
+
+        result = string_sum.sum_as_string(1337, 42)
+        self.assertIsInstance(result, str)
+        self.assertEqual("1379", result)
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/extensions/pyo3/test/stubs/BUILD.bazel b/extensions/pyo3/test/stubs/BUILD.bazel
new file mode 100644
index 0000000..4c1b549
--- /dev/null
+++ b/extensions/pyo3/test/stubs/BUILD.bazel
@@ -0,0 +1,28 @@
+load("@bazel_skylib//rules:diff_test.bzl", "diff_test")
+load("@rules_python//python:defs.bzl", "py_test")
+load("//:defs.bzl", "pyo3_extension")
+
+pyo3_extension(
+    name = "string_sum",
+    srcs = ["string_sum.rs"],
+    edition = "2021",
+    stubs = 1,
+)
+
+filegroup(
+    name = "string_sum_type_stubs",
+    srcs = [":string_sum"],
+    output_group = "pyo3_type_stubs",
+)
+
+diff_test(
+    name = "string_sum_type_stubs_diff_test",
+    file1 = "string_sum_expected.pyi",
+    file2 = ":string_sum_type_stubs",
+)
+
+py_test(
+    name = "string_sum_test",
+    srcs = ["string_sum_test.py"],
+    deps = [":string_sum"],
+)
diff --git a/extensions/pyo3/test/stubs/string_sum.rs b/extensions/pyo3/test/stubs/string_sum.rs
new file mode 100644
index 0000000..9dccb5a
--- /dev/null
+++ b/extensions/pyo3/test/stubs/string_sum.rs
@@ -0,0 +1,18 @@
+//! PyO3 Examples from https://pyo3.rs/v0.26.0/#using-rust-from-python
+
+use pyo3::prelude::*;
+
+/// A Python module implemented in Rust. The name of this function must match
+/// the `lib.name` setting in the `Cargo.toml`, else Python will not be able to
+/// import the module.
+#[pymodule]
+mod string_sum {
+
+    use super::*;
+
+    /// Formats the sum of two numbers as string.
+    #[pyfunction]
+    fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
+        Ok((a + b).to_string())
+    }
+}
diff --git a/extensions/pyo3/test/stubs/string_sum_expected.pyi b/extensions/pyo3/test/stubs/string_sum_expected.pyi
new file mode 100644
index 0000000..5b51ba0
--- /dev/null
+++ b/extensions/pyo3/test/stubs/string_sum_expected.pyi
@@ -0,0 +1 @@
+def sum_as_string(a: int, b: int) -> str: ...
diff --git a/extensions/pyo3/test/stubs/string_sum_test.py b/extensions/pyo3/test/stubs/string_sum_test.py
new file mode 100644
index 0000000..e43ce22
--- /dev/null
+++ b/extensions/pyo3/test/stubs/string_sum_test.py
@@ -0,0 +1,19 @@
+"""Unit tests to show simple interactions with PyO3 modules."""
+
+import unittest
+from test.stubs import string_sum
+
+
+class StringSumTest(unittest.TestCase):
+    """Test Class."""
+
+    def test_sum_as_string(self) -> None:
+        """Simple test of rust defined functions."""
+
+        result = string_sum.sum_as_string(1337, 42)
+        self.assertIsInstance(result, str)
+        self.assertEqual("1379", result)
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/extensions/pyo3/test/wheel/BUILD.bazel b/extensions/pyo3/test/wheel/BUILD.bazel
new file mode 100644
index 0000000..91afa78
--- /dev/null
+++ b/extensions/pyo3/test/wheel/BUILD.bazel
@@ -0,0 +1,64 @@
+load("@rules_python//python:defs.bzl", "py_test")
+load("@rules_python//python:packaging.bzl", py_wheel = "py_wheel_rule")
+load("//:defs.bzl", "pyo3_extension")
+
+pyo3_extension(
+    name = "string_sum",
+    srcs = ["string_sum.rs"],
+    edition = "2021",
+    visibility = ["//test:__subpackages__"],
+)
+
+# Package some specific py_library targets, without their dependencies
+py_wheel(
+    name = "rust_wheel",
+    distribution = "string_sum",
+    python_tag = "py3",
+    version = "0.0.1",
+    deps = [
+        ":string_sum",
+    ],
+)
+
+py_test(
+    name = "venv_test",
+    srcs = ["venv_test.py"],
+    data = [":rust_wheel"],
+    env = {
+        "IMPORT_STR": "from test.wheel.string_sum import sum_as_string",
+        "RUST_WHEEL": "$(rlocationpath :rust_wheel)",
+    },
+    deps = ["@rules_python//python/runfiles"],
+)
+
+pyo3_extension(
+    name = "string_sum_import",
+    srcs = ["string_sum_import.rs"],
+    edition = "2021",
+    imports = ["."],
+    visibility = ["//test:__subpackages__"],
+)
+
+# Package some specific py_library targets, without their dependencies
+py_wheel(
+    name = "rust_wheel_import",
+    distribution = "string_sum_import",
+    python_tag = "py3",
+    strip_path_prefixes = ["test/wheel"],
+    version = "0.0.1",
+    deps = [
+        ":string_sum_import",
+    ],
+)
+
+py_test(
+    name = "venv_import_test",
+    srcs = ["venv_test.py"],
+    data = [":rust_wheel_import"],
+    env = {
+        "IMPORT_STR": "from string_sum_import import sum_as_string",
+        "RUST_WHEEL": "$(rlocationpath :rust_wheel_import)",
+    },
+    main = "venv_test.py",
+    deps = ["@rules_python//python/runfiles"],
+)
diff --git a/extensions/pyo3/test/wheel/string_sum.rs b/extensions/pyo3/test/wheel/string_sum.rs
new file mode 100644
index 0000000..dda0254
--- /dev/null
+++ b/extensions/pyo3/test/wheel/string_sum.rs
@@ -0,0 +1,18 @@
+//! PyO3 Examples from https://pyo3.rs/v0.26.0/#using-rust-from-python
+
+use pyo3::prelude::*;
+
+/// Formats the sum of two numbers as string.
+#[pyfunction]
+fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
+    Ok((a + b).to_string())
+}
+
+/// A Python module implemented in Rust. The name of this function must match
+/// the `lib.name` setting in the `Cargo.toml`, else Python will not be able to
+/// import the module.
+#[pymodule]
+fn string_sum(m: &Bound<'_, PyModule>) -> PyResult<()> {
+    m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
+    Ok(())
+}
diff --git a/extensions/pyo3/test/wheel/string_sum_import.rs b/extensions/pyo3/test/wheel/string_sum_import.rs
new file mode 100644
index 0000000..4b2662c
--- /dev/null
+++ b/extensions/pyo3/test/wheel/string_sum_import.rs
@@ -0,0 +1,18 @@
+//! PyO3 Examples from https://pyo3.rs/v0.26.0/#using-rust-from-python
+
+use pyo3::prelude::*;
+
+/// Formats the sum of two numbers as string.
+#[pyfunction]
+fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
+    Ok((a + b).to_string())
+}
+
+/// A Python module implemented in Rust. The name of this function must match
+/// the `lib.name` setting in the `Cargo.toml`, else Python will not be able to
+/// import the module.
+#[pymodule]
+fn string_sum_import(m: &Bound<'_, PyModule>) -> PyResult<()> {
+    m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
+    Ok(())
+}
diff --git a/extensions/pyo3/test/wheel/venv_test.py b/extensions/pyo3/test/wheel/venv_test.py
new file mode 100644
index 0000000..ac90151
--- /dev/null
+++ b/extensions/pyo3/test/wheel/venv_test.py
@@ -0,0 +1,105 @@
+"""Test a pyo3 extension module in a venv."""
+
+import os
+import platform
+import subprocess
+import sys
+import tempfile
+import unittest
+from pathlib import Path
+
+from python.runfiles import Runfiles
+
+
+def _rlocation(runfiles: Runfiles, rlocationpath: str) -> Path:
+    """Look up a runfile and ensure the file exists
+
+    Args:
+        runfiles: The runfiles object
+        rlocationpath: The runfile key
+
+    Returns:
+        The requested runifle.
+    """
+    runfile = runfiles.Rlocation(rlocationpath)
+    if not runfile:
+        raise FileNotFoundError(f"Failed to find runfile: {rlocationpath}")
+    path = Path(runfile)
+    if not path.exists():
+        raise FileNotFoundError(f"Runfile does not exist: ({rlocationpath}) {path}")
+    return path
+
+
+def _create_venv(path: Path) -> Path:
+    """Create a venv in the given path and return the new interpreter."""
+    subprocess.run(
+        [
+            sys.executable,
+            "-m",
+            "venv",
+            path,
+        ],
+        check=True,
+    )
+
+    if platform.system() == "Windows":
+        return path / "Scripts/python.exe"
+
+    return path / "bin/python"
+
+
+class VenvTest(unittest.TestCase):
+    """PyO3 tests within a venv."""
+
+    def test_wheel_in_venv(self) -> None:
+        """A test that shows pyo3 extensions are usable from wheels
+
+        This covers the published/canonical workflow for python users.
+        """
+        runfiles = Runfiles.Create()
+        if not runfiles:
+            raise EnvironmentError("Failed to locate runfiles.")
+
+        rust_wheel = _rlocation(runfiles, os.environ["RUST_WHEEL"])
+
+        with tempfile.TemporaryDirectory(dir=os.getenv("TEST_TMPDIR")) as tmp_dir:
+            tmp_path = Path(tmp_dir)
+            venv_interp = _create_venv(tmp_path / "venv")
+
+            # Install the wheel
+            subprocess.run(
+                [
+                    venv_interp,
+                    "-m",
+                    "pip",
+                    "--disable-pip-version-check",
+                    "install",
+                    rust_wheel,
+                ],
+                check=True,
+            )
+
+            output = tmp_path / "output.txt"
+            import_str = os.environ["IMPORT_STR"]
+
+            # Run code which uses the wheel
+            subprocess.run(
+                [
+                    venv_interp,
+                    "-c",
+                    "; ".join(
+                        [
+                            import_str,
+                            "from pathlib import Path",
+                            f'Path("{output.as_posix()}").write_text(sum_as_string(1337, 42), encoding="utf-8")',
+                        ]
+                    ),
+                ],
+                check=True,
+            )
+
+            self.assertEqual(output.read_text(encoding="utf-8"), "1379")
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/extensions/pyo3/toolchains/BUILD.bazel b/extensions/pyo3/toolchains/BUILD.bazel
new file mode 100644
index 0000000..b0be097
--- /dev/null
+++ b/extensions/pyo3/toolchains/BUILD.bazel
@@ -0,0 +1,31 @@
+load("@rules_rust//rust:defs.bzl", "rust_library_group")
+load("//:defs.bzl", "pyo3_toolchain", "rust_pyo3_toolchain")
+
+rust_library_group(
+    name = "pyo3",
+    deps = [
+        "@rpyo3c//:pyo3",
+    ],
+)
+
+rust_pyo3_toolchain(
+    name = "rust_pyo3_toolchain",
+    pyo3 = ":pyo3",
+    pyo3_introspection = "@rpyo3c//:pyo3-introspection",
+)
+
+toolchain(
+    name = "rust_toolchain",
+    toolchain = ":rust_pyo3_toolchain",
+    toolchain_type = "//:rust_toolchain_type",
+)
+
+pyo3_toolchain(
+    name = "pyo3_toolchain",
+)
+
+toolchain(
+    name = "toolchain",
+    toolchain = ":pyo3_toolchain",
+    toolchain_type = "//:toolchain_type",
+)
diff --git a/extensions/pyo3/version.bzl b/extensions/pyo3/version.bzl
new file mode 100644
index 0000000..cb46477
--- /dev/null
+++ b/extensions/pyo3/version.bzl
@@ -0,0 +1,3 @@
+""""rules_rust_pyo3 version"""
+
+VERSION = "0.65.0"