diff --git a/rust/Cargo.toml b/rust/Cargo.toml index b82e322b02..46b818bb61 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -81,8 +81,10 @@ tokio-tungstenite = { version = "0.28.0", default-features = false, features = [ zip = { version = "7.2.0", default-features = false, features = ["deflate"], optional = true } windows-sys = { version = "0.61", default-features = false, features = [ "Win32_Foundation", - "Win32_System_Diagnostics_ToolHelp", + "Win32_System_Diagnostics_Debug", + "Win32_System_Diagnostics_ProcessSnapshotting", "Win32_System_JobObjects", + "Win32_System_Kernel", "Win32_System_Threading", ] } diff --git a/rust/README.md b/rust/README.md index 87484defec..f233c8b14e 100644 --- a/rust/README.md +++ b/rust/README.md @@ -124,6 +124,12 @@ Transport-specific phases are optional. For example, `port_wait_ms` is present only for TCP and `process_spawn_ms` is absent for external and in-process transports. +On Windows, SDK-spawned CLI processes start suspended and are assigned to a +private kill-on-close Job Object before their initial thread resumes. Thread +lookup captures only that child's process snapshot, rather than enumerating +machine-wide threads. The Job owns the CLI and its descendants until client +shutdown or final-client drop, including abrupt termination of the SDK host. + **`ClientOptions`:** | Field | Type | Description | diff --git a/rust/bazel/crates/BUILD.aead-0.5.2.bazel b/rust/bazel/crates/BUILD.aead-0.5.2.bazel new file mode 100644 index 0000000000..9175862a94 --- /dev/null +++ b/rust/bazel/crates/BUILD.aead-0.5.2.bazel @@ -0,0 +1,72 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "aead", + 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", + "getrandom", + "rand_core", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=aead", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.5.2", + deps = [ + "@sdk_vendor__crypto-common-0.1.7//:crypto_common", + "@sdk_vendor__generic-array-0.14.7//:generic_array", + ], +) diff --git a/rust/bazel/crates/BUILD.aes-0.8.4.bazel b/rust/bazel/crates/BUILD.aes-0.8.4.bazel new file mode 100644 index 0000000000..9e36fc656f --- /dev/null +++ b/rust/bazel/crates/BUILD.aes-0.8.4.bazel @@ -0,0 +1,86 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "aes", + 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=aes", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.8.4", + deps = [ + "@sdk_vendor__cfg-if-1.0.5//:cfg_if", + "@sdk_vendor__cipher-0.4.4//:cipher", + ] + select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")) + ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")) + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")) + ], + "//conditions:default": [], + }), +) diff --git a/rust/bazel/crates/BUILD.aes-gcm-0.10.3.bazel b/rust/bazel/crates/BUILD.aes-gcm-0.10.3.bazel new file mode 100644 index 0000000000..55bd072506 --- /dev/null +++ b/rust/bazel/crates/BUILD.aes-gcm-0.10.3.bazel @@ -0,0 +1,77 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "aes_gcm", + 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 = [ + "aes", + "alloc", + "default", + "getrandom", + "rand_core", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=aes-gcm", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.10.3", + deps = [ + "@sdk_vendor__aead-0.5.2//:aead", + "@sdk_vendor__aes-0.8.4//:aes", + "@sdk_vendor__cipher-0.4.4//:cipher", + "@sdk_vendor__ctr-0.9.2//:ctr", + "@sdk_vendor__ghash-0.5.1//:ghash", + "@sdk_vendor__subtle-2.6.1//:subtle", + ], +) diff --git a/rust/bazel/crates/BUILD.ahp-0.9.0.bazel b/rust/bazel/crates/BUILD.ahp-0.9.0.bazel new file mode 100644 index 0000000000..0ab4ff85af --- /dev/null +++ b/rust/bazel/crates/BUILD.ahp-0.9.0.bazel @@ -0,0 +1,71 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "ahp", + 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=ahp", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.9.0", + deps = [ + "@sdk_vendor__ahp-types-0.9.0//:ahp_types", + "@sdk_vendor__jiff-0.2.37//:jiff", + "@sdk_vendor__serde-1.0.229//:serde", + "@sdk_vendor__serde_json-1.0.151//:serde_json", + "@sdk_vendor__thiserror-2.0.20//:thiserror", + "@sdk_vendor__tokio-1.53.1//:tokio", + "@sdk_vendor__tracing-0.1.44//:tracing", + ], +) diff --git a/rust/bazel/crates/BUILD.ahp-types-0.9.0.bazel b/rust/bazel/crates/BUILD.ahp-types-0.9.0.bazel new file mode 100644 index 0000000000..91ebc1ccf4 --- /dev/null +++ b/rust/bazel/crates/BUILD.ahp-types-0.9.0.bazel @@ -0,0 +1,69 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "ahp_types", + 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", + proc_macro_deps = [ + "@sdk_vendor__serde_repr-0.1.21//:serde_repr", + ], + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=ahp-types", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.9.0", + deps = [ + "@sdk_vendor__serde-1.0.229//:serde", + "@sdk_vendor__serde_json-1.0.151//:serde_json", + ], +) diff --git a/rust/bazel/crates/BUILD.ahp-ws-0.9.0.bazel b/rust/bazel/crates/BUILD.ahp-ws-0.9.0.bazel new file mode 100644 index 0000000000..398d2799a9 --- /dev/null +++ b/rust/bazel/crates/BUILD.ahp-ws-0.9.0.bazel @@ -0,0 +1,71 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "ahp_ws", + 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=ahp-ws", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.9.0", + deps = [ + "@sdk_vendor__ahp-0.9.0//:ahp", + "@sdk_vendor__futures-util-0.3.34//:futures_util", + "@sdk_vendor__serde_json-1.0.151//:serde_json", + "@sdk_vendor__thiserror-2.0.20//:thiserror", + "@sdk_vendor__tokio-1.53.1//:tokio", + "@sdk_vendor__tokio-tungstenite-0.29.0//:tokio_tungstenite", + "@sdk_vendor__url-2.5.8//:url", + ], +) diff --git a/rust/bazel/crates/BUILD.bazel b/rust/bazel/crates/BUILD.bazel index 9ffb64364d..b88906f3e8 100644 --- a/rust/bazel/crates/BUILD.bazel +++ b/rust/bazel/crates/BUILD.bazel @@ -31,6 +31,42 @@ filegroup( ) # Workspace Member Dependencies +alias( + name = "ahp-0.9.0", + actual = "@sdk_vendor__ahp-0.9.0//:ahp", + tags = ["manual"], +) + +alias( + name = "ahp", + actual = "@sdk_vendor__ahp-0.9.0//:ahp", + tags = ["manual"], +) + +alias( + name = "ahp-types-0.9.0", + actual = "@sdk_vendor__ahp-types-0.9.0//:ahp_types", + tags = ["manual"], +) + +alias( + name = "ahp-types", + actual = "@sdk_vendor__ahp-types-0.9.0//:ahp_types", + tags = ["manual"], +) + +alias( + name = "ahp-ws-0.9.0", + actual = "@sdk_vendor__ahp-ws-0.9.0//:ahp_ws", + tags = ["manual"], +) + +alias( + name = "ahp-ws", + actual = "@sdk_vendor__ahp-ws-0.9.0//:ahp_ws", + tags = ["manual"], +) + alias( name = "async-trait-0.1.92", actual = "@sdk_vendor__async-trait-0.1.92//:async_trait", @@ -115,6 +151,18 @@ alias( tags = ["manual"], ) +alias( + name = "hpke-0.12.0", + actual = "@sdk_vendor__hpke-0.12.0//:hpke", + tags = ["manual"], +) + +alias( + name = "hpke", + actual = "@sdk_vendor__hpke-0.12.0//:hpke", + tags = ["manual"], +) + alias( name = "http-1.5.0", actual = "@sdk_vendor__http-1.5.0//:http", @@ -181,6 +229,18 @@ alias( tags = ["manual"], ) +alias( + name = "rand_core-0.6.4", + actual = "@sdk_vendor__rand_core-0.6.4//:rand_core", + tags = ["manual"], +) + +alias( + name = "rand_core", + actual = "@sdk_vendor__rand_core-0.6.4//:rand_core", + tags = ["manual"], +) + alias( name = "regex-1.13.1", actual = "@sdk_vendor__regex-1.13.1//:regex", diff --git a/rust/bazel/crates/BUILD.bitflags-1.3.2.bazel b/rust/bazel/crates/BUILD.bitflags-1.3.2.bazel new file mode 100644 index 0000000000..bb9940d4df --- /dev/null +++ b/rust/bazel/crates/BUILD.bitflags-1.3.2.bazel @@ -0,0 +1,62 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "bitflags", + 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=bitflags", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.3.2", +) diff --git a/rust/bazel/crates/BUILD.chacha20-0.9.1.bazel b/rust/bazel/crates/BUILD.chacha20-0.9.1.bazel new file mode 100644 index 0000000000..47380b2165 --- /dev/null +++ b/rust/bazel/crates/BUILD.chacha20-0.9.1.bazel @@ -0,0 +1,80 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "chacha20", + 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 = [ + "zeroize", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=chacha20", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.9.1", + deps = [ + "@sdk_vendor__cfg-if-1.0.5//:cfg_if", + "@sdk_vendor__cipher-0.4.4//:cipher", + ] + select({ + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "x86_64", target_arch = "x86")) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "x86_64", target_arch = "x86")) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "x86_64", target_arch = "x86")) + ], + "//conditions:default": [], + }), +) diff --git a/rust/bazel/crates/BUILD.chacha20poly1305-0.10.1.bazel b/rust/bazel/crates/BUILD.chacha20poly1305-0.10.1.bazel new file mode 100644 index 0000000000..c14724e459 --- /dev/null +++ b/rust/bazel/crates/BUILD.chacha20poly1305-0.10.1.bazel @@ -0,0 +1,75 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "chacha20poly1305", + 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", + "getrandom", + "rand_core", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=chacha20poly1305", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.10.1", + deps = [ + "@sdk_vendor__aead-0.5.2//:aead", + "@sdk_vendor__chacha20-0.9.1//:chacha20", + "@sdk_vendor__cipher-0.4.4//:cipher", + "@sdk_vendor__poly1305-0.8.0//:poly1305", + "@sdk_vendor__zeroize-1.9.0//:zeroize", + ], +) diff --git a/rust/bazel/crates/BUILD.cipher-0.4.4.bazel b/rust/bazel/crates/BUILD.cipher-0.4.4.bazel new file mode 100644 index 0000000000..b3f32bb52b --- /dev/null +++ b/rust/bazel/crates/BUILD.cipher-0.4.4.bazel @@ -0,0 +1,70 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "cipher", + 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 = [ + "zeroize", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=cipher", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.4.4", + deps = [ + "@sdk_vendor__crypto-common-0.1.7//:crypto_common", + "@sdk_vendor__inout-0.1.4//:inout", + "@sdk_vendor__zeroize-1.9.0//:zeroize", + ], +) diff --git a/rust/bazel/crates/BUILD.crypto-common-0.1.7.bazel b/rust/bazel/crates/BUILD.crypto-common-0.1.7.bazel index b59ff4a0e6..a2c6cecaf6 100644 --- a/rust/bazel/crates/BUILD.crypto-common-0.1.7.bazel +++ b/rust/bazel/crates/BUILD.crypto-common-0.1.7.bazel @@ -35,6 +35,8 @@ rust_library( ], ), crate_features = [ + "getrandom", + "rand_core", "std", ], crate_root = "src/lib.rs", @@ -64,6 +66,7 @@ rust_library( version = "0.1.7", deps = [ "@sdk_vendor__generic-array-0.14.7//:generic_array", + "@sdk_vendor__rand_core-0.6.4//:rand_core", "@sdk_vendor__typenum-1.20.1//:typenum", ], ) diff --git a/rust/bazel/crates/BUILD.ctr-0.9.2.bazel b/rust/bazel/crates/BUILD.ctr-0.9.2.bazel new file mode 100644 index 0000000000..e512c0ec84 --- /dev/null +++ b/rust/bazel/crates/BUILD.ctr-0.9.2.bazel @@ -0,0 +1,65 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "ctr", + 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=ctr", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.9.2", + deps = [ + "@sdk_vendor__cipher-0.4.4//:cipher", + ], +) diff --git a/rust/bazel/crates/BUILD.curve25519-dalek-4.1.3.bazel b/rust/bazel/crates/BUILD.curve25519-dalek-4.1.3.bazel new file mode 100644 index 0000000000..47f2e02638 --- /dev/null +++ b/rust/bazel/crates/BUILD.curve25519-dalek-4.1.3.bazel @@ -0,0 +1,159 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "curve25519_dalek", + 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", + proc_macro_deps = select({ + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@sdk_vendor__curve25519-dalek-derive-0.1.1//:curve25519_dalek_derive", # cfg(all(not(curve25519_dalek_backend = "fiat"), not(curve25519_dalek_backend = "serial"), target_arch = "x86_64")) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@sdk_vendor__curve25519-dalek-derive-0.1.1//:curve25519_dalek_derive", # cfg(all(not(curve25519_dalek_backend = "fiat"), not(curve25519_dalek_backend = "serial"), target_arch = "x86_64")) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@sdk_vendor__curve25519-dalek-derive-0.1.1//:curve25519_dalek_derive", # cfg(all(not(curve25519_dalek_backend = "fiat"), not(curve25519_dalek_backend = "serial"), target_arch = "x86_64")) + ], + "//conditions:default": [], + }), + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=curve25519-dalek", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "4.1.3", + deps = [ + ":build_script_build", + "@sdk_vendor__cfg-if-1.0.5//:cfg_if", + "@sdk_vendor__subtle-2.6.1//:subtle", + ] + select({ + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(target_arch = "x86_64") + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(target_arch = "x86_64") + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(target_arch = "x86_64") + ], + "//conditions:default": [], + }), +) + +cargo_build_script( + name = "_bs", + srcs = glob( + include = ["**/*.rs"], + allow_empty = True, + ), + build_script_env_files = [ + ":cargo_toml_env_vars", + ], + compile_data = glob( + include = ["**"], + allow_empty = True, + exclude = [ + "**/* *", + "**/*.rs", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + 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", + emit_warnings = False, + pkg_name = "curve25519-dalek", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=curve25519-dalek", + "manual", + "noclippy", + "norustfmt", + ], + version = "4.1.3", + visibility = ["//visibility:private"], + deps = [ + "@sdk_vendor__rustc_version-0.4.1//:rustc_version", + ], +) + +alias( + name = "build_script_build", + actual = ":_bs", + tags = ["manual"], +) diff --git a/rust/bazel/crates/BUILD.curve25519-dalek-derive-0.1.1.bazel b/rust/bazel/crates/BUILD.curve25519-dalek-derive-0.1.1.bazel new file mode 100644 index 0000000000..a3ffd6b0c9 --- /dev/null +++ b/rust/bazel/crates/BUILD.curve25519-dalek-derive-0.1.1.bazel @@ -0,0 +1,67 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "curve25519_dalek_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 = "2021", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=curve25519-dalek-derive", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.1.1", + deps = [ + "@sdk_vendor__proc-macro2-1.0.107//:proc_macro2", + "@sdk_vendor__quote-1.0.47//:quote", + "@sdk_vendor__syn-2.0.119//:syn", + ], +) diff --git a/rust/bazel/crates/BUILD.defmt-1.1.1.bazel b/rust/bazel/crates/BUILD.defmt-1.1.1.bazel new file mode 100644 index 0000000000..4f95695cae --- /dev/null +++ b/rust/bazel/crates/BUILD.defmt-1.1.1.bazel @@ -0,0 +1,136 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "defmt", + 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", + proc_macro_deps = [ + "@sdk_vendor__defmt-macros-1.1.1//:defmt_macros", + ], + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=defmt", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.1.1", + deps = [ + ":build_script_build", + "@sdk_vendor__bitflags-1.3.2//:bitflags", + ], +) + +cargo_build_script( + name = "_bs", + srcs = glob( + include = ["**/*.rs"], + allow_empty = True, + ), + build_script_env_files = [ + ":cargo_toml_env_vars", + ], + compile_data = glob( + include = ["**"], + allow_empty = True, + exclude = [ + "**/* *", + "**/*.rs", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + 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", + emit_warnings = False, + links = "defmt", + pkg_name = "defmt", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=defmt", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.1.1", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = ":_bs", + tags = ["manual"], +) diff --git a/rust/bazel/crates/BUILD.defmt-macros-1.1.1.bazel b/rust/bazel/crates/BUILD.defmt-macros-1.1.1.bazel new file mode 100644 index 0000000000..a5552d3b67 --- /dev/null +++ b/rust/bazel/crates/BUILD.defmt-macros-1.1.1.bazel @@ -0,0 +1,135 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel:vendor +############################################################################### + +load( + "@rules_rust//cargo:defs.bzl", + "cargo_build_script", + "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 = "defmt_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_root = "src/lib.rs", + edition = "2021", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=defmt-macros", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.1.1", + deps = [ + ":build_script_build", + "@sdk_vendor__defmt-parser-1.0.0//:defmt_parser", + "@sdk_vendor__proc-macro2-1.0.107//:proc_macro2", + "@sdk_vendor__quote-1.0.47//:quote", + "@sdk_vendor__syn-2.0.119//:syn", + ], +) + +cargo_build_script( + name = "_bs", + srcs = glob( + include = ["**/*.rs"], + allow_empty = True, + ), + build_script_env_files = [ + ":cargo_toml_env_vars", + ], + compile_data = glob( + include = ["**"], + allow_empty = True, + exclude = [ + "**/* *", + "**/*.rs", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + 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", + emit_warnings = False, + pkg_name = "defmt-macros", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=defmt-macros", + "manual", + "noclippy", + "norustfmt", + ], + version = "1.1.1", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = ":_bs", + tags = ["manual"], +) diff --git a/rust/bazel/crates/BUILD.defmt-parser-1.0.0.bazel b/rust/bazel/crates/BUILD.defmt-parser-1.0.0.bazel new file mode 100644 index 0000000000..06a98cbb29 --- /dev/null +++ b/rust/bazel/crates/BUILD.defmt-parser-1.0.0.bazel @@ -0,0 +1,65 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "defmt_parser", + 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=defmt-parser", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.0", + deps = [ + "@sdk_vendor__thiserror-2.0.20//:thiserror", + ], +) diff --git a/rust/bazel/crates/BUILD.digest-0.10.7.bazel b/rust/bazel/crates/BUILD.digest-0.10.7.bazel index 68180755a4..5042c369a5 100644 --- a/rust/bazel/crates/BUILD.digest-0.10.7.bazel +++ b/rust/bazel/crates/BUILD.digest-0.10.7.bazel @@ -39,7 +39,9 @@ rust_library( "block-buffer", "core-api", "default", + "mac", "std", + "subtle", ], crate_root = "src/lib.rs", edition = "2018", @@ -69,5 +71,6 @@ rust_library( deps = [ "@sdk_vendor__block-buffer-0.10.4//:block_buffer", "@sdk_vendor__crypto-common-0.1.7//:crypto_common", + "@sdk_vendor__subtle-2.6.1//:subtle", ], ) diff --git a/rust/bazel/crates/BUILD.fiat-crypto-0.2.9.bazel b/rust/bazel/crates/BUILD.fiat-crypto-0.2.9.bazel new file mode 100644 index 0000000000..8b97d59f2d --- /dev/null +++ b/rust/bazel/crates/BUILD.fiat-crypto-0.2.9.bazel @@ -0,0 +1,62 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "fiat_crypto", + 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=fiat-crypto", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.9", +) diff --git a/rust/bazel/crates/BUILD.ghash-0.5.1.bazel b/rust/bazel/crates/BUILD.ghash-0.5.1.bazel new file mode 100644 index 0000000000..702a223725 --- /dev/null +++ b/rust/bazel/crates/BUILD.ghash-0.5.1.bazel @@ -0,0 +1,66 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "ghash", + 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=ghash", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.5.1", + deps = [ + "@sdk_vendor__opaque-debug-0.3.1//:opaque_debug", + "@sdk_vendor__polyval-0.6.2//:polyval", + ], +) diff --git a/rust/bazel/crates/BUILD.hkdf-0.12.4.bazel b/rust/bazel/crates/BUILD.hkdf-0.12.4.bazel new file mode 100644 index 0000000000..11551171f7 --- /dev/null +++ b/rust/bazel/crates/BUILD.hkdf-0.12.4.bazel @@ -0,0 +1,65 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "hkdf", + 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=hkdf", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.12.4", + deps = [ + "@sdk_vendor__hmac-0.12.1//:hmac", + ], +) diff --git a/rust/bazel/crates/BUILD.hmac-0.12.1.bazel b/rust/bazel/crates/BUILD.hmac-0.12.1.bazel new file mode 100644 index 0000000000..23719644ae --- /dev/null +++ b/rust/bazel/crates/BUILD.hmac-0.12.1.bazel @@ -0,0 +1,65 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "hmac", + 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=hmac", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.12.1", + deps = [ + "@sdk_vendor__digest-0.10.7//:digest", + ], +) diff --git a/rust/bazel/crates/BUILD.hpke-0.12.0.bazel b/rust/bazel/crates/BUILD.hpke-0.12.0.bazel new file mode 100644 index 0000000000..a4fb0eeac7 --- /dev/null +++ b/rust/bazel/crates/BUILD.hpke-0.12.0.bazel @@ -0,0 +1,80 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "hpke", + 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", + "x25519", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=hpke", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.12.0", + deps = [ + "@sdk_vendor__aead-0.5.2//:aead", + "@sdk_vendor__aes-gcm-0.10.3//:aes_gcm", + "@sdk_vendor__chacha20poly1305-0.10.1//:chacha20poly1305", + "@sdk_vendor__digest-0.10.7//:digest", + "@sdk_vendor__generic-array-0.14.7//:generic_array", + "@sdk_vendor__hkdf-0.12.4//:hkdf", + "@sdk_vendor__hmac-0.12.1//:hmac", + "@sdk_vendor__rand_core-0.6.4//:rand_core", + "@sdk_vendor__sha2-0.10.9//:sha2", + "@sdk_vendor__subtle-2.6.1//:subtle", + "@sdk_vendor__x25519-dalek-2.0.1//:x25519_dalek", + "@sdk_vendor__zeroize-1.9.0//:zeroize", + ], +) diff --git a/rust/bazel/crates/BUILD.inout-0.1.4.bazel b/rust/bazel/crates/BUILD.inout-0.1.4.bazel new file mode 100644 index 0000000000..05c03afaa4 --- /dev/null +++ b/rust/bazel/crates/BUILD.inout-0.1.4.bazel @@ -0,0 +1,65 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "inout", + 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=inout", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.1.4", + deps = [ + "@sdk_vendor__generic-array-0.14.7//:generic_array", + ], +) diff --git a/rust/bazel/crates/BUILD.jiff-0.2.37.bazel b/rust/bazel/crates/BUILD.jiff-0.2.37.bazel new file mode 100644 index 0000000000..7ec75ef3ca --- /dev/null +++ b/rust/bazel/crates/BUILD.jiff-0.2.37.bazel @@ -0,0 +1,72 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "jiff", + srcs = glob( + include = ["**/*.rs"], + allow_empty = True, + ), + aliases = { + "@sdk_vendor__jiff-core-0.1.1//:jiff_core": "jcore", + }, + 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=jiff", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.37", + deps = [ + "@sdk_vendor__jiff-core-0.1.1//:jiff_core", + ], +) diff --git a/rust/bazel/crates/BUILD.jiff-core-0.1.1.bazel b/rust/bazel/crates/BUILD.jiff-core-0.1.1.bazel new file mode 100644 index 0000000000..921942c698 --- /dev/null +++ b/rust/bazel/crates/BUILD.jiff-core-0.1.1.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 @@//src/sdk/rust/bazel: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 = "jiff_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 = [ + "alloc", + "default", + "std", + "tz-fat", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=jiff-core", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.1.1", +) diff --git a/rust/bazel/crates/BUILD.jiff-static-0.2.37.bazel b/rust/bazel/crates/BUILD.jiff-static-0.2.37.bazel new file mode 100644 index 0000000000..29e504a1cb --- /dev/null +++ b/rust/bazel/crates/BUILD.jiff-static-0.2.37.bazel @@ -0,0 +1,71 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "jiff_static", + srcs = glob( + include = ["**/*.rs"], + allow_empty = True, + ), + aliases = { + "@sdk_vendor__jiff-core-0.1.1//:jiff_core": "jcore", + }, + 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=jiff-static", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.37", + deps = [ + "@sdk_vendor__jiff-core-0.1.1//:jiff_core", + "@sdk_vendor__proc-macro2-1.0.107//:proc_macro2", + "@sdk_vendor__quote-1.0.47//:quote", + "@sdk_vendor__syn-2.0.119//:syn", + ], +) diff --git a/rust/bazel/crates/BUILD.opaque-debug-0.3.1.bazel b/rust/bazel/crates/BUILD.opaque-debug-0.3.1.bazel new file mode 100644 index 0000000000..0b53f8a46f --- /dev/null +++ b/rust/bazel/crates/BUILD.opaque-debug-0.3.1.bazel @@ -0,0 +1,62 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "opaque_debug", + 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=opaque-debug", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.3.1", +) diff --git a/rust/bazel/crates/BUILD.poly1305-0.8.0.bazel b/rust/bazel/crates/BUILD.poly1305-0.8.0.bazel new file mode 100644 index 0000000000..1f098bf816 --- /dev/null +++ b/rust/bazel/crates/BUILD.poly1305-0.8.0.bazel @@ -0,0 +1,77 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "poly1305", + 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=poly1305", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.8.0", + deps = [ + "@sdk_vendor__opaque-debug-0.3.1//:opaque_debug", + "@sdk_vendor__universal-hash-0.5.1//:universal_hash", + ] + select({ + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "x86_64", target_arch = "x86")) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "x86_64", target_arch = "x86")) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "x86_64", target_arch = "x86")) + ], + "//conditions:default": [], + }), +) diff --git a/rust/bazel/crates/BUILD.polyval-0.6.2.bazel b/rust/bazel/crates/BUILD.polyval-0.6.2.bazel new file mode 100644 index 0000000000..c14a118739 --- /dev/null +++ b/rust/bazel/crates/BUILD.polyval-0.6.2.bazel @@ -0,0 +1,87 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "polyval", + 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=polyval", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.6.2", + deps = [ + "@sdk_vendor__cfg-if-1.0.5//:cfg_if", + "@sdk_vendor__opaque-debug-0.3.1//:opaque_debug", + "@sdk_vendor__universal-hash-0.5.1//:universal_hash", + ] + select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")) + ], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")) + ], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")) + ], + "@rules_rust//rust/platform:x86_64-apple-darwin": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")) + ], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")) + ], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ + "@sdk_vendor__cpufeatures-0.2.17//:cpufeatures", # cfg(any(target_arch = "aarch64", target_arch = "x86_64", target_arch = "x86")) + ], + "//conditions:default": [], + }), +) diff --git a/rust/bazel/crates/BUILD.portable-atomic-1.15.0.bazel b/rust/bazel/crates/BUILD.portable-atomic-1.15.0.bazel new file mode 100644 index 0000000000..0b081befd9 --- /dev/null +++ b/rust/bazel/crates/BUILD.portable-atomic-1.15.0.bazel @@ -0,0 +1,131 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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_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-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.15.0", + deps = [ + ":build_script_build", + ], +) + +cargo_build_script( + name = "_bs", + srcs = glob( + include = ["**/*.rs"], + allow_empty = True, + ), + build_script_env_files = [ + ":cargo_toml_env_vars", + ], + compile_data = glob( + include = ["**"], + allow_empty = True, + exclude = [ + "**/* *", + "**/*.rs", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + 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", + emit_warnings = False, + 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.15.0", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = ":_bs", + tags = ["manual"], +) diff --git a/rust/bazel/crates/BUILD.portable-atomic-util-0.2.8.bazel b/rust/bazel/crates/BUILD.portable-atomic-util-0.2.8.bazel new file mode 100644 index 0000000000..9d3293164a --- /dev/null +++ b/rust/bazel/crates/BUILD.portable-atomic-util-0.2.8.bazel @@ -0,0 +1,132 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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_util", + 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=portable-atomic-util", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.2.8", + deps = [ + ":build_script_build", + "@sdk_vendor__portable-atomic-1.15.0//:portable_atomic", + ], +) + +cargo_build_script( + name = "_bs", + srcs = glob( + include = ["**/*.rs"], + allow_empty = True, + ), + build_script_env_files = [ + ":cargo_toml_env_vars", + ], + compile_data = glob( + include = ["**"], + allow_empty = True, + exclude = [ + "**/* *", + "**/*.rs", + ".tmp_git_root/**/*", + "BUILD", + "BUILD.bazel", + "WORKSPACE", + "WORKSPACE.bazel", + ], + ), + 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", + emit_warnings = False, + pkg_name = "portable-atomic-util", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=portable-atomic-util", + "manual", + "noclippy", + "norustfmt", + ], + version = "0.2.8", + visibility = ["//visibility:private"], +) + +alias( + name = "build_script_build", + actual = ":_bs", + tags = ["manual"], +) diff --git a/rust/bazel/crates/BUILD.rand_core-0.6.4.bazel b/rust/bazel/crates/BUILD.rand_core-0.6.4.bazel new file mode 100644 index 0000000000..af815afd0b --- /dev/null +++ b/rust/bazel/crates/BUILD.rand_core-0.6.4.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 @@//src/sdk/rust/bazel: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 = "rand_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 = [ + "getrandom", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=rand_core", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.6.4", + deps = [ + "@sdk_vendor__getrandom-0.2.17//:getrandom", + ], +) diff --git a/rust/bazel/crates/BUILD.rustc_version-0.4.1.bazel b/rust/bazel/crates/BUILD.rustc_version-0.4.1.bazel new file mode 100644 index 0000000000..2b481e3a4b --- /dev/null +++ b/rust/bazel/crates/BUILD.rustc_version-0.4.1.bazel @@ -0,0 +1,65 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "rustc_version", + 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=rustc_version", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.4.1", + deps = [ + "@sdk_vendor__semver-1.0.28//:semver", + ], +) diff --git a/rust/bazel/crates/BUILD.semver-1.0.28.bazel b/rust/bazel/crates/BUILD.semver-1.0.28.bazel new file mode 100644 index 0000000000..dd56b5b46b --- /dev/null +++ b/rust/bazel/crates/BUILD.semver-1.0.28.bazel @@ -0,0 +1,66 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "semver", + 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=semver", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.0.28", +) diff --git a/rust/bazel/crates/BUILD.serde_repr-0.1.21.bazel b/rust/bazel/crates/BUILD.serde_repr-0.1.21.bazel new file mode 100644 index 0000000000..a75785628e --- /dev/null +++ b/rust/bazel/crates/BUILD.serde_repr-0.1.21.bazel @@ -0,0 +1,67 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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_repr", + 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=serde_repr", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.1.21", + deps = [ + "@sdk_vendor__proc-macro2-1.0.107//:proc_macro2", + "@sdk_vendor__quote-1.0.47//:quote", + "@sdk_vendor__syn-3.0.6//:syn", + ], +) diff --git a/rust/bazel/crates/BUILD.syn-2.0.119.bazel b/rust/bazel/crates/BUILD.syn-2.0.119.bazel index 12aa084095..da84510479 100644 --- a/rust/bazel/crates/BUILD.syn-2.0.119.bazel +++ b/rust/bazel/crates/BUILD.syn-2.0.119.bazel @@ -43,6 +43,7 @@ rust_library( "parsing", "printing", "proc-macro", + "visit", "visit-mut", ], crate_root = "src/lib.rs", diff --git a/rust/bazel/crates/BUILD.tokio-tungstenite-0.29.0.bazel b/rust/bazel/crates/BUILD.tokio-tungstenite-0.29.0.bazel new file mode 100644 index 0000000000..667a82b6dc --- /dev/null +++ b/rust/bazel/crates/BUILD.tokio-tungstenite-0.29.0.bazel @@ -0,0 +1,73 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "tokio_tungstenite", + 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 = [ + "connect", + "handshake", + "stream", + ], + crate_root = "src/lib.rs", + edition = "2018", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=tokio-tungstenite", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.29.0", + deps = [ + "@sdk_vendor__futures-util-0.3.34//:futures_util", + "@sdk_vendor__log-0.4.34//:log", + "@sdk_vendor__tokio-1.53.1//:tokio", + "@sdk_vendor__tungstenite-0.29.0//:tungstenite", + ], +) diff --git a/rust/bazel/crates/BUILD.tungstenite-0.29.0.bazel b/rust/bazel/crates/BUILD.tungstenite-0.29.0.bazel new file mode 100644 index 0000000000..83fa8b7e5b --- /dev/null +++ b/rust/bazel/crates/BUILD.tungstenite-0.29.0.bazel @@ -0,0 +1,79 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "tungstenite", + 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 = [ + "data-encoding", + "handshake", + "http", + "httparse", + "sha1", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=tungstenite", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.29.0", + deps = [ + "@sdk_vendor__bytes-1.12.1//:bytes", + "@sdk_vendor__data-encoding-2.11.1//:data_encoding", + "@sdk_vendor__http-1.5.0//:http", + "@sdk_vendor__httparse-1.10.1//:httparse", + "@sdk_vendor__log-0.4.34//:log", + "@sdk_vendor__rand-0.9.5//:rand", + "@sdk_vendor__sha1-0.10.7//:sha1", + "@sdk_vendor__thiserror-2.0.20//:thiserror", + ], +) diff --git a/rust/bazel/crates/BUILD.universal-hash-0.5.1.bazel b/rust/bazel/crates/BUILD.universal-hash-0.5.1.bazel new file mode 100644 index 0000000000..9094f5c0cd --- /dev/null +++ b/rust/bazel/crates/BUILD.universal-hash-0.5.1.bazel @@ -0,0 +1,66 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "universal_hash", + 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=universal-hash", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "0.5.1", + deps = [ + "@sdk_vendor__crypto-common-0.1.7//:crypto_common", + "@sdk_vendor__subtle-2.6.1//:subtle", + ], +) diff --git a/rust/bazel/crates/BUILD.windows-sys-0.61.2.bazel b/rust/bazel/crates/BUILD.windows-sys-0.61.2.bazel index f964882760..87b0fb6806 100644 --- a/rust/bazel/crates/BUILD.windows-sys-0.61.2.bazel +++ b/rust/bazel/crates/BUILD.windows-sys-0.61.2.bazel @@ -54,9 +54,11 @@ rust_library( "Win32_Storage_FileSystem", "Win32_System", "Win32_System_Diagnostics", - "Win32_System_Diagnostics_ToolHelp", + "Win32_System_Diagnostics_Debug", + "Win32_System_Diagnostics_ProcessSnapshotting", "Win32_System_IO", "Win32_System_JobObjects", + "Win32_System_Kernel", "Win32_System_LibraryLoader", "Win32_System_Memory", "Win32_System_Pipes", diff --git a/rust/bazel/crates/BUILD.x25519-dalek-2.0.1.bazel b/rust/bazel/crates/BUILD.x25519-dalek-2.0.1.bazel new file mode 100644 index 0000000000..7adf4c9aab --- /dev/null +++ b/rust/bazel/crates/BUILD.x25519-dalek-2.0.1.bazel @@ -0,0 +1,69 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "x25519_dalek", + 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 = [ + "static_secrets", + ], + crate_root = "src/lib.rs", + edition = "2021", + rustc_env_files = [ + ":cargo_toml_env_vars", + ], + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-bazel", + "crate-name=x25519-dalek", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "2.0.1", + deps = [ + "@sdk_vendor__curve25519-dalek-4.1.3//:curve25519_dalek", + "@sdk_vendor__rand_core-0.6.4//:rand_core", + ], +) diff --git a/rust/bazel/crates/BUILD.zeroize-1.9.0.bazel b/rust/bazel/crates/BUILD.zeroize-1.9.0.bazel index 97d201b4d0..0c03073226 100644 --- a/rust/bazel/crates/BUILD.zeroize-1.9.0.bazel +++ b/rust/bazel/crates/BUILD.zeroize-1.9.0.bazel @@ -37,9 +37,13 @@ rust_library( crate_features = [ "alloc", "default", + "zeroize_derive", ], crate_root = "src/lib.rs", edition = "2024", + proc_macro_deps = [ + "@sdk_vendor__zeroize_derive-1.5.0//:zeroize_derive", + ], rustc_env_files = [ ":cargo_toml_env_vars", ], diff --git a/rust/bazel/crates/BUILD.zeroize_derive-1.5.0.bazel b/rust/bazel/crates/BUILD.zeroize_derive-1.5.0.bazel new file mode 100644 index 0000000000..a84cce5d3f --- /dev/null +++ b/rust/bazel/crates/BUILD.zeroize_derive-1.5.0.bazel @@ -0,0 +1,67 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel: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 = "zeroize_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=zeroize_derive", + "manual", + "noclippy", + "norustfmt", + ], + target_compatible_with = select({ + "@rules_rust//rust/platform:aarch64-apple-darwin": [], + "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], + "@rules_rust//rust/platform:x86_64-apple-darwin": [], + "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], + "//conditions:default": ["@platforms//:incompatible"], + }), + version = "1.5.0", + deps = [ + "@sdk_vendor__proc-macro2-1.0.107//:proc_macro2", + "@sdk_vendor__quote-1.0.47//:quote", + "@sdk_vendor__syn-2.0.119//:syn", + ], +) diff --git a/rust/bazel/crates/ahp-0.9.0/BUILD.bazel b/rust/bazel/crates/ahp-0.9.0/BUILD.bazel new file mode 100644 index 0000000000..aaa421b3bb --- /dev/null +++ b/rust/bazel/crates/ahp-0.9.0/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel:vendor +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "ahp-0.9.0", + actual = "@sdk_vendor__ahp-0.9.0//:ahp", + tags = ["manual"], +) diff --git a/rust/bazel/crates/ahp-types-0.9.0/BUILD.bazel b/rust/bazel/crates/ahp-types-0.9.0/BUILD.bazel new file mode 100644 index 0000000000..74703b9e64 --- /dev/null +++ b/rust/bazel/crates/ahp-types-0.9.0/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel:vendor +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "ahp-types-0.9.0", + actual = "@sdk_vendor__ahp-types-0.9.0//:ahp_types", + tags = ["manual"], +) diff --git a/rust/bazel/crates/ahp-types/BUILD.bazel b/rust/bazel/crates/ahp-types/BUILD.bazel new file mode 100644 index 0000000000..e63cd0cf87 --- /dev/null +++ b/rust/bazel/crates/ahp-types/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel:vendor +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "ahp-types", + actual = "@sdk_vendor__ahp-types-0.9.0//:ahp_types", + tags = ["manual"], +) diff --git a/rust/bazel/crates/ahp-ws-0.9.0/BUILD.bazel b/rust/bazel/crates/ahp-ws-0.9.0/BUILD.bazel new file mode 100644 index 0000000000..f4880d1959 --- /dev/null +++ b/rust/bazel/crates/ahp-ws-0.9.0/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel:vendor +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "ahp-ws-0.9.0", + actual = "@sdk_vendor__ahp-ws-0.9.0//:ahp_ws", + tags = ["manual"], +) diff --git a/rust/bazel/crates/ahp-ws/BUILD.bazel b/rust/bazel/crates/ahp-ws/BUILD.bazel new file mode 100644 index 0000000000..e486ef4fb1 --- /dev/null +++ b/rust/bazel/crates/ahp-ws/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel:vendor +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "ahp-ws", + actual = "@sdk_vendor__ahp-ws-0.9.0//:ahp_ws", + tags = ["manual"], +) diff --git a/rust/bazel/crates/ahp/BUILD.bazel b/rust/bazel/crates/ahp/BUILD.bazel new file mode 100644 index 0000000000..9fc6424605 --- /dev/null +++ b/rust/bazel/crates/ahp/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel:vendor +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "ahp", + actual = "@sdk_vendor__ahp-0.9.0//:ahp", + tags = ["manual"], +) diff --git a/rust/bazel/crates/crates.bzl b/rust/bazel/crates/crates.bzl index d8513a460e..8963459be8 100644 --- a/rust/bazel/crates/crates.bzl +++ b/rust/bazel/crates/crates.bzl @@ -17,6 +17,7 @@ """ load("@bazel_skylib//lib:selects.bzl", "selects") +load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@rules_rust//crate_universe:defs.bzl", "crates_vendor_remote_repository") @@ -361,9 +362,16 @@ _NORMAL_ALIASES = { _NORMAL_DEV_DEPENDENCIES = { "src/sdk/rust": { _COMMON_CONDITION: { + "ahp": Label("@sdk_vendor//ahp-0.9.0"), + "ahp-types": Label("@sdk_vendor//ahp-types-0.9.0"), + "ahp-ws": Label("@sdk_vendor//ahp-ws-0.9.0"), + "hpke": Label("@sdk_vendor//hpke-0.12.0"), + "native-tls": Label("@sdk_vendor//native-tls-0.2.18"), + "rand_core": Label("@sdk_vendor//rand_core-0.6.4"), "rusqlite": Label("@sdk_vendor//rusqlite-0.40.2"), "schemars": Label("@sdk_vendor//schemars-1.2.2"), "serial_test": Label("@sdk_vendor//serial_test-4.0.1"), + "sha2": Label("@sdk_vendor//sha2-0.10.9"), "tempfile": Label("@sdk_vendor//tempfile-3.27.0"), "ureq": Label("@sdk_vendor//ureq-3.4.2"), }, @@ -407,9 +415,7 @@ _BUILD_DEPENDENCIES = { _COMMON_CONDITION: { "dirs": Label("@sdk_vendor//dirs-5.0.1"), "flate2": Label("@sdk_vendor//flate2-1.1.10"), - "native-tls": Label("@sdk_vendor//native-tls-0.2.18"), "serde_json": Label("@sdk_vendor//serde_json-1.0.151"), - "sha2": Label("@sdk_vendor//sha2-0.10.9"), "tar": Label("@sdk_vendor//tar-0.4.46"), "zip": Label("@sdk_vendor//zip-7.2.0"), }, @@ -445,6 +451,7 @@ _CONDITIONS = { "cfg(all(any(target_arch = \"x86_64\", target_arch = \"arm64ec\"), target_env = \"msvc\", not(windows_raw_dylib)))": ["@rules_rust//rust/platform:x86_64-pc-windows-msvc"], "cfg(all(any(target_os = \"linux\", target_os = \"android\"), any(rustix_use_libc, miri, not(all(target_os = \"linux\", any(target_endian = \"little\", any(target_arch = \"s390x\", target_arch = \"powerpc\")), any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"riscv64\", all(rustix_use_experimental_asm, target_arch = \"powerpc\"), all(rustix_use_experimental_asm, target_arch = \"powerpc64\"), all(rustix_use_experimental_asm, target_arch = \"s390x\"), all(rustix_use_experimental_asm, target_arch = \"mips\"), all(rustix_use_experimental_asm, target_arch = \"mips32r6\"), all(rustix_use_experimental_asm, target_arch = \"mips64\"), all(rustix_use_experimental_asm, target_arch = \"mips64r6\"), target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\")))))))": [], "cfg(all(any(target_os = \"linux\", target_os = \"android\"), not(any(all(target_os = \"linux\", target_env = \"\"), getrandom_backend = \"custom\", getrandom_backend = \"linux_raw\", getrandom_backend = \"rdrand\", getrandom_backend = \"rndr\"))))": ["@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], + "cfg(all(not(curve25519_dalek_backend = \"fiat\"), not(curve25519_dalek_backend = \"serial\"), target_arch = \"x86_64\"))": ["@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-pc-windows-msvc", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], "cfg(all(not(rustix_use_libc), not(miri), target_os = \"linux\", any(target_endian = \"little\", any(target_arch = \"s390x\", target_arch = \"powerpc\")), any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"riscv64\", all(rustix_use_experimental_asm, target_arch = \"powerpc\"), all(rustix_use_experimental_asm, target_arch = \"powerpc64\"), all(rustix_use_experimental_asm, target_arch = \"s390x\"), all(rustix_use_experimental_asm, target_arch = \"mips\"), all(rustix_use_experimental_asm, target_arch = \"mips32r6\"), all(rustix_use_experimental_asm, target_arch = \"mips64\"), all(rustix_use_experimental_asm, target_arch = \"mips64r6\"), target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\"))))": ["@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], "cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = \"linux\", any(target_endian = \"little\", any(target_arch = \"s390x\", target_arch = \"powerpc\")), any(target_arch = \"arm\", all(target_arch = \"aarch64\", target_pointer_width = \"64\"), target_arch = \"riscv64\", all(rustix_use_experimental_asm, target_arch = \"powerpc\"), all(rustix_use_experimental_asm, target_arch = \"powerpc64\"), all(rustix_use_experimental_asm, target_arch = \"s390x\"), all(rustix_use_experimental_asm, target_arch = \"mips\"), all(rustix_use_experimental_asm, target_arch = \"mips32r6\"), all(rustix_use_experimental_asm, target_arch = \"mips64\"), all(rustix_use_experimental_asm, target_arch = \"mips64r6\"), target_arch = \"x86\", all(target_arch = \"x86_64\", target_pointer_width = \"64\")))))))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:x86_64-apple-darwin"], "cfg(all(target_arch = \"aarch64\", target_env = \"msvc\", not(windows_raw_dylib)))": ["@rules_rust//rust/platform:aarch64-pc-windows-msvc"], @@ -462,6 +469,7 @@ _CONDITIONS = { "cfg(any())": [], "cfg(any(target_arch = \"aarch64\", target_arch = \"x86\", target_arch = \"x86_64\"))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-pc-windows-msvc", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-pc-windows-msvc", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], "cfg(any(target_arch = \"aarch64\", target_arch = \"x86_64\", target_arch = \"x86\"))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-pc-windows-msvc", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-pc-windows-msvc", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], + "cfg(any(target_arch = \"x86_64\", target_arch = \"x86\"))": ["@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-pc-windows-msvc", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], "cfg(any(target_os = \"android\", target_os = \"linux\", target_os = \"macos\", target_os = \"hurd\"))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], "cfg(any(target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"hurd\", target_os = \"illumos\", target_os = \"cygwin\", all(target_os = \"horizon\", target_arch = \"arm\")))": [], "cfg(any(target_os = \"freebsd\", target_os = \"netbsd\"))": [], @@ -470,8 +478,11 @@ _CONDITIONS = { "cfg(any(target_os = \"macos\", target_os = \"openbsd\", target_os = \"vita\", target_os = \"emscripten\"))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:x86_64-apple-darwin"], "cfg(any(unix, target_os = \"hermit\", target_os = \"wasi\"))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], "cfg(any(unix, target_os = \"wasi\"))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], + "cfg(curve25519_dalek_backend = \"fiat\")": [], "cfg(not(all(target_arch = \"wasm32\", any(target_os = \"unknown\", target_os = \"none\"))))": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:aarch64-pc-windows-msvc", "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-pc-windows-msvc", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], "cfg(not(any(target_os = \"windows\", target_vendor = \"apple\")))": ["@rules_rust//rust/platform:aarch64-unknown-linux-gnu", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], + "cfg(not(target_has_atomic = \"ptr\"))": [], + "cfg(target_arch = \"x86_64\")": ["@rules_rust//rust/platform:x86_64-apple-darwin", "@rules_rust//rust/platform:x86_64-pc-windows-msvc", "@rules_rust//rust/platform:x86_64-unknown-linux-gnu"], "cfg(target_os = \"hermit\")": [], "cfg(target_os = \"macos\")": ["@rules_rust//rust/platform:aarch64-apple-darwin", "@rules_rust//rust/platform:x86_64-apple-darwin"], "cfg(target_os = \"netbsd\")": [], @@ -515,6 +526,36 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.adler2-2.0.1.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__aead-0.5.2", + sha256 = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0", + type = "tar.gz", + urls = ["https://static.crates.io/crates/aead/0.5.2/download"], + strip_prefix = "aead-0.5.2", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.aead-0.5.2.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__aes-0.8.4", + sha256 = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0", + type = "tar.gz", + urls = ["https://static.crates.io/crates/aes/0.8.4/download"], + strip_prefix = "aes-0.8.4", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.aes-0.8.4.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__aes-gcm-0.10.3", + sha256 = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1", + type = "tar.gz", + urls = ["https://static.crates.io/crates/aes-gcm/0.10.3/download"], + strip_prefix = "aes-gcm-0.10.3", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.aes-gcm-0.10.3.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__aho-corasick-1.1.5", @@ -525,6 +566,36 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.aho-corasick-1.1.5.bazel"), ) + maybe( + git_repository, + name = "sdk_vendor__ahp-0.9.0", + commit = "60706330f2f351b09f150d9a9c3c0eaedfc8e8b9", + init_submodules = True, + remote = "https://github.com/microsoft/agent-host-protocol", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.ahp-0.9.0.bazel"), + strip_prefix = "clients/rust/crates/ahp", + ) + + maybe( + git_repository, + name = "sdk_vendor__ahp-types-0.9.0", + commit = "60706330f2f351b09f150d9a9c3c0eaedfc8e8b9", + init_submodules = True, + remote = "https://github.com/microsoft/agent-host-protocol", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.ahp-types-0.9.0.bazel"), + strip_prefix = "clients/rust/crates/ahp-types", + ) + + maybe( + git_repository, + name = "sdk_vendor__ahp-ws-0.9.0", + commit = "60706330f2f351b09f150d9a9c3c0eaedfc8e8b9", + init_submodules = True, + remote = "https://github.com/microsoft/agent-host-protocol", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.ahp-ws-0.9.0.bazel"), + strip_prefix = "clients/rust/crates/ahp-ws", + ) + maybe( http_archive, name = "sdk_vendor__async-trait-0.1.92", @@ -575,6 +646,16 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.base64ct-1.8.3.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__bitflags-1.3.2", + sha256 = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a", + type = "tar.gz", + urls = ["https://static.crates.io/crates/bitflags/1.3.2/download"], + strip_prefix = "bitflags-1.3.2", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.bitflags-1.3.2.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__bitflags-2.13.2", @@ -635,6 +716,36 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.cfg-if-1.0.5.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__chacha20-0.9.1", + sha256 = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818", + type = "tar.gz", + urls = ["https://static.crates.io/crates/chacha20/0.9.1/download"], + strip_prefix = "chacha20-0.9.1", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.chacha20-0.9.1.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__chacha20poly1305-0.10.1", + sha256 = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35", + type = "tar.gz", + urls = ["https://static.crates.io/crates/chacha20poly1305/0.10.1/download"], + strip_prefix = "chacha20poly1305-0.10.1", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.chacha20poly1305-0.10.1.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__cipher-0.4.4", + sha256 = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad", + type = "tar.gz", + urls = ["https://static.crates.io/crates/cipher/0.4.4/download"], + strip_prefix = "cipher-0.4.4", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.cipher-0.4.4.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__core-foundation-0.10.1", @@ -685,6 +796,36 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.crypto-common-0.1.7.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__ctr-0.9.2", + sha256 = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835", + type = "tar.gz", + urls = ["https://static.crates.io/crates/ctr/0.9.2/download"], + strip_prefix = "ctr-0.9.2", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.ctr-0.9.2.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__curve25519-dalek-4.1.3", + sha256 = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be", + type = "tar.gz", + urls = ["https://static.crates.io/crates/curve25519-dalek/4.1.3/download"], + strip_prefix = "curve25519-dalek-4.1.3", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.curve25519-dalek-4.1.3.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__curve25519-dalek-derive-0.1.1", + sha256 = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3", + type = "tar.gz", + urls = ["https://static.crates.io/crates/curve25519-dalek-derive/0.1.1/download"], + strip_prefix = "curve25519-dalek-derive-0.1.1", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.curve25519-dalek-derive-0.1.1.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__data-encoding-2.11.1", @@ -695,6 +836,36 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.data-encoding-2.11.1.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__defmt-1.1.1", + sha256 = "e2953bfe4f93bbd20cc71198842756f77d161884c99ebbabc41d80231ded88d1", + type = "tar.gz", + urls = ["https://static.crates.io/crates/defmt/1.1.1/download"], + strip_prefix = "defmt-1.1.1", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.defmt-1.1.1.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__defmt-macros-1.1.1", + sha256 = "bad9c72e7ca2137e0dc3813245a0d282fd6daad32fd800af018306a9169b5fe8", + type = "tar.gz", + urls = ["https://static.crates.io/crates/defmt-macros/1.1.1/download"], + strip_prefix = "defmt-macros-1.1.1", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.defmt-macros-1.1.1.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__defmt-parser-1.0.0", + sha256 = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e", + type = "tar.gz", + urls = ["https://static.crates.io/crates/defmt-parser/1.0.0/download"], + strip_prefix = "defmt-parser-1.0.0", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.defmt-parser-1.0.0.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__der-0.8.2", @@ -805,6 +976,16 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.fastrand-2.5.0.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__fiat-crypto-0.2.9", + sha256 = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d", + type = "tar.gz", + urls = ["https://static.crates.io/crates/fiat-crypto/0.2.9/download"], + strip_prefix = "fiat-crypto-0.2.9", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.fiat-crypto-0.2.9.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__filetime-0.2.29", @@ -1005,6 +1186,16 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.getrandom-0.4.3.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__ghash-0.5.1", + sha256 = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1", + type = "tar.gz", + urls = ["https://static.crates.io/crates/ghash/0.5.1/download"], + strip_prefix = "ghash-0.5.1", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.ghash-0.5.1.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__h2-0.4.19", @@ -1045,6 +1236,36 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.hashlink-0.12.2.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__hkdf-0.12.4", + sha256 = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7", + type = "tar.gz", + urls = ["https://static.crates.io/crates/hkdf/0.12.4/download"], + strip_prefix = "hkdf-0.12.4", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.hkdf-0.12.4.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__hmac-0.12.1", + sha256 = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e", + type = "tar.gz", + urls = ["https://static.crates.io/crates/hmac/0.12.1/download"], + strip_prefix = "hmac-0.12.1", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.hmac-0.12.1.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__hpke-0.12.0", + sha256 = "4917627a14198c3603282c5158b815ad5534795451d3c074b53cf3cee0960b11", + type = "tar.gz", + urls = ["https://static.crates.io/crates/hpke/0.12.0/download"], + strip_prefix = "hpke-0.12.0", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.hpke-0.12.0.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__http-1.5.0", @@ -1225,6 +1446,16 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.indexmap-2.14.2.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__inout-0.1.4", + sha256 = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01", + type = "tar.gz", + urls = ["https://static.crates.io/crates/inout/0.1.4/download"], + strip_prefix = "inout-0.1.4", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.inout-0.1.4.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__ipnet-2.12.2", @@ -1245,6 +1476,36 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.itoa-1.0.18.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__jiff-0.2.37", + sha256 = "0ab1baf72f08796de0260609515130699b890ac25f30e610ad894bc5856cafdb", + type = "tar.gz", + urls = ["https://static.crates.io/crates/jiff/0.2.37/download"], + strip_prefix = "jiff-0.2.37", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.jiff-0.2.37.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__jiff-core-0.1.1", + sha256 = "5e52fe76043ccecc9005d2305ebaadf7d7fc0cc89ca6baa10a94d6bc68c7128c", + type = "tar.gz", + urls = ["https://static.crates.io/crates/jiff-core/0.1.1/download"], + strip_prefix = "jiff-core-0.1.1", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.jiff-core-0.1.1.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__jiff-static-0.2.37", + sha256 = "378268a1116ad67ae6228701118ac9f491d78fda38a40a1f1a9e1348de6f7212", + type = "tar.gz", + urls = ["https://static.crates.io/crates/jiff-static/0.2.37/download"], + strip_prefix = "jiff-static-0.2.37", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.jiff-static-0.2.37.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__js-sys-0.3.105", @@ -1385,6 +1646,16 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.once_cell-1.21.4.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__opaque-debug-0.3.1", + sha256 = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381", + type = "tar.gz", + urls = ["https://static.crates.io/crates/opaque-debug/0.3.1/download"], + strip_prefix = "opaque-debug-0.3.1", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.opaque-debug-0.3.1.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__openssl-0.10.81", @@ -1495,6 +1766,46 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.pkg-config-0.3.34.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__poly1305-0.8.0", + sha256 = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf", + type = "tar.gz", + urls = ["https://static.crates.io/crates/poly1305/0.8.0/download"], + strip_prefix = "poly1305-0.8.0", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.poly1305-0.8.0.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__polyval-0.6.2", + sha256 = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25", + type = "tar.gz", + urls = ["https://static.crates.io/crates/polyval/0.6.2/download"], + strip_prefix = "polyval-0.6.2", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.polyval-0.6.2.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__portable-atomic-1.15.0", + sha256 = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85", + type = "tar.gz", + urls = ["https://static.crates.io/crates/portable-atomic/1.15.0/download"], + strip_prefix = "portable-atomic-1.15.0", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.portable-atomic-1.15.0.bazel"), + ) + + maybe( + http_archive, + name = "sdk_vendor__portable-atomic-util-0.2.8", + sha256 = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715", + type = "tar.gz", + urls = ["https://static.crates.io/crates/portable-atomic-util/0.2.8/download"], + strip_prefix = "portable-atomic-util-0.2.8", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.portable-atomic-util-0.2.8.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__potential_utf-0.1.6", @@ -1575,6 +1886,16 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.rand_chacha-0.9.0.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__rand_core-0.6.4", + sha256 = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c", + type = "tar.gz", + urls = ["https://static.crates.io/crates/rand_core/0.6.4/download"], + strip_prefix = "rand_core-0.6.4", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.rand_core-0.6.4.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__rand_core-0.9.5", @@ -1695,6 +2016,16 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.rusqlite-0.40.2.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__rustc_version-0.4.1", + sha256 = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92", + type = "tar.gz", + urls = ["https://static.crates.io/crates/rustc_version/0.4.1/download"], + strip_prefix = "rustc_version-0.4.1", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.rustc_version-0.4.1.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__rustix-1.1.5", @@ -1805,6 +2136,16 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.security-framework-sys-2.17.0.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__semver-1.0.28", + sha256 = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd", + type = "tar.gz", + urls = ["https://static.crates.io/crates/semver/1.0.28/download"], + strip_prefix = "semver-1.0.28", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.semver-1.0.28.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__serde-1.0.229", @@ -1855,6 +2196,16 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.serde_json-1.0.151.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__serde_repr-0.1.21", + sha256 = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906", + type = "tar.gz", + urls = ["https://static.crates.io/crates/serde_repr/0.1.21/download"], + strip_prefix = "serde_repr-0.1.21", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.serde_repr-0.1.21.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__serial_test-4.0.1", @@ -2155,6 +2506,16 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.tokio-tungstenite-0.28.0.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__tokio-tungstenite-0.29.0", + sha256 = "8f72a05e828585856dacd553fba484c242c46e391fb0e58917c942ee9202915c", + type = "tar.gz", + urls = ["https://static.crates.io/crates/tokio-tungstenite/0.29.0/download"], + strip_prefix = "tokio-tungstenite-0.29.0", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.tokio-tungstenite-0.29.0.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__tokio-util-0.7.19", @@ -2255,6 +2616,16 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.tungstenite-0.28.0.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__tungstenite-0.29.0", + sha256 = "6c01152af293afb9c7c2a57e4b559c5620b421f6d133261c60dd2d0cdb38e6b8", + type = "tar.gz", + urls = ["https://static.crates.io/crates/tungstenite/0.29.0/download"], + strip_prefix = "tungstenite-0.29.0", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.tungstenite-0.29.0.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__typed-path-0.12.3", @@ -2285,6 +2656,16 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.unicode-ident-1.0.26.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__universal-hash-0.5.1", + sha256 = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea", + type = "tar.gz", + urls = ["https://static.crates.io/crates/universal-hash/0.5.1/download"], + strip_prefix = "universal-hash-0.5.1", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.universal-hash-0.5.1.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__untrusted-0.9.0", @@ -2725,6 +3106,16 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.writeable-0.6.4.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__x25519-dalek-2.0.1", + sha256 = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277", + type = "tar.gz", + urls = ["https://static.crates.io/crates/x25519-dalek/2.0.1/download"], + strip_prefix = "x25519-dalek-2.0.1", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.x25519-dalek-2.0.1.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__xattr-1.6.1", @@ -2805,6 +3196,16 @@ def crate_repositories(): build_file = Label("//src/sdk/rust/bazel/crates:BUILD.zeroize-1.9.0.bazel"), ) + maybe( + http_archive, + name = "sdk_vendor__zeroize_derive-1.5.0", + sha256 = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328", + type = "tar.gz", + urls = ["https://static.crates.io/crates/zeroize_derive/1.5.0/download"], + strip_prefix = "zeroize_derive-1.5.0", + build_file = Label("//src/sdk/rust/bazel/crates:BUILD.zeroize_derive-1.5.0.bazel"), + ) + maybe( http_archive, name = "sdk_vendor__zerotrie-0.2.5", @@ -2887,13 +3288,11 @@ def crate_repositories(): struct(repo = "sdk_vendor__http-1.5.0", is_dev_dep = False), struct(repo = "sdk_vendor__indexmap-2.14.2", is_dev_dep = False), struct(repo = "sdk_vendor__libloading-0.9.0", is_dev_dep = False), - struct(repo = "sdk_vendor__native-tls-0.2.18", is_dev_dep = False), struct(repo = "sdk_vendor__parking_lot-0.12.5", is_dev_dep = False), struct(repo = "sdk_vendor__regex-1.13.1", is_dev_dep = False), struct(repo = "sdk_vendor__reqwest-0.13.5", is_dev_dep = False), struct(repo = "sdk_vendor__serde-1.0.229", is_dev_dep = False), struct(repo = "sdk_vendor__serde_json-1.0.151", is_dev_dep = False), - struct(repo = "sdk_vendor__sha2-0.10.9", is_dev_dep = False), struct(repo = "sdk_vendor__tar-0.4.46", is_dev_dep = False), struct(repo = "sdk_vendor__tokio-1.53.1", is_dev_dep = False), struct(repo = "sdk_vendor__tokio-stream-0.1.19", is_dev_dep = False), @@ -2903,9 +3302,16 @@ def crate_repositories(): struct(repo = "sdk_vendor__uuid-1.26.1", is_dev_dep = False), struct(repo = "sdk_vendor__windows-sys-0.61.2", is_dev_dep = False), struct(repo = "sdk_vendor__zip-7.2.0", is_dev_dep = False), + struct(repo = "sdk_vendor__ahp-0.9.0", is_dev_dep = True), + struct(repo = "sdk_vendor__ahp-types-0.9.0", is_dev_dep = True), + struct(repo = "sdk_vendor__ahp-ws-0.9.0", is_dev_dep = True), + struct(repo = "sdk_vendor__hpke-0.12.0", is_dev_dep = True), + struct(repo = "sdk_vendor__native-tls-0.2.18", is_dev_dep = True), + struct(repo = "sdk_vendor__rand_core-0.6.4", is_dev_dep = True), struct(repo = "sdk_vendor__rusqlite-0.40.2", is_dev_dep = True), struct(repo = "sdk_vendor__schemars-1.2.2", is_dev_dep = True), struct(repo = "sdk_vendor__serial_test-4.0.1", is_dev_dep = True), + struct(repo = "sdk_vendor__sha2-0.10.9", is_dev_dep = True), struct(repo = "sdk_vendor__tempfile-3.27.0", is_dev_dep = True), struct(repo = "sdk_vendor__ureq-3.4.2", is_dev_dep = True), ] diff --git a/rust/bazel/crates/hpke-0.12.0/BUILD.bazel b/rust/bazel/crates/hpke-0.12.0/BUILD.bazel new file mode 100644 index 0000000000..fdcbb50063 --- /dev/null +++ b/rust/bazel/crates/hpke-0.12.0/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel:vendor +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "hpke-0.12.0", + actual = "@sdk_vendor__hpke-0.12.0//:hpke", + tags = ["manual"], +) diff --git a/rust/bazel/crates/hpke/BUILD.bazel b/rust/bazel/crates/hpke/BUILD.bazel new file mode 100644 index 0000000000..97c0f2e04e --- /dev/null +++ b/rust/bazel/crates/hpke/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel:vendor +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "hpke", + actual = "@sdk_vendor__hpke-0.12.0//:hpke", + tags = ["manual"], +) diff --git a/rust/bazel/crates/rand_core-0.6.4/BUILD.bazel b/rust/bazel/crates/rand_core-0.6.4/BUILD.bazel new file mode 100644 index 0000000000..5bbaebe2c6 --- /dev/null +++ b/rust/bazel/crates/rand_core-0.6.4/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel:vendor +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "rand_core-0.6.4", + actual = "@sdk_vendor__rand_core-0.6.4//:rand_core", + tags = ["manual"], +) diff --git a/rust/bazel/crates/rand_core/BUILD.bazel b/rust/bazel/crates/rand_core/BUILD.bazel new file mode 100644 index 0000000000..e174464bcb --- /dev/null +++ b/rust/bazel/crates/rand_core/BUILD.bazel @@ -0,0 +1,15 @@ +############################################################################### +# @generated +# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To +# regenerate this file, run the following: +# +# bazel run @@//src/sdk/rust/bazel:vendor +############################################################################### + +package(default_visibility = ["//visibility:public"]) + +alias( + name = "rand_core", + actual = "@sdk_vendor__rand_core-0.6.4//:rand_core", + tags = ["manual"], +) diff --git a/rust/src/process_tree.rs b/rust/src/process_tree.rs index ef9d3fc62e..238854bcf9 100644 --- a/rust/src/process_tree.rs +++ b/rust/src/process_tree.rs @@ -56,9 +56,11 @@ mod platform { use std::{io, ptr}; use tokio::process::{Child, Command}; - use windows_sys::Win32::Foundation::{CloseHandle, HANDLE, INVALID_HANDLE_VALUE}; - use windows_sys::Win32::System::Diagnostics::ToolHelp::{ - CreateToolhelp32Snapshot, TH32CS_SNAPTHREAD, THREADENTRY32, Thread32First, Thread32Next, + use windows_sys::Win32::Foundation::{CloseHandle, ERROR_NO_MORE_ITEMS, HANDLE}; + use windows_sys::Win32::System::Diagnostics::ProcessSnapshotting::{ + HPSS, HPSSWALK, PSS_CAPTURE_THREADS, PSS_THREAD_ENTRY, PSS_WALK_THREADS, + PssCaptureSnapshot, PssFreeSnapshot, PssWalkMarkerCreate, PssWalkMarkerFree, + PssWalkSnapshot, }; use windows_sys::Win32::System::JobObjects::{ AssignProcessToJobObject, CreateJobObjectW, JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE, @@ -66,9 +68,48 @@ mod platform { SetInformationJobObject, TerminateJobObject, }; use windows_sys::Win32::System::Threading::{ - CREATE_NO_WINDOW, CREATE_SUSPENDED, OpenThread, ResumeThread, THREAD_SUSPEND_RESUME, + CREATE_NO_WINDOW, CREATE_SUSPENDED, GetCurrentProcess, GetProcessIdOfThread, OpenThread, + ResumeThread, THREAD_QUERY_LIMITED_INFORMATION, THREAD_SUSPEND_RESUME, }; + #[cfg(test)] + use super::tests::{ + BEFORE_ASSIGNMENT, BEFORE_RESUME, FailurePoint, MARKERS, RESUME_ELAPSED, SNAPSHOTS, + THREADS_EXAMINED, fail_at, + }; + + struct ThreadSnapshot(HPSS); + + impl Drop for ThreadSnapshot { + fn drop(&mut self) { + // SAFETY: this process uniquely owns the local snapshot descriptor. + let status = unsafe { PssFreeSnapshot(GetCurrentProcess(), self.0) }; + if let Err(error) = check_status(status) { + tracing::warn!(%error, "failed to free CLI thread snapshot"); + } + #[cfg(test)] + if status == 0 { + SNAPSHOTS.set((SNAPSHOTS.get().0, SNAPSHOTS.get().1 + 1)); + } + } + } + + struct WalkMarker(HPSSWALK); + + impl Drop for WalkMarker { + fn drop(&mut self) { + // SAFETY: this value uniquely owns a valid walk marker. + let status = unsafe { PssWalkMarkerFree(self.0) }; + if let Err(error) = check_status(status) { + tracing::warn!(%error, "failed to free CLI thread walk marker"); + } + #[cfg(test)] + if status == 0 { + MARKERS.set((MARKERS.get().0, MARKERS.get().1 + 1)); + } + } + } + struct OwnedHandle(HANDLE); // SAFETY: Win32 handles may be used and closed from any thread. @@ -97,13 +138,19 @@ mod platform { match attach_and_resume(&child) { Ok(tree) => Ok((child, tree)), Err(error) => { - let _ = child.start_kill(); + if let Err(kill_error) = child.start_kill() { + tracing::warn!(%kill_error, "failed to terminate suspended CLI child"); + } Err(error) } } } fn attach_and_resume(child: &Child) -> io::Result { + #[cfg(test)] + if let Some(hook) = BEFORE_ASSIGNMENT.with_borrow_mut(Option::take) { + hook(child)?; + } // SAFETY: null security attributes and name create a private, // non-inheritable Job Object. let raw_job = unsafe { CreateJobObjectW(ptr::null(), ptr::null()) }; @@ -138,50 +185,122 @@ mod platform { return Err(io::Error::last_os_error()); } - resume_initial_thread(child.id().ok_or_else(|| { - io::Error::new(io::ErrorKind::NotFound, "CLI exited before thread resume") - })?)?; + #[cfg(test)] + if let Some(hook) = BEFORE_RESUME.with_borrow_mut(Option::take) { + hook(child, job.0)?; + } + #[cfg(test)] + let resume_start = std::time::Instant::now(); + let result = resume_initial_thread( + process.cast(), + child.id().ok_or_else(|| { + io::Error::new(io::ErrorKind::NotFound, "CLI exited before thread resume") + })?, + ); + #[cfg(test)] + RESUME_ELAPSED.set(resume_start.elapsed()); + result?; Ok(Tree { job }) } - fn resume_initial_thread(pid: u32) -> io::Result<()> { - // SAFETY: the returned snapshot handle is owned and closed below. - let snapshot = unsafe { CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0) }; - if snapshot == INVALID_HANDLE_VALUE { - return Err(io::Error::last_os_error()); + pub(super) fn check_status(status: u32) -> io::Result<()> { + if status == 0 { + Ok(()) + } else { + Err(io::Error::from_raw_os_error(status as i32)) } - let snapshot = OwnedHandle(snapshot); - let mut entry = THREADENTRY32 { - dwSize: size_of::() as u32, - ..Default::default() - }; - - // SAFETY: `entry` has the documented size and remains live throughout - // enumeration. - let mut found = unsafe { Thread32First(snapshot.0, &mut entry) } != 0; - while found { - if entry.th32OwnerProcessID == pid { - // SAFETY: the thread id came from the live system snapshot. - let raw_thread = - unsafe { OpenThread(THREAD_SUSPEND_RESUME, 0, entry.th32ThreadID) }; + } + + pub(super) fn resume_initial_thread(process: HANDLE, pid: u32) -> io::Result<()> { + #[cfg(test)] + THREADS_EXAMINED.set(0); + #[cfg(test)] + fail_at(FailurePoint::Capture)?; + let mut snapshot = ptr::null_mut(); + // SAFETY: the suspended child owns the live process handle throughout + // capture and resume. Only its thread information is captured. + check_status(unsafe { + PssCaptureSnapshot(process, PSS_CAPTURE_THREADS, 0, &mut snapshot) + })?; + let snapshot = ThreadSnapshot(snapshot); + #[cfg(test)] + SNAPSHOTS.set((SNAPSHOTS.get().0 + 1, SNAPSHOTS.get().1)); + + #[cfg(test)] + fail_at(FailurePoint::Marker)?; + let mut marker = ptr::null_mut(); + // SAFETY: Windows initializes the marker with its default allocator. + check_status(unsafe { PssWalkMarkerCreate(ptr::null(), &mut marker) })?; + let marker = WalkMarker(marker); + #[cfg(test)] + MARKERS.set((MARKERS.get().0 + 1, MARKERS.get().1)); + + loop { + #[cfg(test)] + fail_at(FailurePoint::Walk)?; + let mut entry = PSS_THREAD_ENTRY::default(); + // SAFETY: the aligned entry has the layout and size required by + // PSS_WALK_THREADS; both snapshot and marker remain owned. + let status = unsafe { + PssWalkSnapshot( + snapshot.0, + PSS_WALK_THREADS, + marker.0, + ptr::from_mut(&mut entry).cast(), + size_of::() as u32, + ) + }; + if status == ERROR_NO_MORE_ITEMS { + return Err(io::Error::new( + io::ErrorKind::NotFound, + "CLI initial thread was not found in its process snapshot", + )); + } + check_status(status)?; + #[cfg(test)] + THREADS_EXAMINED.set(THREADS_EXAMINED.get() + 1); + if entry.ProcessId == pid { + #[cfg(test)] + fail_at(FailurePoint::OpenThread)?; + // SAFETY: the thread id came from the child's process snapshot. + let raw_thread = unsafe { + OpenThread( + THREAD_SUSPEND_RESUME | THREAD_QUERY_LIMITED_INFORMATION, + 0, + entry.ThreadId, + ) + }; if raw_thread.is_null() { return Err(io::Error::last_os_error()); } let thread = OwnedHandle(raw_thread); - // SAFETY: this is the root's suspended initial thread. - if unsafe { ResumeThread(thread.0) } == u32::MAX { - return Err(io::Error::last_os_error()); - } - return Ok(()); + return resume_owned_thread(thread.0, pid); } - // SAFETY: same valid snapshot and initialized entry as above. - found = unsafe { Thread32Next(snapshot.0, &mut entry) } != 0; } + } - Err(io::Error::new( - io::ErrorKind::NotFound, - "CLI initial thread was not found", - )) + pub(super) fn resume_owned_thread(thread: HANDLE, pid: u32) -> io::Result<()> { + #[cfg(test)] + fail_at(FailurePoint::QueryThread)?; + // SAFETY: the caller owns this thread handle with limited-query rights. + let owner = unsafe { GetProcessIdOfThread(thread) }; + if owner == 0 { + return Err(io::Error::last_os_error()); + } + if owner != pid { + return Err(io::Error::new( + io::ErrorKind::PermissionDenied, + "CLI initial thread no longer belongs to the spawned process", + )); + } + #[cfg(test)] + fail_at(FailurePoint::Resume)?; + // SAFETY: the open handle's ownership was verified, and the root's + // initial thread remains suspended until Job assignment completes. + if unsafe { ResumeThread(thread) } == u32::MAX { + return Err(io::Error::last_os_error()); + } + Ok(()) } impl Tree { @@ -195,3 +314,6 @@ mod platform { } } } + +#[cfg(all(test, windows, feature = "runtime"))] +mod tests; diff --git a/rust/src/process_tree/tests.rs b/rust/src/process_tree/tests.rs new file mode 100644 index 0000000000..5106081dac --- /dev/null +++ b/rust/src/process_tree/tests.rs @@ -0,0 +1,318 @@ +#![cfg(test)] + +use std::os::windows::io::{AsRawHandle, FromRawHandle, OwnedHandle}; +use std::os::windows::process::CommandExt; +use std::path::{Path, PathBuf}; +use std::sync::Arc; +use std::time::{Duration, Instant}; +use std::{io, ptr}; + +use tokio::process::{Child, Command}; +use windows_sys::Win32::Foundation::{ + DUPLICATE_SAME_ACCESS, DuplicateHandle, ERROR_ACCESS_DENIED, HANDLE, +}; +use windows_sys::Win32::System::JobObjects::IsProcessInJob; +use windows_sys::Win32::System::Threading::{ + GetCurrentProcess, GetCurrentProcessId, GetCurrentThreadId, OpenThread, + THREAD_QUERY_LIMITED_INFORMATION, THREAD_SUSPEND_RESUME, WaitForSingleObject, +}; + +use super::platform::{check_status, resume_initial_thread, resume_owned_thread}; + +#[derive(Clone, Copy, PartialEq)] +pub(super) enum FailurePoint { + Capture, + Marker, + Walk, + OpenThread, + QueryThread, + Resume, +} + +type BeforeAssignment = Box io::Result<()>>; +type BeforeResume = Box io::Result<()>>; + +thread_local! { + pub(super) static THREADS_EXAMINED: std::cell::Cell = const { std::cell::Cell::new(0) }; + pub(super) static RESUME_ELAPSED: std::cell::Cell = + const { std::cell::Cell::new(Duration::ZERO) }; + pub(super) static BEFORE_ASSIGNMENT: std::cell::RefCell> = + const { std::cell::RefCell::new(None) }; + pub(super) static BEFORE_RESUME: std::cell::RefCell> = + const { std::cell::RefCell::new(None) }; + static FAILURE: std::cell::Cell> = + const { std::cell::Cell::new(None) }; + pub(super) static SNAPSHOTS: std::cell::Cell<(u32, u32)> = + const { std::cell::Cell::new((0, 0)) }; + pub(super) static MARKERS: std::cell::Cell<(u32, u32)> = + const { std::cell::Cell::new((0, 0)) }; +} + +pub(super) fn fail_at(point: FailurePoint) -> io::Result<()> { + if FAILURE.get() == Some(point) { + Err(io::Error::from_raw_os_error(ERROR_ACCESS_DENIED as i32)) + } else { + Ok(()) + } +} + +struct ResetHooks; + +impl Drop for ResetHooks { + fn drop(&mut self) { + FAILURE.set(None); + BEFORE_ASSIGNMENT.with_borrow_mut(|hook| *hook = None); + BEFORE_RESUME.with_borrow_mut(|hook| *hook = None); + } +} + +fn command() -> Command { + let mut command = Command::new( + PathBuf::from(std::env::var_os("SystemRoot").expect("SystemRoot")) + .join("System32") + .join("cmd.exe"), + ); + command.args(["/d", "/c"]).kill_on_drop(true); + command +} + +fn marker_command(marker: &Path) -> Command { + let mut command = command(); + command + .as_std_mut() + .raw_arg(format!("echo ready>\"{}\"", marker.display())); + command +} + +fn retain_process(child: &Child) -> OwnedHandle { + let mut handle = ptr::null_mut(); + // SAFETY: the child owns its live process handle; the duplicate is independently owned. + let result = unsafe { + DuplicateHandle( + GetCurrentProcess(), + child.raw_handle().expect("live child").cast(), + GetCurrentProcess(), + &mut handle, + 0, + 0, + DUPLICATE_SAME_ACCESS, + ) + }; + assert_ne!(result, 0, "{}", io::Error::last_os_error()); + // SAFETY: DuplicateHandle returned a new uniquely owned process handle. + unsafe { OwnedHandle::from_raw_handle(handle) } +} + +fn assert_exited(handle: &OwnedHandle) { + // SAFETY: the independently owned process handle remains valid. + assert_eq!( + unsafe { WaitForSingleObject(handle.as_raw_handle().cast(), 5000) }, + 0, + "owned suspended root must terminate" + ); +} + +#[tokio::test] +async fn initial_thread_lookup_is_process_scoped() { + let mut command = command(); + command.args(["exit", "/b", "0"]); + let start = Instant::now(); + let (mut child, tree) = super::spawn(&mut command).expect("spawn owned suspended child"); + let spawn_elapsed = start.elapsed(); + let status = tokio::time::timeout(Duration::from_secs(5), child.wait()) + .await + .expect("initial thread must execute") + .expect("reap child"); + drop(tree); + assert!(status.success()); + eprintln!( + "owned lookup: spawn_ms={:.3} resume_ms={:.3} entries={}", + spawn_elapsed.as_secs_f64() * 1000.0, + RESUME_ELAPSED.get().as_secs_f64() * 1000.0, + THREADS_EXAMINED.get() + ); + assert_eq!( + THREADS_EXAMINED.get(), + 1, + "lookup must not walk unrelated machine-wide threads" + ); +} + +#[tokio::test] +async fn initial_thread_executes_only_after_private_job_assignment() { + let _reset = ResetHooks; + let dir = tempfile::tempdir().expect("fixture directory"); + let marker = dir.path().join("executed.txt"); + BEFORE_ASSIGNMENT.with_borrow_mut(|hook| { + let marker = marker.clone(); + *hook = Some(Box::new(move |_| { + assert!( + !marker.exists(), + "suspended root cannot execute before assignment" + ); + Ok(()) + })); + }); + BEFORE_RESUME.with_borrow_mut(|hook| { + let marker = marker.clone(); + *hook = Some(Box::new(move |child, job| { + assert!( + !marker.exists(), + "suspended initial thread must not have executed" + ); + let mut assigned = 0; + // SAFETY: both handles remain owned throughout the hook. + assert_ne!( + unsafe { + IsProcessInJob( + child.raw_handle().expect("live child").cast(), + job, + &mut assigned, + ) + }, + 0, + "{}", + io::Error::last_os_error() + ); + assert_ne!( + assigned, 0, + "root must belong to its private Job before resume" + ); + Ok(()) + })); + }); + let (mut child, tree) = super::spawn(&mut marker_command(&marker)).expect("owned spawn"); + let status = tokio::time::timeout(Duration::from_secs(5), child.wait()) + .await + .expect("fixture must execute its initial thread") + .expect("reap fixture"); + assert!(status.success()); + assert_eq!( + std::fs::read_to_string(marker) + .expect("executed marker") + .trim(), + "ready" + ); + drop(tree); +} + +#[tokio::test] +async fn lookup_failures_reap_suspended_root_and_release_pss_resources() { + let _reset = ResetHooks; + for point in [ + FailurePoint::Capture, + FailurePoint::Marker, + FailurePoint::Walk, + FailurePoint::OpenThread, + FailurePoint::QueryThread, + FailurePoint::Resume, + ] { + let dir = tempfile::tempdir().expect("fixture directory"); + let marker = dir.path().join("must-not-execute.txt"); + let retained = Arc::new(parking_lot::Mutex::new(None)); + BEFORE_ASSIGNMENT.with_borrow_mut(|hook| { + let retained = retained.clone(); + *hook = Some(Box::new(move |child| { + *retained.lock() = Some(retain_process(child)); + Ok(()) + })); + }); + SNAPSHOTS.set((0, 0)); + MARKERS.set((0, 0)); + FAILURE.set(Some(point)); + let result = super::spawn(&mut marker_command(&marker)); + let error = result.err().expect("injected launch failure"); + assert_eq!(error.raw_os_error(), Some(ERROR_ACCESS_DENIED as i32)); + assert_exited(retained.lock().as_ref().expect("retained suspended root")); + assert!( + !marker.exists(), + "failed lookup must never execute the root" + ); + let snapshots = u32::from(point != FailurePoint::Capture); + let markers = u32::from(point != FailurePoint::Capture && point != FailurePoint::Marker); + assert_eq!(SNAPSHOTS.get(), (snapshots, snapshots)); + assert_eq!(MARKERS.get(), (markers, markers)); + } +} + +#[tokio::test] +async fn pre_assignment_failure_terminates_suspended_root() { + let _reset = ResetHooks; + let dir = tempfile::tempdir().expect("fixture directory"); + let marker = dir.path().join("must-not-execute.txt"); + let retained = Arc::new(parking_lot::Mutex::new(None)); + BEFORE_ASSIGNMENT.with_borrow_mut(|hook| { + let retained = retained.clone(); + *hook = Some(Box::new(move |child| { + *retained.lock() = Some(retain_process(child)); + Err(io::Error::from_raw_os_error(ERROR_ACCESS_DENIED as i32)) + })); + }); + let error = super::spawn(&mut marker_command(&marker)) + .err() + .expect("assignment failure"); + assert_eq!(error.raw_os_error(), Some(ERROR_ACCESS_DENIED as i32)); + assert_exited(retained.lock().as_ref().expect("retained root")); + assert!(!marker.exists()); +} + +#[test] +fn pss_status_uses_returned_win32_error() { + assert!(check_status(0).is_ok()); + assert_eq!( + check_status(ERROR_ACCESS_DENIED) + .expect_err("direct status error") + .raw_os_error(), + Some(ERROR_ACCESS_DENIED as i32) + ); +} + +#[test] +fn invalid_process_capture_returns_error_without_resources() { + let _reset = ResetHooks; + SNAPSHOTS.set((0, 0)); + MARKERS.set((0, 0)); + assert!(resume_initial_thread(ptr::null_mut(), 1).is_err()); + assert_eq!(SNAPSHOTS.get(), (0, 0)); + assert_eq!(MARKERS.get(), (0, 0)); +} + +#[test] +fn foreign_snapshot_entries_cannot_be_resumed() { + let _reset = ResetHooks; + SNAPSHOTS.set((0, 0)); + MARKERS.set((0, 0)); + // SAFETY: the pseudo handle references the current live process. + let error = resume_initial_thread(unsafe { GetCurrentProcess() }, u32::MAX) + .expect_err("no matching owned thread"); + assert_eq!(error.kind(), io::ErrorKind::NotFound); + assert_eq!(SNAPSHOTS.get(), (1, 1)); + assert_eq!(MARKERS.get(), (1, 1)); +} + +#[test] +fn opened_foreign_thread_is_rejected_before_resume() { + let _reset = ResetHooks; + // SAFETY: the thread ID identifies this live test thread. + let handle = unsafe { + OpenThread( + THREAD_QUERY_LIMITED_INFORMATION | THREAD_SUSPEND_RESUME, + 0, + GetCurrentThreadId(), + ) + }; + assert!(!handle.is_null(), "{}", io::Error::last_os_error()); + // SAFETY: OpenThread returned a new uniquely owned handle. + let thread = unsafe { OwnedHandle::from_raw_handle(handle) }; + let error = resume_owned_thread(thread.as_raw_handle().cast(), unsafe { + GetCurrentProcessId().wrapping_add(1) + }) + .expect_err("opened handle belongs to a different process"); + assert_eq!(error.kind(), io::ErrorKind::PermissionDenied); +} + +#[test] +fn invalid_thread_ownership_query_returns_error() { + let _reset = ResetHooks; + assert!(resume_owned_thread(ptr::null_mut(), 1).is_err()); +} diff --git a/rust/tests/e2e/client_options.rs b/rust/tests/e2e/client_options.rs index c516f84be6..fe6e15a94c 100644 --- a/rust/tests/e2e/client_options.rs +++ b/rust/tests/e2e/client_options.rs @@ -18,6 +18,10 @@ use serde::Deserialize; use serde_json::{Value, json}; use tempfile::TempDir; +#[cfg(windows)] +#[path = "client_options/windows_process_tree.rs"] +mod windows_process_tree; + #[tokio::test] async fn should_forward_advanced_session_creation_options_to_the_cli() { let fake = FakeCli::new(); diff --git a/rust/tests/e2e/client_options/windows_process_tree.rs b/rust/tests/e2e/client_options/windows_process_tree.rs new file mode 100644 index 0000000000..36035536ac --- /dev/null +++ b/rust/tests/e2e/client_options/windows_process_tree.rs @@ -0,0 +1,252 @@ +#![cfg(windows)] + +use std::io; +use std::os::windows::io::{AsRawHandle, FromRawHandle, OwnedHandle}; +use std::path::Path; +use std::time::Duration; + +use github_copilot_sdk::{CliProgram, Client, ClientOptions, Transport}; +use windows_sys::Win32::System::Threading::{ + OpenProcess, PROCESS_SYNCHRONIZE, PROCESS_TERMINATE, TerminateProcess, WaitForSingleObject, +}; + +use super::ShutdownCli; + +struct FixtureProcess(OwnedHandle); + +impl FixtureProcess { + fn open(pid: u32) -> Self { + // SAFETY: this PID was published by this test's owned fixture. + let handle = unsafe { OpenProcess(PROCESS_SYNCHRONIZE | PROCESS_TERMINATE, 0, pid) }; + assert!(!handle.is_null(), "{}", io::Error::last_os_error()); + // SAFETY: OpenProcess returned a new independently owned handle. + Self(unsafe { OwnedHandle::from_raw_handle(handle) }) + } + + fn alive(&self) -> bool { + // SAFETY: the retained process handle is valid even after the process exits. + match unsafe { WaitForSingleObject(self.0.as_raw_handle().cast(), 0) } { + 0 => false, + 258 => true, + result => panic!( + "process wait failed ({result}): {}", + io::Error::last_os_error() + ), + } + } + + fn terminate(&self) { + // SAFETY: this handle uniquely identifies a fixture-owned process, not a reused PID. + assert_ne!( + unsafe { TerminateProcess(self.0.as_raw_handle().cast(), 1) }, + 0, + "{}", + io::Error::last_os_error() + ); + } + + async fn assert_exited(&self) { + tokio::time::timeout(Duration::from_secs(5), async { + while self.alive() { + tokio::time::sleep(Duration::from_millis(10)).await; + } + }) + .await + .expect("owned root and descendant must terminate"); + } +} + +impl Drop for FixtureProcess { + fn drop(&mut self) { + // SAFETY: fallback cleanup targets only this fixture's retained process handle. + unsafe { + if WaitForSingleObject(self.0.as_raw_handle().cast(), 0) == 258 { + if TerminateProcess(self.0.as_raw_handle().cast(), 1) == 0 { + eprintln!( + "fixture fallback termination failed: {}", + io::Error::last_os_error() + ); + } + if WaitForSingleObject(self.0.as_raw_handle().cast(), 5000) != 0 { + eprintln!( + "fixture fallback reap failed: {}", + io::Error::last_os_error() + ); + } + } + } + } +} + +fn options(fake: &ShutdownCli, tcp: bool) -> ClientOptions { + let mut options = fake.options(); + options.prefix_args.push("--fixture-descendant".into()); + if tcp { + options.prefix_args.push("--fixture-tcp".into()); + options.transport = Transport::Tcp { + port: 0, + connection_token: None, + }; + } + options +} + +async fn published_pid(path: &Path) -> u32 { + tokio::time::timeout(Duration::from_secs(10), async { + loop { + match std::fs::read_to_string(path) { + Ok(value) => { + if let Ok(pid) = value.trim().parse() { + return pid; + } + } + Err(error) if error.kind() == io::ErrorKind::NotFound => {} + Err(error) => panic!("read fixture PID: {error}"), + } + tokio::time::sleep(Duration::from_millis(10)).await; + } + }) + .await + .expect("fixture must publish its PID") +} + +async fn retain_tree(fake: &ShutdownCli) -> (FixtureProcess, FixtureProcess) { + let root = FixtureProcess::open(published_pid(&fake.pid_file).await); + let descendant_path = fake.pid_file.with_file_name("child.pid.descendant"); + let descendant = FixtureProcess::open(published_pid(&descendant_path).await); + assert!(root.alive()); + assert!(descendant.alive()); + (root, descendant) +} + +#[tokio::test] +async fn stop_force_stop_and_drop_terminate_owned_descendants() { + for tcp in [false, true] { + for action in ["stop", "force_stop", "drop"] { + let fake = ShutdownCli::new("force"); + let client = Client::start(options(&fake, tcp)) + .await + .expect("start fixture CLI"); + let (root, descendant) = retain_tree(&fake).await; + match action { + "stop" => client.stop().await.expect("stop fixture CLI"), + "force_stop" => client.force_stop(), + "drop" => {} + _ => unreachable!(), + } + drop(client); + root.assert_exited().await; + descendant.assert_exited().await; + } + } +} + +#[tokio::test] +async fn cancelled_startup_terminates_root_and_descendant() { + for (tcp, mode) in [ + (false, "connect-stall"), + (true, "connect-stall"), + (true, "port-stall"), + ] { + let fake = ShutdownCli::new(mode); + let starting = tokio::spawn(Client::start(options(&fake, tcp))); + let (root, descendant) = retain_tree(&fake).await; + starting.abort(); + assert!(starting.await.expect_err("cancel startup").is_cancelled()); + root.assert_exited().await; + descendant.assert_exited().await; + } +} + +#[tokio::test] +async fn startup_process_exit_terminates_descendant() { + for tcp in [false, true] { + let fake = ShutdownCli::new("connect-stall"); + let starting = tokio::spawn(Client::start(options(&fake, tcp))); + let (root, descendant) = retain_tree(&fake).await; + root.terminate(); + let result = tokio::time::timeout(Duration::from_secs(5), starting) + .await + .expect("startup failure must be bounded") + .expect("join startup task"); + assert!(result.is_err()); + root.assert_exited().await; + descendant.assert_exited().await; + } +} + +#[tokio::test] +async fn last_clone_drop_is_private_to_its_client_job() { + for tcp in [false, true] { + let first = ShutdownCli::new("force"); + let client = Client::start(options(&first, tcp)) + .await + .expect("start first client"); + let retained_client = client.clone(); + let first_tree = retain_tree(&first).await; + let second = ShutdownCli::new("force"); + let second_client = Client::start(options(&second, tcp)) + .await + .expect("start second client"); + let second_tree = retain_tree(&second).await; + + drop(client); + assert!(first_tree.0.alive()); + assert!(first_tree.1.alive()); + drop(retained_client); + first_tree.0.assert_exited().await; + first_tree.1.assert_exited().await; + assert!(second_tree.0.alive()); + assert!(second_tree.1.alive()); + second_client + .ping(Some("private-job-isolation")) + .await + .expect("other client's Job must remain alive"); + second_client.force_stop(); + second_tree.0.assert_exited().await; + second_tree.1.assert_exited().await; + } +} + +#[tokio::test] +async fn abrupt_host_exit_terminates_root_and_descendant_without_rust_cleanup() { + for tcp in [false, true] { + let fake = ShutdownCli::new("force"); + let options = options(&fake, tcp); + let CliProgram::Path(program) = options.program else { + panic!("fixture uses an explicit program"); + }; + let prefix: Vec<_> = options + .prefix_args + .iter() + .map(|arg| arg.to_str().expect("fixture argument is UTF-8")) + .collect(); + let host_pid_file = fake.dir.path().join("host-cli.pid"); + let mut host = + tokio::process::Command::new(env!("CARGO_BIN_EXE_copilot-host-crash-fixture")) + .env("HOST_CRASH_FIXTURE_PROGRAM", program) + .env( + "HOST_CRASH_FIXTURE_PREFIX_ARGS_JSON", + serde_json::to_string(&prefix).expect("fixture args"), + ) + .env("HOST_CRASH_FIXTURE_CWD", fake.dir.path()) + .env("HOST_CRASH_FIXTURE_ENV_JSON", "[]") + .env("HOST_CRASH_FIXTURE_PID_FILE", &host_pid_file) + .env( + "HOST_CRASH_FIXTURE_TRANSPORT", + if tcp { "tcp" } else { "stdio" }, + ) + .kill_on_drop(true) + .spawn() + .expect("spawn SDK host fixture"); + let reported_root = published_pid(&host_pid_file).await; + assert_eq!(reported_root, published_pid(&fake.pid_file).await); + let (root, descendant) = retain_tree(&fake).await; + tokio::time::timeout(Duration::from_secs(5), host.kill()) + .await + .expect("bound abrupt host termination") + .expect("kill and reap SDK host"); + root.assert_exited().await; + descendant.assert_exited().await; + } +} diff --git a/rust/tests/fixtures/host_crash_fixture.rs b/rust/tests/fixtures/host_crash_fixture.rs index 8c48379001..204b5dbb67 100644 --- a/rust/tests/fixtures/host_crash_fixture.rs +++ b/rust/tests/fixtures/host_crash_fixture.rs @@ -13,6 +13,7 @@ //! on the spawned CLI's environment. //! - `HOST_CRASH_FIXTURE_PID_FILE`: path this process atomically publishes the //! CLI child's OS process id to, once the client finishes starting. +//! - `HOST_CRASH_FIXTURE_TRANSPORT`: optional `stdio` (default) or `tcp`. use std::io::Write; use std::path::PathBuf; @@ -38,13 +39,21 @@ async fn main() { std::env::var("HOST_CRASH_FIXTURE_PID_FILE").expect("HOST_CRASH_FIXTURE_PID_FILE"), ); + let transport = match std::env::var("HOST_CRASH_FIXTURE_TRANSPORT").as_deref() { + Ok("tcp") => Transport::Tcp { + port: 0, + connection_token: None, + }, + Ok("stdio") | Err(std::env::VarError::NotPresent) => Transport::Stdio, + value => panic!("invalid HOST_CRASH_FIXTURE_TRANSPORT: {value:?}"), + }; let options = ClientOptions::new() .with_program(CliProgram::Path(PathBuf::from(program))) .with_prefix_args(prefix_args) .with_cwd(PathBuf::from(cwd)) .with_env(env_pairs) .with_use_logged_in_user(false) - .with_transport(Transport::Stdio); + .with_transport(transport); let client = Client::start(options).await.expect("start CLI client"); let pid = client.pid().expect("client reports spawned CLI pid"); diff --git a/test/harness/stdio-shutdown-runtime.cjs b/test/harness/stdio-shutdown-runtime.cjs index 154537a3c0..f3230a041d 100644 --- a/test/harness/stdio-shutdown-runtime.cjs +++ b/test/harness/stdio-shutdown-runtime.cjs @@ -9,13 +9,23 @@ const { dirname } = require("node:path"); const [marker, mode, pidFile] = process.argv.slice(2); const useTcp = process.argv.includes("--fixture-tcp"); -if (!marker || !pidFile || !["stop", "dispose", "force", "fallback", "start-failure", "shutdown-error"].includes(mode)) { +if (!marker || !pidFile || !["stop", "dispose", "force", "fallback", "start-failure", "shutdown-error", "connect-stall", "port-stall"].includes(mode)) { throw new Error("Expected cleanup marker, shutdown mode, and PID file arguments"); } fs.writeFileSync(pidFile, String(process.pid)); -if (mode === "fallback" || mode === "start-failure") { +if (mode === "fallback" || mode === "start-failure" || mode === "connect-stall" || mode === "port-stall") { setInterval(() => {}, 1000); } +if (process.argv.includes("--fixture-descendant")) { + const child = require("node:child_process").spawn( + process.execPath, + ["-e", "setInterval(() => {}, 1000)"], + { stdio: "ignore" }, + ); + child.on("error", (error) => { throw error; }); + fs.writeFileSync(`${pidFile}.descendant`, String(child.pid)); + child.unref(); +} let buffered = Buffer.alloc(0); let shutdownRequested = false; @@ -35,6 +45,7 @@ const handleData = (chunk, output) => { let error; switch (message.method) { case "connect": + if (mode === "connect-stall") continue; result = { ok: true, protocolVersion: mode === "start-failure" ? -1 : 3, @@ -42,7 +53,7 @@ const handleData = (chunk, output) => { }; break; case "ping": - result = { message: message.params?.message, timestamp: Date.now(), protocolVersion: 3 }; + result = { message: message.params?.message, timestamp: new Date().toISOString(), protocolVersion: 3 }; break; case "runtime.shutdown": shutdownRequested = true; @@ -68,7 +79,7 @@ if (useTcp) { socket.on("data", (chunk) => handleData(chunk, socket)); }); server.listen(0, "127.0.0.1", () => { - console.log(`listening on port ${server.address().port}`); + if (mode !== "port-stall") console.log(`listening on port ${server.address().port}`); }); } else { process.stdin.on("data", (chunk) => handleData(chunk, process.stdout));