From c411cc67bd210fad704ed0b1e56298c6a81cf8c4 Mon Sep 17 00:00:00 2001 From: Rahul Singhal Date: Mon, 19 Oct 2026 20:00:37 +0000 Subject: [PATCH 1/4] feat(sea): add gRPC transport Signed-off-by: Rahul Singhal --- Cargo.lock | 358 ++++++++++++++++++++++++- Cargo.toml | 5 + build.rs | 14 + proto/sea_driver_kernel.proto | 269 +++++++++++++++++++ pyo3/Cargo.lock | 433 +++++++++++++++++++++++++++++- pyo3/src/session.rs | 5 + src/client/grpc.rs | 483 ++++++++++++++++++++++++++++++++++ src/client/grpc_proto.rs | 3 + src/client/mod.rs | 2 + src/client/sea.rs | 107 ++++++++ src/config.rs | 2 + src/session.rs | 20 +- 12 files changed, 1680 insertions(+), 21 deletions(-) create mode 100644 build.rs create mode 100644 proto/sea_driver_kernel.proto create mode 100644 src/client/grpc.rs create mode 100644 src/client/grpc_proto.rs diff --git a/Cargo.lock b/Cargo.lock index 4f3e1136..25d13849 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -63,6 +63,12 @@ dependencies = [ "libc", ] +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + [[package]] name = "approx" version = "0.5.1" @@ -258,6 +264,28 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + [[package]] name = "async-trait" version = "0.1.92" @@ -290,6 +318,53 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" +[[package]] +name = "axum" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +dependencies = [ + "async-trait", + "axum-core", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper", + "tower 0.5.3", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper", + "tower-layer", + "tower-service", +] + [[package]] name = "base16ct" version = "0.2.0" @@ -690,6 +765,7 @@ dependencies = [ "p256", "pbkdf2 0.13.0", "pkcs8", + "prost", "rand 0.10.2", "rcgen", "reqwest", @@ -703,6 +779,8 @@ dependencies = [ "tokio", "tokio-rustls", "tokio-util", + "tonic", + "tonic-build", "tracing", "tracing-subscriber", "wiremock", @@ -830,6 +908,12 @@ dependencies = [ "spki", ] +[[package]] +name = "either" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" + [[package]] name = "elliptic-curve" version = "0.13.8" @@ -908,6 +992,12 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + [[package]] name = "flatbuffers" version = "25.12.19" @@ -1140,7 +1230,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap", + "indexmap 2.14.0", "slab", "tokio", "tokio-util", @@ -1159,6 +1249,12 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hashbrown" version = "0.14.5" @@ -1171,6 +1267,12 @@ version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.5.2" @@ -1295,6 +1397,19 @@ dependencies = [ "webpki-roots", ] +[[package]] +name = "hyper-timeout" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" +dependencies = [ + "hyper", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + [[package]] name = "hyper-tls" version = "0.6.0" @@ -1328,7 +1443,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.4", "tokio", "tower-service", "tracing", @@ -1461,6 +1576,16 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + [[package]] name = "indexmap" version = "2.14.0" @@ -1516,6 +1641,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.18" @@ -1686,12 +1820,24 @@ dependencies = [ "regex-automata", ] +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + [[package]] name = "memchr" version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + [[package]] name = "minimal-lexical" version = "0.2.1" @@ -1739,6 +1885,12 @@ dependencies = [ "uuid", ] +[[package]] +name = "multimap" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" + [[package]] name = "native-tls" version = "0.2.18" @@ -2057,6 +2209,36 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "petgraph" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +dependencies = [ + "fixedbitset", + "indexmap 2.14.0", +] + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + [[package]] name = "pin-project-lite" version = "0.2.17" @@ -2137,6 +2319,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.118", +] + [[package]] name = "primeorder" version = "0.13.6" @@ -2164,6 +2356,58 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prost" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" +dependencies = [ + "heck", + "itertools", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn 2.0.118", + "tempfile", +] + +[[package]] +name = "prost-derive" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "prost-types" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" +dependencies = [ + "prost", +] + [[package]] name = "quinn" version = "0.11.11" @@ -2177,7 +2421,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2", + "socket2 0.6.4", "thiserror 2.0.19", "tokio", "tracing", @@ -2215,7 +2459,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2", + "socket2 0.6.4", "tracing", "windows-sys 0.61.2", ] @@ -2394,7 +2638,7 @@ dependencies = [ "tokio-native-tls", "tokio-rustls", "tokio-util", - "tower", + "tower 0.5.3", "tower-http", "tower-service", "url", @@ -2492,6 +2736,7 @@ version = "0.23.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634" dependencies = [ + "log", "once_cell", "ring", "rustls-pki-types", @@ -2512,6 +2757,15 @@ dependencies = [ "security-framework", ] +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "rustls-pki-types" version = "1.15.0" @@ -2776,6 +3030,16 @@ version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "socket2" version = "0.6.4" @@ -3000,7 +3264,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.6.4", "tokio-macros", "windows-sys 0.61.2", ] @@ -3036,6 +3300,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-stream" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d06f0b082ba57c26b79407372e57cf2a1e28124f78e9479fe80322cf53420b" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-util" version = "0.7.19" @@ -3065,7 +3340,7 @@ version = "0.25.15+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1340ea94a5856333492c9064b02c778b191dd2c853778d9609debdcdfea3a614" dependencies = [ - "indexmap", + "indexmap 2.14.0", "toml_datetime", "toml_parser", "winnow", @@ -3080,6 +3355,73 @@ dependencies = [ "winnow", ] +[[package]] +name = "tonic" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64", + "bytes", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-timeout", + "hyper-util", + "percent-encoding", + "pin-project", + "prost", + "rustls-native-certs", + "rustls-pemfile", + "socket2 0.5.10", + "tokio", + "tokio-rustls", + "tokio-stream", + "tower 0.4.13", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-build" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "prost-types", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "indexmap 1.9.3", + "pin-project", + "pin-project-lite", + "rand 0.8.6", + "slab", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower" version = "0.5.3" @@ -3112,7 +3454,7 @@ dependencies = [ "pin-project-lite", "tokio", "tokio-util", - "tower", + "tower 0.5.3", "tower-layer", "tower-service", "url", diff --git a/Cargo.toml b/Cargo.toml index 96ebbaae..9555cbcc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,6 +60,8 @@ arrow-ipc = "59" # module load time and segfaults the process before any Rust code runs. # `rustls` is pure Rust + ring and avoids the conflict entirely. reqwest = { version = "0.12", default-features = false, features = ["json", "gzip", "stream"] } +prost = "0.13" +tonic = { version = "0.12", default-features = false, features = ["codegen", "prost", "transport", "tls-native-roots"] } tokio = { version = "1", features = ["full", "sync"] } # Serialization @@ -212,6 +214,9 @@ tls-rustls = ["reqwest/rustls-tls", "reqwest/rustls-tls-native-roots"] name = "databricks_sql_kernel" crate-type = ["lib", "cdylib", "staticlib"] +[build-dependencies] +tonic-build = "0.12" + # Workspace — the kernel is its own single-member workspace root. # # Neither `pyo3/` nor `napi/` is a member: both bindings opt INTO diff --git a/build.rs b/build.rs new file mode 100644 index 00000000..c404a704 --- /dev/null +++ b/build.rs @@ -0,0 +1,14 @@ +fn main() -> Result<(), Box> { + let proto = "proto/sea_driver_kernel.proto"; + println!("cargo:rerun-if-changed={proto}"); + + tonic_build::configure() + .build_server(false) + .type_attribute( + "databricks.sqlexecapi.ColumnTypeName", + "#[allow(clippy::enum_variant_names)]", + ) + .compile_protos(&[proto], &["proto"])?; + + Ok(()) +} diff --git a/proto/sea_driver_kernel.proto b/proto/sea_driver_kernel.proto new file mode 100644 index 00000000..ddcf89c1 --- /dev/null +++ b/proto/sea_driver_kernel.proto @@ -0,0 +1,269 @@ +// @generated by //cmdexec/sql-exec-api/proto:generate_driver_kernel_proto. +// DO NOT EDIT MANUALLY. Regenerate in Universe, then copy this file unchanged to drivers. +// +// Canonical source: cmdexec/sql-exec-api/proto/sql_exec_api_service.proto +// Selection: DRIVER_KERNEL +// Canonical descriptor SHA-256: 4328711f8376e7e9a7ae0b9f9dc609b6eed6c23c91a97c6425740d0673bd5200 +// Generated wire descriptor SHA-256: 0b058ecfc5db474c2da1c51e51667bfc3faac272bb43ae0f15d445bc2deab4a1 +// +// This client-only schema omits Databricks-internal annotations and unselected API surface. +// Retained field and enum numbers match the canonical SEA schema and must not be reassigned. +syntax = "proto3"; + +package databricks.sqlexecapi; + +service SqlExecutionApiService { + rpc executeStatement(ExecuteStatementRequest) returns (StatementResponse); + rpc getStatementStatus(GetStatementStatusRequest) returns (StatementStatus); + rpc getStatementResult(GetStatementResultRequest) returns (StatementResponse); + rpc getResultData(GetResultDataRequest) returns (ResultData); + rpc cancelStatement(CancelStatementRequest) returns (CancelStatementResponse); + rpc closeStatement(CloseStatementRequest) returns (CloseStatementResponse); + rpc createSessionV2(CreateSessionRequestV2) returns (CreateSessionResponse); + rpc terminateSession(TerminateSessionRequest) returns (TerminateSessionResponse); +} + +message ExecuteStatementRequest { + optional string statement = 1; + optional string warehouse_id = 2; + optional string catalog = 3; + optional string schema = 4; + optional int64 row_limit = 5; + optional Format format = 7; + optional FetchDisposition disposition = 8; + optional string wait_timeout = 9; + optional TimeoutAction on_wait_timeout = 10; + optional string session_id = 12; + repeated StatementParameter parameters = 13; + optional CompressionCodec result_compression = 15; + repeated QueryTag query_tags = 17; + optional SessionVersion session_version = 23; +} + +message StatementParameter { + optional int32 ordinal = 1; + optional string name = 2; + optional string value = 3; + optional string type = 4; +} + +message QueryTag { + optional string key = 1; + optional string value = 2; +} + +message StatementResponse { + optional string statement_id = 1; + optional StatementStatus status = 2; + optional ResultManifest manifest = 3; + optional ResultData result = 4; +} + +message StatementStatus { + enum State { + STATE_UNSPECIFIED = 0; + PENDING = 1; + RUNNING = 2; + SUCCEEDED = 3; + FAILED = 4; + CANCELED = 5; + CLOSED = 6; + } + + optional StatementStatus.State state = 1; + optional ServiceError error = 2; + optional string sql_state = 3; + optional SessionVersion session_version = 4; +} + +message ServiceError { + optional ErrorCode error_code = 1; + optional string message = 2; +} + +message ResultManifest { + optional Format format = 1; + optional Schema schema = 2; + optional int32 total_chunk_count = 3; + repeated ChunkInfo chunks = 4; + optional int64 total_row_count = 5; + optional int64 total_byte_count = 6; + optional bytes arrow_schema = 7; + optional bool truncated = 8; + optional CompressionCodec result_compression = 9; + optional bool is_native_metadata_result = 11; +} + +message Schema { + optional int32 column_count = 1; + repeated ColumnInfo columns = 2; +} + +message ColumnInfo { + optional string name = 1; + optional string type_text = 2; + optional string type_json = 3; + optional ColumnTypeName type_name = 4; + optional int32 type_precision = 5; + optional int32 type_scale = 6; + optional string type_interval_type = 7; + optional int32 position = 8; +} + +message ResultData { + optional Chunk chunk = 1; + repeated ExternalLink external_links = 2; +} + +message Chunk { + optional ChunkInfo info = 1; + optional bytes attachment = 4; +} + +message ChunkInfo { + optional int32 chunk_index = 1; + optional int64 row_offset = 2; + optional int64 row_count = 3; + optional int64 byte_count = 4; + optional int32 next_chunk_index = 6; + optional string next_chunk_internal_link = 7; +} + +message ExternalLink { + optional ChunkInfo info = 1; + optional string external_link = 2; + optional string expiration = 3; + map http_headers = 4; +} + +message GetStatementStatusRequest { + optional string statement_id = 1; + optional string warehouse_id = 3; + optional string session_id = 4; +} + +message GetStatementResultRequest { + optional string statement_id = 1; + optional string warehouse_id = 4; + optional string session_id = 5; +} + +message GetResultDataRequest { + optional string statement_id = 1; + optional int32 chunk_index = 2; + optional int64 row_offset = 3; + optional string warehouse_id = 5; + optional string session_id = 6; +} + +message CancelStatementRequest { + optional string statement_id = 1; +} + +message CancelStatementResponse { +} + +message CloseStatementRequest { + optional string statement_id = 1; +} + +message CloseStatementResponse { +} + +message CreateSessionRequestV2 { + optional string warehouse_id = 1; + optional string catalog = 2; + optional string schema = 3; + map session_confs = 4; + optional SessionExecutionMode execution_mode = 6; +} + +message CreateSessionResponse { + optional string session_id = 1; + optional SessionVersion session_version = 2; +} + +message SessionVersion { + optional int64 version_id = 1; +} + +message TerminateSessionRequest { + optional string session_id = 1; + optional string warehouse_id = 2; +} + +message TerminateSessionResponse { +} + +enum ErrorCode { + UNKNOWN = 0; + INTERNAL_ERROR = 1; + TEMPORARILY_UNAVAILABLE = 2; + BAD_REQUEST = 4; + NOT_FOUND = 11; + UNAUTHENTICATED = 13; + INVALID_PARAMETER_VALUE = 1000; + PERMISSION_DENIED = 1004; + REQUEST_LIMIT_EXCEEDED = 1007; +} + +enum TimeoutAction { + TIMEOUT_ACTION_UNSPECIFIED = 0; + CONTINUE = 1; + CANCEL = 2; +} + +enum CompressionCodec { + NONE = 0; + LZ4_FRAME = 1; +} + +enum Format { + FORMAT_UNSPECIFIED = 0; + ARROW_STREAM = 3; +} + +enum FetchDisposition { + FETCH_DISPOSITION_UNSPECIFIED = 0; + INLINE = 1; + INLINE_OR_EXTERNAL_LINKS = 4; +} + +enum SessionExecutionMode { + SESSION_EXECUTION_MODE_UNSPECIFIED = 0; + FAST = 2; +} + +enum ColumnTypeName { + UNKNOWN_COLUMN_TYPE_NAME = 0; + BOOLEAN = 1; + BYTE = 2; + SHORT = 3; + INT = 4; + LONG = 5; + FLOAT = 6; + DOUBLE = 7; + DATE = 8; + TIMESTAMP = 9; + STRING = 10; + BINARY = 11; + DECIMAL = 12; + INTERVAL = 13; + ARRAY = 14; + STRUCT = 15; + MAP = 16; + CHAR = 17; + NULL = 18; + USER_DEFINED_TYPE = 19; + TIMESTAMP_NTZ = 20; + VARIANT = 21; + GEOMETRY = 22; + GEOGRAPHY = 23; + TIME = 24; + FILE = 25; + TIMESTAMP_NANOS = 26; + TIMESTAMP_NTZ_NANOS = 27; + DECFLOAT = 28; + TABLE_TYPE = 30; + TABLEREF_TYPE = 31; +} diff --git a/pyo3/Cargo.lock b/pyo3/Cargo.lock index 1e0788ec..fc5c253d 100644 --- a/pyo3/Cargo.lock +++ b/pyo3/Cargo.lock @@ -63,6 +63,12 @@ dependencies = [ "libc", ] +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + [[package]] name = "approx" version = "0.5.1" @@ -230,6 +236,28 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "async-stream" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" +dependencies = [ + "async-stream-impl", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + [[package]] name = "async-trait" version = "0.1.89" @@ -262,6 +290,53 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" +[[package]] +name = "axum" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" +dependencies = [ + "async-trait", + "axum-core", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper", + "tower 0.5.3", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "mime", + "pin-project-lite", + "rustversion", + "sync_wrapper", + "tower-layer", + "tower-service", +] + [[package]] name = "base64" version = "0.22.1" @@ -627,6 +702,7 @@ dependencies = [ "open", "pbkdf2 0.13.0", "pkcs8", + "prost", "rand 0.10.2", "reqwest", "serde", @@ -635,6 +711,8 @@ dependencies = [ "thiserror 2.0.19", "tokio", "tokio-util", + "tonic", + "tonic-build", "tracing", "tracing-subscriber", "wkb", @@ -730,6 +808,12 @@ dependencies = [ "syn 2.0.118", ] +[[package]] +name = "either" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" + [[package]] name = "equivalent" version = "1.0.2" @@ -766,12 +850,24 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + [[package]] name = "find-msvc-tools" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + [[package]] name = "flatbuffers" version = "25.12.19" @@ -792,6 +888,12 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -959,6 +1061,25 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "h2" +version = "0.4.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d29020232d6aa3fb1daca64c1127cf662cf97f254ae16c18c05b8ab635fc118" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap 2.14.0", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "half" version = "2.7.1" @@ -971,6 +1092,12 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hashbrown" version = "0.14.5" @@ -1052,6 +1179,12 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + [[package]] name = "hybrid-array" version = "0.4.13" @@ -1072,9 +1205,11 @@ dependencies = [ "bytes", "futures-channel", "futures-core", + "h2", "http", "http-body", "httparse", + "httpdate", "itoa", "pin-project-lite", "smallvec", @@ -1099,6 +1234,19 @@ dependencies = [ "webpki-roots", ] +[[package]] +name = "hyper-timeout" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" +dependencies = [ + "hyper", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + [[package]] name = "hyper-util" version = "0.1.20" @@ -1116,7 +1264,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2", + "socket2 0.6.4", "tokio", "tower-service", "tracing", @@ -1249,6 +1397,16 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", +] + [[package]] name = "indexmap" version = "2.14.0" @@ -1304,6 +1462,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.18" @@ -1420,6 +1587,12 @@ dependencies = [ "libc", ] +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + [[package]] name = "litemap" version = "0.8.2" @@ -1465,12 +1638,24 @@ dependencies = [ "regex-automata", ] +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + [[package]] name = "memchr" version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + [[package]] name = "miniz_oxide" version = "0.8.9" @@ -1512,6 +1697,12 @@ dependencies = [ "uuid", ] +[[package]] +name = "multimap" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" + [[package]] name = "nu-ansi-term" version = "0.50.3" @@ -1709,6 +1900,36 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "petgraph" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +dependencies = [ + "fixedbitset", + "indexmap 2.14.0", +] + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + [[package]] name = "pin-project-lite" version = "0.2.17" @@ -1772,6 +1993,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.118", +] + [[package]] name = "proc-macro-crate" version = "3.5.0" @@ -1790,6 +2021,58 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prost" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" +dependencies = [ + "heck", + "itertools", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn 2.0.118", + "tempfile", +] + +[[package]] +name = "prost-derive" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "prost-types" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" +dependencies = [ + "prost", +] + [[package]] name = "pyo3" version = "0.29.0" @@ -1871,7 +2154,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2", + "socket2 0.6.4", "thiserror 2.0.19", "tokio", "tracing", @@ -1909,7 +2192,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2", + "socket2 0.6.4", "tracing", "windows-sys 0.61.2", ] @@ -2011,6 +2294,18 @@ dependencies = [ "thiserror 2.0.19", ] +[[package]] +name = "regex" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0e75113e14dc5acb068cd0786884f214f1312650a3d36d269f5c4f3cdee8a2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + [[package]] name = "regex-automata" version = "0.4.15" @@ -2059,7 +2354,7 @@ dependencies = [ "tokio", "tokio-rustls", "tokio-util", - "tower", + "tower 0.5.3", "tower-http", "tower-service", "url", @@ -2099,12 +2394,26 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + [[package]] name = "rustls" version = "0.23.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634" dependencies = [ + "log", "once_cell", "ring", "rustls-pki-types", @@ -2125,6 +2434,15 @@ dependencies = [ "security-framework", ] +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "rustls-pki-types" version = "1.15.0" @@ -2365,6 +2683,16 @@ version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" +[[package]] +name = "socket2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "socket2" version = "0.6.4" @@ -2451,6 +2779,19 @@ version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -2576,7 +2917,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2", + "socket2 0.6.4", "tokio-macros", "windows-sys 0.61.2", ] @@ -2602,6 +2943,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-stream" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d06f0b082ba57c26b79407372e57cf2a1e28124f78e9479fe80322cf53420b" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-util" version = "0.7.18" @@ -2630,7 +2982,7 @@ version = "0.25.15+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1340ea94a5856333492c9064b02c778b191dd2c853778d9609debdcdfea3a614" dependencies = [ - "indexmap", + "indexmap 2.14.0", "toml_datetime", "toml_parser", "winnow", @@ -2645,6 +2997,73 @@ dependencies = [ "winnow", ] +[[package]] +name = "tonic" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +dependencies = [ + "async-stream", + "async-trait", + "axum", + "base64", + "bytes", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-timeout", + "hyper-util", + "percent-encoding", + "pin-project", + "prost", + "rustls-native-certs", + "rustls-pemfile", + "socket2 0.5.10", + "tokio", + "tokio-rustls", + "tokio-stream", + "tower 0.4.13", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-build" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "prost-types", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "tower" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +dependencies = [ + "futures-core", + "futures-util", + "indexmap 1.9.3", + "pin-project", + "pin-project-lite", + "rand 0.8.6", + "slab", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower" version = "0.5.3" @@ -2677,7 +3096,7 @@ dependencies = [ "pin-project-lite", "tokio", "tokio-util", - "tower", + "tower 0.5.3", "tower-layer", "tower-service", "url", diff --git a/pyo3/src/session.rs b/pyo3/src/session.rs index 291c054b..2240b0fa 100644 --- a/pyo3/src/session.rs +++ b/pyo3/src/session.rs @@ -410,6 +410,7 @@ impl Session { telemetry_circuit_breaker_enabled=None, telemetry_circuit_breaker_threshold=None, telemetry_circuit_breaker_timeout_ms=None, + use_sea_grpc=false, ))] #[allow(clippy::too_many_arguments)] fn new( @@ -477,6 +478,7 @@ impl Session { telemetry_circuit_breaker_enabled: Option, telemetry_circuit_breaker_threshold: Option, telemetry_circuit_breaker_timeout_ms: Option, + use_sea_grpc: bool, ) -> PyResult { // Resolve auth_type. Explicit `auth_type` always wins. When // omitted, default to "pat" if `access_token` was passed @@ -654,6 +656,9 @@ impl Session { builder = builder.geospatial_result_representation(geospatial_result_representation( enable_geospatial_support, )); + if use_sea_grpc { + builder = builder.transport(databricks_sql_kernel::TransportMode::SeaGrpc); + } // Merge result-config knobs into one `ResultConfig` so two // toggles don't clobber each other when both are set. if complex_types_as_json || intervals_as_string { diff --git a/src/client/grpc.rs b/src/client/grpc.rs new file mode 100644 index 00000000..7bcf1001 --- /dev/null +++ b/src/client/grpc.rs @@ -0,0 +1,483 @@ +//! Low-level gRPC wire client for the kernel-scoped SEA API. + +use std::collections::HashMap; +use std::sync::Arc; + +use tonic::codegen::{http, Service}; +use tonic::metadata::{Ascii, MetadataKey, MetadataValue}; +use tonic::transport::{Channel, ClientTlsConfig, Endpoint}; +use tonic::{Code, Request, Status}; + +use crate::client::grpc_proto as proto; +use crate::client::http::DatabricksHttpClient; +use crate::kernel_error::{Error, Result}; +use crate::types::sea; + +const EXTERNAL_GRPC_PATH_PREFIX: &str = "/grpc/sql-exec-api"; + +#[derive(Clone)] +struct ExternalGrpcPath { + inner: S, +} + +impl Service> for ExternalGrpcPath +where + S: Service>, +{ + type Response = S::Response; + type Error = S::Error; + type Future = S::Future; + + fn poll_ready( + &mut self, + cx: &mut std::task::Context<'_>, + ) -> std::task::Poll> { + self.inner.poll_ready(cx) + } + + fn call(&mut self, mut request: http::Request) -> Self::Future { + let path = format!("{EXTERNAL_GRPC_PATH_PREFIX}{}", request.uri().path()); + let mut parts = request.uri().clone().into_parts(); + parts.path_and_query = Some( + path.parse() + .expect("fixed external gRPC prefix and generated RPC path form a valid URI"), + ); + *request.uri_mut() = http::Uri::from_parts(parts) + .expect("replacing only a valid URI's path preserves a valid URI"); + self.inner.call(request) + } +} + +#[derive(Clone)] +pub(crate) struct SeaGrpcClient { + client: proto::sql_execution_api_service_client::SqlExecutionApiServiceClient< + ExternalGrpcPath, + >, + http_client: Arc, + warehouse_id: String, +} + +impl std::fmt::Debug for SeaGrpcClient { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + f.debug_struct("SeaGrpcClient") + .field("warehouse_id", &self.warehouse_id) + .finish_non_exhaustive() + } +} + +impl SeaGrpcClient { + pub(crate) fn new( + host: &str, + warehouse_id: String, + http_client: Arc, + ) -> Result { + let endpoint = Endpoint::from_shared(host.trim_end_matches('/').to_string()) + .map_err(|e| Error::invalid_argument().message(format!("Invalid gRPC endpoint: {e}")))? + .connect_timeout(http_client.config().connect_timeout) + .timeout(http_client.config().read_timeout) + .user_agent(http_client.config().user_agent.clone()) + .map_err(|e| { + Error::invalid_argument().message(format!("Invalid gRPC user agent: {e}")) + })? + .tls_config(ClientTlsConfig::new().with_native_roots()) + .map_err(|e| { + Error::invalid_argument().message(format!("Invalid gRPC TLS configuration: {e}")) + })?; + Ok(Self { + client: proto::sql_execution_api_service_client::SqlExecutionApiServiceClient::new( + ExternalGrpcPath { + inner: endpoint.connect_lazy(), + }, + ), + http_client, + warehouse_id, + }) + } + + fn request(&self, message: T, extra_headers: &[(&str, &str)]) -> Result> { + let mut request = Request::new(message); + let metadata = request.metadata_mut(); + + insert_metadata(metadata, "authorization", &self.http_client.auth_header()?)?; + if let Some(org_id) = &self.http_client.config().org_id { + insert_metadata(metadata, "x-databricks-org-id", org_id)?; + } + for (name, value) in &self.http_client.config().custom_headers { + insert_metadata(metadata, name, value)?; + } + for (name, value) in self.http_client.auth_extra_headers()? { + insert_metadata(metadata, &name, &value)?; + } + for (name, value) in extra_headers { + insert_metadata(metadata, name, value)?; + } + Ok(request) + } + + pub(crate) async fn create_session( + &self, + catalog: Option<&str>, + schema: Option<&str>, + session_confs: HashMap, + ) -> Result { + let request = proto::CreateSessionRequestV2 { + warehouse_id: Some(self.warehouse_id.clone()), + catalog: catalog.map(str::to_owned), + schema: schema.map(str::to_owned), + session_confs, + execution_mode: Some(proto::SessionExecutionMode::Fast as i32), + }; + let mut client = self.client.clone(); + client + .create_session_v2(self.request(request, &[])?) + .await + .map(|r| r.into_inner()) + .map_err(map_status) + } + + pub(crate) async fn terminate_session(&self, session_id: &str) -> Result<()> { + let request = proto::TerminateSessionRequest { + session_id: Some(session_id.to_owned()), + warehouse_id: Some(self.warehouse_id.clone()), + }; + let mut client = self.client.clone(); + client + .terminate_session(self.request(request, &[])?) + .await + .map(|_| ()) + .map_err(map_status) + } + + pub(crate) async fn execute_statement( + &self, + session_id: &str, + session_version: Option, + sql: &str, + params: &sea::ExecuteParams, + cloudfetch_enabled: bool, + extra_headers: &[(&str, &str)], + ) -> Result { + let request = proto::ExecuteStatementRequest { + statement: Some(sql.to_owned()), + warehouse_id: Some(self.warehouse_id.clone()), + catalog: params.catalog.clone(), + schema: params.schema.clone(), + row_limit: params.row_limit, + format: Some(proto::Format::ArrowStream as i32), + disposition: Some(if cloudfetch_enabled { + proto::FetchDisposition::InlineOrExternalLinks as i32 + } else { + proto::FetchDisposition::Inline as i32 + }), + wait_timeout: params.wait_timeout.clone(), + on_wait_timeout: params + .on_wait_timeout + .as_deref() + .map(|v| if v == "CANCEL" { proto::TimeoutAction::Cancel } else { proto::TimeoutAction::Continue } as i32), + session_id: Some(session_id.to_owned()), + parameters: params.parameters.iter().map(|p| proto::StatementParameter { + ordinal: p.ordinal, + name: p.name.clone(), + value: p.value.clone(), + r#type: Some(p.param_type.clone()), + }).collect(), + result_compression: Some(proto::CompressionCodec::Lz4Frame as i32), + query_tags: params.query_tags.iter().map(|t| proto::QueryTag { + key: Some(t.key.clone()), + value: t.value.clone(), + }).collect(), + session_version: session_version.map(|version_id| proto::SessionVersion { version_id: Some(version_id) }), + }; + let mut client = self.client.clone(); + let response = client + .execute_statement(self.request(request, extra_headers)?) + .await + .map_err(map_status)? + .into_inner(); + statement_response(response) + } + + pub(crate) async fn get_statement_result( + &self, + statement_id: &str, + ) -> Result { + let request = proto::GetStatementResultRequest { + statement_id: Some(statement_id.to_owned()), + warehouse_id: Some(self.warehouse_id.clone()), + session_id: None, + }; + let mut client = self.client.clone(); + let response = client + .get_statement_result(self.request(request, &[])?) + .await + .map_err(map_status)? + .into_inner(); + statement_response(response) + } + + pub(crate) async fn get_result_data( + &self, + statement_id: &str, + chunk_index: i64, + row_offset: i64, + ) -> Result { + let chunk_index = i32::try_from(chunk_index).map_err(|_| { + Error::invalid_argument().message(format!("chunk index {chunk_index} exceeds i32")) + })?; + let request = proto::GetResultDataRequest { + statement_id: Some(statement_id.to_owned()), + chunk_index: Some(chunk_index), + row_offset: Some(row_offset), + warehouse_id: Some(self.warehouse_id.clone()), + session_id: None, + }; + let mut client = self.client.clone(); + let result = client + .get_result_data(self.request(request, &[])?) + .await + .map_err(map_status)? + .into_inner(); + chunks_response(result) + } + + pub(crate) async fn cancel_statement(&self, statement_id: &str) -> Result<()> { + let request = proto::CancelStatementRequest { + statement_id: Some(statement_id.to_owned()), + }; + let mut client = self.client.clone(); + client + .cancel_statement(self.request(request, &[])?) + .await + .map(|_| ()) + .map_err(map_status) + } + + pub(crate) async fn close_statement(&self, statement_id: &str) -> Result<()> { + let request = proto::CloseStatementRequest { + statement_id: Some(statement_id.to_owned()), + }; + let mut client = self.client.clone(); + client + .close_statement(self.request(request, &[])?) + .await + .map(|_| ()) + .map_err(map_status) + } +} + +fn insert_metadata( + metadata: &mut tonic::metadata::MetadataMap, + name: &str, + value: &str, +) -> Result<()> { + let key = + MetadataKey::::from_bytes(name.to_ascii_lowercase().as_bytes()).map_err(|e| { + Error::invalid_argument().message(format!("Invalid gRPC metadata name {name:?}: {e}")) + })?; + let value = MetadataValue::try_from(value).map_err(|e| { + Error::invalid_argument().message(format!("Invalid gRPC metadata value for {name:?}: {e}")) + })?; + metadata.insert(key, value); + Ok(()) +} + +fn map_status(status: Status) -> Error { + let message = format!("gRPC {}: {}", status.code(), status.message()); + match status.code() { + Code::Unauthenticated | Code::PermissionDenied => Error::unauthenticated().message(message), + Code::InvalidArgument | Code::FailedPrecondition | Code::OutOfRange => { + Error::invalid_argument().message(message) + } + Code::NotFound => Error::not_found().message(message), + Code::DeadlineExceeded => Error::timeout().message(message), + Code::Cancelled => Error::cancelled().message(message), + _ => Error::network_error().message(message), + } +} + +fn required(value: Option, field: &str) -> Result { + value.ok_or_else(|| { + Error::data_loss().message(format!("gRPC response missing required field {field}")) + }) +} + +fn statement_response( + response: proto::StatementResponse, +) -> Result { + Ok(sea::StatementExecutionResponse { + statement_id: response.statement_id.unwrap_or_default(), + status: statement_status(required(response.status, "status")?)?, + manifest: response.manifest.map(result_manifest).transpose()?, + result: response.result.map(result_data).transpose()?, + }) +} + +fn statement_status(status: proto::StatementStatus) -> Result { + let state = match required(status.state, "status.state")? { + x if x == proto::statement_status::State::Pending as i32 => sea::StatementState::Pending, + x if x == proto::statement_status::State::Running as i32 => sea::StatementState::Running, + x if x == proto::statement_status::State::Succeeded as i32 => { + sea::StatementState::Succeeded + } + x if x == proto::statement_status::State::Failed as i32 => sea::StatementState::Failed, + x if x == proto::statement_status::State::Canceled as i32 => sea::StatementState::Canceled, + x if x == proto::statement_status::State::Closed as i32 => sea::StatementState::Closed, + value => { + return Err(Error::data_loss().message(format!("Unknown gRPC statement state {value}"))) + } + }; + Ok(sea::StatementStatus { + state, + error: status.error.map(|e| sea::ServiceError { + error_code: e.error_code.map(service_error_code), + message: e.message, + sql_state: None, + }), + sql_state: status.sql_state, + session_version: status.session_version.map(|v| sea::SessionVersion { + version_id: v.version_id.unwrap_or_default(), + }), + num_modified_rows: None, + display_message: None, + diagnostic_info: None, + error_details_json: None, + }) +} + +fn service_error_code(value: i32) -> String { + proto::ErrorCode::try_from(value) + .map(|code| code.as_str_name().to_owned()) + .unwrap_or_else(|_| value.to_string()) +} + +fn result_manifest(manifest: proto::ResultManifest) -> Result { + let format = proto::Format::try_from(required(manifest.format, "manifest.format")?) + .map_err(|_| Error::data_loss().message("Unknown gRPC result format"))? + .as_str_name() + .to_owned(); + let schema = required(manifest.schema, "manifest.schema")?; + Ok(sea::ResultManifest { + format, + schema: sea::ResultSchema { + column_count: required(schema.column_count, "manifest.schema.column_count")?, + columns: schema + .columns + .into_iter() + .map(column_info) + .collect::>()?, + }, + arrow_schema: manifest.arrow_schema, + total_chunk_count: manifest.total_chunk_count.map(i64::from), + total_row_count: manifest.total_row_count, + total_byte_count: manifest.total_byte_count, + truncated: manifest.truncated.unwrap_or(false), + chunks: Some( + manifest + .chunks + .into_iter() + .map(chunk_info) + .collect::>()?, + ), + result_compression: manifest + .result_compression + .and_then(|v| proto::CompressionCodec::try_from(v).ok()) + .map(|v| v.as_str_name().to_owned()), + is_native_metadata_result: manifest.is_native_metadata_result, + }) +} + +fn column_info(column: proto::ColumnInfo) -> Result { + let type_name = + proto::ColumnTypeName::try_from(required(column.type_name, "column.type_name")?) + .map_err(|_| Error::data_loss().message("Unknown gRPC column type"))? + .as_str_name() + .to_owned(); + Ok(sea::ColumnInfo { + name: required(column.name, "column.name")?, + type_name, + type_text: required(column.type_text, "column.type_text")?, + position: required(column.position, "column.position")?, + type_precision: column.type_precision.map(i64::from), + type_scale: column.type_scale.map(i64::from), + type_interval_type: column.type_interval_type, + type_json: column.type_json, + }) +} + +fn chunk_info(info: proto::ChunkInfo) -> Result { + Ok(sea::ChunkInfo { + chunk_index: i64::from(required(info.chunk_index, "chunk.info.chunk_index")?), + row_offset: required(info.row_offset, "chunk.info.row_offset")?, + row_count: required(info.row_count, "chunk.info.row_count")?, + byte_count: info.byte_count, + }) +} + +fn result_data(result: proto::ResultData) -> Result { + let chunk = result.chunk; + let info = chunk.as_ref().and_then(|v| v.info.as_ref()); + Ok(sea::ResultData { + chunk_index: info.and_then(|v| v.chunk_index).map(i64::from), + row_offset: info.and_then(|v| v.row_offset), + row_count: info.and_then(|v| v.row_count), + byte_count: info.and_then(|v| v.byte_count), + next_chunk_index: info.and_then(|v| v.next_chunk_index).map(i64::from), + next_chunk_internal_link: info.and_then(|v| v.next_chunk_internal_link.clone()), + external_links: (!result.external_links.is_empty()) + .then(|| { + result + .external_links + .into_iter() + .map(external_link) + .collect::>>() + }) + .transpose()?, + data_array: None, + attachment: chunk.and_then(|v| v.attachment), + }) +} + +fn external_link(link: proto::ExternalLink) -> Result { + let info = required(link.info, "external_link.info")?; + Ok(sea::ExternalLink { + external_link: required(link.external_link, "external_link.external_link")?, + expiration: required(link.expiration, "external_link.expiration")?, + chunk_index: i64::from(required( + info.chunk_index, + "external_link.info.chunk_index", + )?), + row_offset: required(info.row_offset, "external_link.info.row_offset")?, + row_count: required(info.row_count, "external_link.info.row_count")?, + byte_count: info.byte_count.unwrap_or_default(), + http_headers: (!link.http_headers.is_empty()).then_some(link.http_headers), + next_chunk_index: info.next_chunk_index.map(i64::from), + }) +} + +fn chunks_response(result: proto::ResultData) -> Result { + let converted = result_data(result)?; + Ok(sea::GetChunksResponse { + statement_id: None, + chunk_index: converted.chunk_index, + row_offset: converted.row_offset, + row_count: converted.row_count, + next_chunk_index: converted.next_chunk_index, + external_links: converted.external_links, + attachment: converted.attachment, + }) +} + +#[cfg(test)] +mod tests { + use super::service_error_code; + + #[test] + fn service_error_code_uses_canonical_name() { + assert_eq!(service_error_code(4), "BAD_REQUEST"); + } + + #[test] + fn service_error_code_preserves_unknown_value() { + assert_eq!(service_error_code(123_456), "123456"); + } +} diff --git a/src/client/grpc_proto.rs b/src/client/grpc_proto.rs new file mode 100644 index 00000000..3df17eab --- /dev/null +++ b/src/client/grpc_proto.rs @@ -0,0 +1,3 @@ +//! Generated protobuf types for the kernel-scoped SEA gRPC API. + +tonic::include_proto!("databricks.sqlexecapi"); diff --git a/src/client/mod.rs b/src/client/mod.rs index e2f59a71..7e391353 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -31,6 +31,8 @@ //! [`transport`]: self::transport //! [`sea`]: self::sea +pub(crate) mod grpc; +pub(crate) mod grpc_proto; pub mod http; pub mod retry; pub mod sea; diff --git a/src/client/sea.rs b/src/client/sea.rs index 62b967cb..b39b1215 100644 --- a/src/client/sea.rs +++ b/src/client/sea.rs @@ -17,6 +17,7 @@ //! This module implements the `Transport` trait using the Databricks //! SQL Statement Execution API (REST-based). +use crate::client::grpc::SeaGrpcClient; use crate::client::retry::RequestType; use crate::client::{ ChunkLinkFetchResult, DatabricksHttpClient, DirectOutcome, ExecuteResponse, ExecuteResult, @@ -174,6 +175,7 @@ pub(crate) struct SeaRestTransport { session_version: AtomicI64, reader_factory: OnceLock, runtime_handle: OnceLock, + grpc_client: Option, } impl std::fmt::Debug for SeaRestTransport { @@ -215,9 +217,31 @@ impl SeaRestTransport { session_version: AtomicI64::new(NO_SESSION_VERSION), reader_factory: OnceLock::new(), runtime_handle: OnceLock::new(), + grpc_client: None, } } + pub fn new_grpc( + http_client: Arc, + host: impl Into, + warehouse_id: impl Into, + config: TransportConfig, + ) -> Result { + let host = host.into(); + let warehouse_id = warehouse_id.into(); + let grpc_client = SeaGrpcClient::new(&host, warehouse_id.clone(), http_client.clone())?; + Ok(Self { + http_client, + host, + warehouse_id, + config, + session_version: AtomicI64::new(NO_SESSION_VERSION), + reader_factory: OnceLock::new(), + runtime_handle: OnceLock::new(), + grpc_client: Some(grpc_client), + }) + } + /// Set the reader factory and runtime handle. Must be called once after wrapping in `Arc`. pub fn set_reader_factory( &self, @@ -348,6 +372,13 @@ impl SeaRestTransport { statement_id: &str, session_attribution: SessionAttribution, ) -> Result { + if let Some(grpc) = &self.grpc_client { + let sea_response = grpc.get_statement_result(statement_id).await?; + if session_attribution == SessionAttribution::Current { + self.observe_session_version(sea_response.status.session_version); + } + return Self::convert_response(sea_response); + } let url = format!("{}/statements/{}", self.base_url(), statement_id); debug!("Getting statement status at {}", url); @@ -611,6 +642,30 @@ impl SeaRestTransport { request_type: RequestType, metadata_operation: Option, ) -> Result { + if let Some(grpc) = &self.grpc_client { + let mut headers = Vec::new(); + if request_type == RequestType::ExecuteMetadataQuery { + headers.push((SEA_SYNC_METADATA_HEADER, "true")); + } + if let Some(operation) = metadata_operation { + headers.push((METADATA_OPERATION_HEADER, operation.header_value())); + if operation.supports_thrift_native() { + headers.push((REQUIRE_THRIFT_NATIVE_METADATA_HEADER, "true")); + } + } + let sea_response = grpc + .execute_statement( + session_id, + self.current_session_version().map(|v| v.version_id), + sql, + params, + self.config.cloudfetch_enabled, + &headers, + ) + .await?; + self.observe_session_version(sea_response.status.session_version); + return Self::convert_response(sea_response); + } let url = format!("{}/statements", self.base_url()); // Select the result disposition per statement from the @@ -1101,6 +1156,16 @@ impl Transport for SeaRestTransport { schema: Option<&str>, session_config: HashMap, ) -> Result { + if let Some(grpc) = &self.grpc_client { + let response = grpc.create_session(catalog, schema, session_config).await?; + let session_id = response.session_id.ok_or_else(|| { + Error::data_loss().message("gRPC CreateSession response missing session_id") + })?; + self.observe_session_version(response.session_version.map(|v| SessionVersion { + version_id: v.version_id.unwrap_or_default(), + })); + return Ok(SessionInfo { session_id }); + } let url = format!("{}/sessions", self.base_url()); let request_body = CreateSessionRequest { @@ -1149,6 +1214,12 @@ impl Transport for SeaRestTransport { } async fn delete_session(&self, session_id: &str) -> Result<()> { + if let Some(grpc) = &self.grpc_client { + if let Err(e) = grpc.terminate_session(session_id).await { + crate::klog::warn!(session_id = %session_id, error = %e, "terminate_session failed; server-side session will be reclaimed by idle timeout"); + } + return Ok(()); + } // SEA requires `warehouse_id` as a query parameter on // `DELETE /api/2.0/sql/sessions/{id}`. Without it the server // returns HTTP 400 ("Required field is not specified: @@ -1354,6 +1425,12 @@ impl Transport for SeaRestTransport { chunk_index: i64, row_offset: i64, ) -> Result { + if let Some(grpc) = &self.grpc_client { + let chunks_response = grpc + .get_result_data(statement_id, chunk_index, row_offset) + .await?; + return derive_chunk_fetch_result(chunks_response); + } let url = self.result_chunks_url(statement_id, chunk_index, row_offset); debug!("Getting result chunks at {}", url); @@ -1399,6 +1476,30 @@ impl Transport for SeaRestTransport { chunk_index: i64, row_offset: i64, ) -> Result { + if let Some(grpc) = &self.grpc_client { + let chunks_response = grpc + .get_result_data(statement_id, chunk_index, row_offset.max(0)) + .await?; + let bytes = chunks_response.attachment.ok_or_else(|| { + Error::data_loss().message(format!( + "gRPC inline chunk {chunk_index} response missing attachment" + )) + })?; + let chunk_index = chunks_response.chunk_index.unwrap_or(chunk_index); + let row_offset = chunks_response.row_offset.unwrap_or(row_offset.max(0)); + let row_count = chunks_response.row_count.ok_or_else(|| { + Error::data_loss().message(format!( + "gRPC inline chunk {chunk_index} response missing row_count" + )) + })?; + return Ok(InlineChunkFetchResult { + bytes, + chunk_index, + row_offset, + row_count, + next_chunk_index: chunks_response.next_chunk_index, + }); + } // Same endpoint as CloudFetch chunk-link fetching, but on // the inline-Arrow path the response carries Arrow IPC bytes // in `attachment` instead of `external_links`. `row_offset` @@ -1519,6 +1620,9 @@ impl Transport for SeaRestTransport { } async fn cancel_statement(&self, statement_id: &str) -> Result<()> { + if let Some(grpc) = &self.grpc_client { + return grpc.cancel_statement(statement_id).await; + } let url = format!("{}/statements/{}/cancel", self.base_url(), statement_id); debug!("Canceling statement at {}", url); @@ -1542,6 +1646,9 @@ impl Transport for SeaRestTransport { } async fn close_statement(&self, statement_id: &str) -> Result<()> { + if let Some(grpc) = &self.grpc_client { + return grpc.close_statement(statement_id).await; + } let url = format!("{}/statements/{}", self.base_url(), statement_id); debug!("Closing statement at {}", url); diff --git a/src/config.rs b/src/config.rs index b889f052..45df0c1c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1509,6 +1509,8 @@ pub enum TransportMode { /// Statement Execution API over REST. Default. #[default] SeaRest, + /// Statement Execution API over gRPC. + SeaGrpc, } // ─── Client-side result representation ───────────────────────────────────── diff --git a/src/session.rs b/src/session.rs index 8a8ae6f0..63ed75be 100644 --- a/src/session.rs +++ b/src/session.rs @@ -395,12 +395,20 @@ impl Session { cloudfetch_enabled: config.result.cloudfetch_enabled, ..TransportConfig::default() }; - let sea = Arc::new(SeaRestTransport::new( - http_client.clone(), - host.clone(), - warehouse_id.clone(), - transport_config, - )); + let sea = Arc::new(match config.transport.unwrap_or_default() { + TransportMode::SeaRest => SeaRestTransport::new( + http_client.clone(), + host.clone(), + warehouse_id.clone(), + transport_config, + ), + TransportMode::SeaGrpc => SeaRestTransport::new_grpc( + http_client.clone(), + host.clone(), + warehouse_id.clone(), + transport_config, + )?, + }); let reader_factory = ResultReaderFactory::new( sea.clone() as Arc, http_client.clone(), From 840ad20402e127bb415d966d0bec4aaebed0364c Mon Sep 17 00:00:00 2001 From: Rahul Singhal Date: Tue, 20 Oct 2026 21:39:26 +0000 Subject: [PATCH 2/4] chore(sea): sync generated driver proto Signed-off-by: Rahul Singhal --- proto/sea_driver_kernel.proto | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/proto/sea_driver_kernel.proto b/proto/sea_driver_kernel.proto index ddcf89c1..36781f08 100644 --- a/proto/sea_driver_kernel.proto +++ b/proto/sea_driver_kernel.proto @@ -1,14 +1,5 @@ -// @generated by //cmdexec/sql-exec-api/proto:generate_driver_kernel_proto. -// DO NOT EDIT MANUALLY. Regenerate in Universe, then copy this file unchanged to drivers. -// -// Canonical source: cmdexec/sql-exec-api/proto/sql_exec_api_service.proto -// Selection: DRIVER_KERNEL -// Canonical descriptor SHA-256: 4328711f8376e7e9a7ae0b9f9dc609b6eed6c23c91a97c6425740d0673bd5200 -// Generated wire descriptor SHA-256: 0b058ecfc5db474c2da1c51e51667bfc3faac272bb43ae0f15d445bc2deab4a1 -// -// This client-only schema omits Databricks-internal annotations and unselected API surface. -// Retained field and enum numbers match the canonical SEA schema and must not be reassigned. -syntax = "proto3"; +// Generated file. Do not edit. +syntax = "proto2"; package databricks.sqlexecapi; @@ -70,7 +61,7 @@ message StatementStatus { CLOSED = 6; } - optional StatementStatus.State state = 1; + optional State state = 1; optional ServiceError error = 2; optional string sql_state = 3; optional SessionVersion session_version = 4; From 6c5797f31d147b69c1b848941b297ef7aa52dbc7 Mon Sep 17 00:00:00 2001 From: Rahul Singhal Date: Tue, 20 Oct 2026 21:50:49 +0000 Subject: [PATCH 3/4] chore(sea): upgrade tonic to 0.14 Signed-off-by: Rahul Singhal --- Cargo.lock | 258 +++++++++++++++------------------------ Cargo.toml | 7 +- build.rs | 2 +- napi/Cargo.lock | 312 ++++++++++++++++++++++++++++++++++++++++++++++++ pyo3/Cargo.lock | 265 +++++++++++++++------------------------- 5 files changed, 507 insertions(+), 337 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 25d13849..5d68f6de 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -264,28 +264,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-stream" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.118", -] - [[package]] name = "async-trait" version = "0.1.92" @@ -318,53 +296,6 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" -[[package]] -name = "axum" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" -dependencies = [ - "async-trait", - "axum-core", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper", - "tower 0.5.3", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper", - "tower-layer", - "tower-service", -] - [[package]] name = "base16ct" version = "0.2.0" @@ -780,7 +711,8 @@ dependencies = [ "tokio-rustls", "tokio-util", "tonic", - "tonic-build", + "tonic-prost", + "tonic-prost-build", "tracing", "tracing-subscriber", "wiremock", @@ -1024,6 +956,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -1230,7 +1168,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.14.0", + "indexmap", "slab", "tokio", "tokio-util", @@ -1251,15 +1189,18 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] [[package]] name = "hashbrown" @@ -1443,7 +1384,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.4", + "socket2", "tokio", "tower-service", "tracing", @@ -1576,16 +1517,6 @@ dependencies = [ "icu_properties", ] -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.14.0" @@ -1820,24 +1751,12 @@ dependencies = [ "regex-automata", ] -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - [[package]] name = "memchr" version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - [[package]] name = "minimal-lexical" version = "0.2.1" @@ -2211,12 +2130,13 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "petgraph" -version = "0.7.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ "fixedbitset", - "indexmap 2.14.0", + "hashbrown 0.15.5", + "indexmap", ] [[package]] @@ -2358,9 +2278,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.5" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +checksum = "528ac67416ff8646872a3c02cad9cc4ee5dc9f9540c9b10771855c95cb2e5ae1" dependencies = [ "bytes", "prost-derive", @@ -2368,19 +2288,20 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.5" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" +checksum = "03da047801ff44bb6a4d407d4860c05fd70bb81714e6b2f3812603d5b145b042" dependencies = [ "heck", "itertools", "log", "multimap", - "once_cell", "petgraph", "prettyplease", "prost", "prost-types", + "pulldown-cmark", + "pulldown-cmark-to-cmark", "regex", "syn 2.0.118", "tempfile", @@ -2388,9 +2309,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.5" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +checksum = "b570b25f7617e43d59005d0990ccb79e950a423952cea19671b7a876da390adf" dependencies = [ "anyhow", "itertools", @@ -2401,13 +2322,33 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.13.5" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" +checksum = "f94967dc7688f3054c7fac87473ffae4cc4c3904800e2d9f5b857246d8963b0a" dependencies = [ "prost", ] +[[package]] +name = "pulldown-cmark" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e" +dependencies = [ + "bitflags", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "22.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84bbb29c624230c4bd1047bbdb2aa47e41c860e9665ce62ba9504eebe91bf867" +dependencies = [ + "pulldown-cmark", +] + [[package]] name = "quinn" version = "0.11.11" @@ -2421,7 +2362,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.6.4", + "socket2", "thiserror 2.0.19", "tokio", "tracing", @@ -2459,7 +2400,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.4", + "socket2", "tracing", "windows-sys 0.61.2", ] @@ -2638,7 +2579,7 @@ dependencies = [ "tokio-native-tls", "tokio-rustls", "tokio-util", - "tower 0.5.3", + "tower", "tower-http", "tower-service", "url", @@ -2757,15 +2698,6 @@ dependencies = [ "security-framework", ] -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" version = "1.15.0" @@ -3030,16 +2962,6 @@ version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.4" @@ -3264,7 +3186,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.4", + "socket2", "tokio-macros", "windows-sys 0.61.2", ] @@ -3340,7 +3262,7 @@ version = "0.25.15+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1340ea94a5856333492c9064b02c778b191dd2c853778d9609debdcdfea3a614" dependencies = [ - "indexmap 2.14.0", + "indexmap", "toml_datetime", "toml_parser", "winnow", @@ -3357,16 +3279,13 @@ dependencies = [ [[package]] name = "tonic" -version = "0.12.3" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" dependencies = [ - "async-stream", "async-trait", - "axum", "base64", "bytes", - "h2", "http", "http-body", "http-body-util", @@ -3375,14 +3294,12 @@ dependencies = [ "hyper-util", "percent-encoding", "pin-project", - "prost", "rustls-native-certs", - "rustls-pemfile", - "socket2 0.5.10", + "sync_wrapper", "tokio", "tokio-rustls", "tokio-stream", - "tower 0.4.13", + "tower", "tower-layer", "tower-service", "tracing", @@ -3390,36 +3307,41 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.12.3" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" +checksum = "c68f61875ac5293cf72e6c8cf0158086428c82c37229e98c840878f1706b0322" dependencies = [ "prettyplease", "proc-macro2", - "prost-build", - "prost-types", "quote", "syn 2.0.118", ] [[package]] -name = "tower" -version = "0.4.13" +name = "tonic-prost" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "50849f68853be452acf590cde0b146665b8d507b3b8af17261df47e02c209ea0" dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand 0.8.6", - "slab", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "tracing", + "bytes", + "prost", + "tonic", +] + +[[package]] +name = "tonic-prost-build" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "654e5643eff75d7f8c99197ce1440ed19a3474eada74c12bbac488b2cafdae27" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "prost-types", + "quote", + "syn 2.0.118", + "tempfile", + "tonic-build", ] [[package]] @@ -3430,11 +3352,15 @@ checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", + "indexmap", "pin-project-lite", + "slab", "sync_wrapper", "tokio", + "tokio-util", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -3454,7 +3380,7 @@ dependencies = [ "pin-project-lite", "tokio", "tokio-util", - "tower 0.5.3", + "tower", "tower-layer", "tower-service", "url", @@ -3552,6 +3478,12 @@ version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" +[[package]] +name = "unicase" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" + [[package]] name = "unicode-ident" version = "1.0.24" diff --git a/Cargo.toml b/Cargo.toml index 9555cbcc..4d17aec2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,8 +60,9 @@ arrow-ipc = "59" # module load time and segfaults the process before any Rust code runs. # `rustls` is pure Rust + ring and avoids the conflict entirely. reqwest = { version = "0.12", default-features = false, features = ["json", "gzip", "stream"] } -prost = "0.13" -tonic = { version = "0.12", default-features = false, features = ["codegen", "prost", "transport", "tls-native-roots"] } +prost = "0.14" +tonic = { version = "0.14", default-features = false, features = ["codegen", "tls-native-roots"] } +tonic-prost = "0.14" tokio = { version = "1", features = ["full", "sync"] } # Serialization @@ -215,7 +216,7 @@ name = "databricks_sql_kernel" crate-type = ["lib", "cdylib", "staticlib"] [build-dependencies] -tonic-build = "0.12" +tonic-prost-build = "0.14" # Workspace — the kernel is its own single-member workspace root. # diff --git a/build.rs b/build.rs index c404a704..5e4cb8b6 100644 --- a/build.rs +++ b/build.rs @@ -2,7 +2,7 @@ fn main() -> Result<(), Box> { let proto = "proto/sea_driver_kernel.proto"; println!("cargo:rerun-if-changed={proto}"); - tonic_build::configure() + tonic_prost_build::configure() .build_server(false) .type_attribute( "databricks.sqlexecapi.ColumnTypeName", diff --git a/napi/Cargo.lock b/napi/Cargo.lock index 68f51af2..8bab46ea 100644 --- a/napi/Cargo.lock +++ b/napi/Cargo.lock @@ -63,6 +63,12 @@ dependencies = [ "libc", ] +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + [[package]] name = "approx" version = "0.5.1" @@ -631,6 +637,7 @@ dependencies = [ "open", "pbkdf2 0.13.0", "pkcs8", + "prost", "rand 0.10.2", "reqwest", "serde", @@ -639,6 +646,9 @@ dependencies = [ "thiserror 2.0.19", "tokio", "tokio-util", + "tonic", + "tonic-prost", + "tonic-prost-build", "tracing", "tracing-subscriber", "wkb", @@ -757,6 +767,12 @@ dependencies = [ "syn 2.0.118", ] +[[package]] +name = "either" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" + [[package]] name = "equivalent" version = "1.0.2" @@ -793,12 +809,24 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + [[package]] name = "find-msvc-tools" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + [[package]] name = "flatbuffers" version = "25.12.19" @@ -825,6 +853,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -1029,12 +1063,27 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + [[package]] name = "hashbrown" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.5.2" @@ -1159,6 +1208,19 @@ dependencies = [ "webpki-roots", ] +[[package]] +name = "hyper-timeout" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" +dependencies = [ + "hyper", + "hyper-util", + "pin-project-lite", + "tokio", + "tower-service", +] + [[package]] name = "hyper-util" version = "0.1.20" @@ -1364,6 +1426,15 @@ dependencies = [ "once_cell", ] +[[package]] +name = "itertools" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.18" @@ -1490,6 +1561,12 @@ dependencies = [ "libc", ] +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + [[package]] name = "litemap" version = "0.8.2" @@ -1582,6 +1659,12 @@ dependencies = [ "uuid", ] +[[package]] +name = "multimap" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" + [[package]] name = "napi" version = "3.11.0" @@ -1853,6 +1936,37 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" +[[package]] +name = "petgraph" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" +dependencies = [ + "fixedbitset", + "hashbrown 0.15.5", + "indexmap", +] + +[[package]] +name = "pin-project" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.118", +] + [[package]] name = "pin-project-lite" version = "0.2.17" @@ -1916,6 +2030,16 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.118", +] + [[package]] name = "proc-macro-crate" version = "3.5.0" @@ -1934,6 +2058,79 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prost" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "528ac67416ff8646872a3c02cad9cc4ee5dc9f9540c9b10771855c95cb2e5ae1" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03da047801ff44bb6a4d407d4860c05fd70bb81714e6b2f3812603d5b145b042" +dependencies = [ + "heck", + "itertools", + "log", + "multimap", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "pulldown-cmark", + "pulldown-cmark-to-cmark", + "regex", + "syn 2.0.118", + "tempfile", +] + +[[package]] +name = "prost-derive" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b570b25f7617e43d59005d0990ccb79e950a423952cea19671b7a876da390adf" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "prost-types" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f94967dc7688f3054c7fac87473ffae4cc4c3904800e2d9f5b857246d8963b0a" +dependencies = [ + "prost", +] + +[[package]] +name = "pulldown-cmark" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e" +dependencies = [ + "bitflags", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "22.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84bbb29c624230c4bd1047bbdb2aa47e41c860e9665ce62ba9504eebe91bf867" +dependencies = [ + "pulldown-cmark", +] + [[package]] name = "quinn" version = "0.11.11" @@ -2187,12 +2384,26 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.61.2", +] + [[package]] name = "rustls" version = "0.23.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634" dependencies = [ + "log", "once_cell", "ring", "rustls-pki-types", @@ -2533,6 +2744,19 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.3", + "once_cell", + "rustix", + "windows-sys 0.61.2", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -2684,6 +2908,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-stream" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3d06f0b082ba57c26b79407372e57cf2a1e28124f78e9479fe80322cf53420b" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-util" version = "0.7.18" @@ -2727,6 +2962,73 @@ dependencies = [ "winnow", ] +[[package]] +name = "tonic" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" +dependencies = [ + "async-trait", + "base64", + "bytes", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-timeout", + "hyper-util", + "percent-encoding", + "pin-project", + "rustls-native-certs", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-stream", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "tonic-build" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68f61875ac5293cf72e6c8cf0158086428c82c37229e98c840878f1706b0322" +dependencies = [ + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "tonic-prost" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50849f68853be452acf590cde0b146665b8d507b3b8af17261df47e02c209ea0" +dependencies = [ + "bytes", + "prost", + "tonic", +] + +[[package]] +name = "tonic-prost-build" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "654e5643eff75d7f8c99197ce1440ed19a3474eada74c12bbac488b2cafdae27" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "prost-types", + "quote", + "syn 2.0.118", + "tempfile", + "tonic-build", +] + [[package]] name = "tower" version = "0.5.3" @@ -2735,11 +3037,15 @@ checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", + "indexmap", "pin-project-lite", + "slab", "sync_wrapper", "tokio", + "tokio-util", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -2857,6 +3163,12 @@ version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" +[[package]] +name = "unicase" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" + [[package]] name = "unicode-ident" version = "1.0.24" diff --git a/pyo3/Cargo.lock b/pyo3/Cargo.lock index fc5c253d..29f64884 100644 --- a/pyo3/Cargo.lock +++ b/pyo3/Cargo.lock @@ -236,28 +236,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-stream" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.118", -] - [[package]] name = "async-trait" version = "0.1.89" @@ -290,53 +268,6 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" -[[package]] -name = "axum" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" -dependencies = [ - "async-trait", - "axum-core", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "sync_wrapper", - "tower 0.5.3", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "rustversion", - "sync_wrapper", - "tower-layer", - "tower-service", -] - [[package]] name = "base64" version = "0.22.1" @@ -712,7 +643,8 @@ dependencies = [ "tokio", "tokio-util", "tonic", - "tonic-build", + "tonic-prost", + "tonic-prost-build", "tracing", "tracing-subscriber", "wkb", @@ -894,6 +826,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "form_urlencoded" version = "1.2.2" @@ -1073,7 +1011,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.14.0", + "indexmap", "slab", "tokio", "tokio-util", @@ -1094,15 +1032,18 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.12.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] [[package]] name = "hashbrown" @@ -1179,12 +1120,6 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - [[package]] name = "hybrid-array" version = "0.4.13" @@ -1209,7 +1144,6 @@ dependencies = [ "http", "http-body", "httparse", - "httpdate", "itoa", "pin-project-lite", "smallvec", @@ -1264,7 +1198,7 @@ dependencies = [ "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.4", + "socket2", "tokio", "tower-service", "tracing", @@ -1397,16 +1331,6 @@ dependencies = [ "icu_properties", ] -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.14.0" @@ -1638,24 +1562,12 @@ dependencies = [ "regex-automata", ] -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - [[package]] name = "memchr" version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - [[package]] name = "miniz_oxide" version = "0.8.9" @@ -1902,12 +1814,13 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "petgraph" -version = "0.7.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3672b37090dbd86368a4145bc067582552b29c27377cad4e0a306c97f9bd7772" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ "fixedbitset", - "indexmap 2.14.0", + "hashbrown 0.15.5", + "indexmap", ] [[package]] @@ -2023,9 +1936,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.13.5" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" +checksum = "528ac67416ff8646872a3c02cad9cc4ee5dc9f9540c9b10771855c95cb2e5ae1" dependencies = [ "bytes", "prost-derive", @@ -2033,19 +1946,20 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.13.5" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" +checksum = "03da047801ff44bb6a4d407d4860c05fd70bb81714e6b2f3812603d5b145b042" dependencies = [ "heck", "itertools", "log", "multimap", - "once_cell", "petgraph", "prettyplease", "prost", "prost-types", + "pulldown-cmark", + "pulldown-cmark-to-cmark", "regex", "syn 2.0.118", "tempfile", @@ -2053,9 +1967,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.13.5" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" +checksum = "b570b25f7617e43d59005d0990ccb79e950a423952cea19671b7a876da390adf" dependencies = [ "anyhow", "itertools", @@ -2066,13 +1980,33 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.13.5" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" +checksum = "f94967dc7688f3054c7fac87473ffae4cc4c3904800e2d9f5b857246d8963b0a" dependencies = [ "prost", ] +[[package]] +name = "pulldown-cmark" +version = "0.13.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e" +dependencies = [ + "bitflags", + "memchr", + "unicase", +] + +[[package]] +name = "pulldown-cmark-to-cmark" +version = "22.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84bbb29c624230c4bd1047bbdb2aa47e41c860e9665ce62ba9504eebe91bf867" +dependencies = [ + "pulldown-cmark", +] + [[package]] name = "pyo3" version = "0.29.0" @@ -2154,7 +2088,7 @@ dependencies = [ "quinn-udp", "rustc-hash", "rustls", - "socket2 0.6.4", + "socket2", "thiserror 2.0.19", "tokio", "tracing", @@ -2192,7 +2126,7 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.4", + "socket2", "tracing", "windows-sys 0.61.2", ] @@ -2354,7 +2288,7 @@ dependencies = [ "tokio", "tokio-rustls", "tokio-util", - "tower 0.5.3", + "tower", "tower-http", "tower-service", "url", @@ -2434,15 +2368,6 @@ dependencies = [ "security-framework", ] -[[package]] -name = "rustls-pemfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "rustls-pki-types" version = "1.15.0" @@ -2683,16 +2608,6 @@ version = "1.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90" -[[package]] -name = "socket2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "socket2" version = "0.6.4" @@ -2917,7 +2832,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.4", + "socket2", "tokio-macros", "windows-sys 0.61.2", ] @@ -2982,7 +2897,7 @@ version = "0.25.15+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1340ea94a5856333492c9064b02c778b191dd2c853778d9609debdcdfea3a614" dependencies = [ - "indexmap 2.14.0", + "indexmap", "toml_datetime", "toml_parser", "winnow", @@ -2999,16 +2914,13 @@ dependencies = [ [[package]] name = "tonic" -version = "0.12.3" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" +checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" dependencies = [ - "async-stream", "async-trait", - "axum", "base64", "bytes", - "h2", "http", "http-body", "http-body-util", @@ -3017,14 +2929,12 @@ dependencies = [ "hyper-util", "percent-encoding", "pin-project", - "prost", "rustls-native-certs", - "rustls-pemfile", - "socket2 0.5.10", + "sync_wrapper", "tokio", "tokio-rustls", "tokio-stream", - "tower 0.4.13", + "tower", "tower-layer", "tower-service", "tracing", @@ -3032,36 +2942,41 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.12.3" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" +checksum = "c68f61875ac5293cf72e6c8cf0158086428c82c37229e98c840878f1706b0322" dependencies = [ "prettyplease", "proc-macro2", - "prost-build", - "prost-types", "quote", "syn 2.0.118", ] [[package]] -name = "tower" -version = "0.4.13" +name = "tonic-prost" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "50849f68853be452acf590cde0b146665b8d507b3b8af17261df47e02c209ea0" dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand 0.8.6", - "slab", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "tracing", + "bytes", + "prost", + "tonic", +] + +[[package]] +name = "tonic-prost-build" +version = "0.14.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "654e5643eff75d7f8c99197ce1440ed19a3474eada74c12bbac488b2cafdae27" +dependencies = [ + "prettyplease", + "proc-macro2", + "prost-build", + "prost-types", + "quote", + "syn 2.0.118", + "tempfile", + "tonic-build", ] [[package]] @@ -3072,11 +2987,15 @@ checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", + "indexmap", "pin-project-lite", + "slab", "sync_wrapper", "tokio", + "tokio-util", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -3096,7 +3015,7 @@ dependencies = [ "pin-project-lite", "tokio", "tokio-util", - "tower 0.5.3", + "tower", "tower-layer", "tower-service", "url", @@ -3194,6 +3113,12 @@ version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" +[[package]] +name = "unicase" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" + [[package]] name = "unicode-ident" version = "1.0.24" From 5182008c6a62830c3cc31e5167c0d3c71f435797 Mon Sep 17 00:00:00 2001 From: Rahul Singhal Date: Tue, 20 Oct 2026 21:53:57 +0000 Subject: [PATCH 4/4] chore(sea): trim tonic build features Signed-off-by: Rahul Singhal --- Cargo.lock | 28 ---------------------------- Cargo.toml | 2 +- napi/Cargo.lock | 28 ---------------------------- pyo3/Cargo.lock | 28 ---------------------------- 4 files changed, 1 insertion(+), 85 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5d68f6de..a7a10be9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2300,8 +2300,6 @@ dependencies = [ "prettyplease", "prost", "prost-types", - "pulldown-cmark", - "pulldown-cmark-to-cmark", "regex", "syn 2.0.118", "tempfile", @@ -2329,26 +2327,6 @@ dependencies = [ "prost", ] -[[package]] -name = "pulldown-cmark" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e" -dependencies = [ - "bitflags", - "memchr", - "unicase", -] - -[[package]] -name = "pulldown-cmark-to-cmark" -version = "22.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84bbb29c624230c4bd1047bbdb2aa47e41c860e9665ce62ba9504eebe91bf867" -dependencies = [ - "pulldown-cmark", -] - [[package]] name = "quinn" version = "0.11.11" @@ -3478,12 +3456,6 @@ version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" -[[package]] -name = "unicase" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" - [[package]] name = "unicode-ident" version = "1.0.24" diff --git a/Cargo.toml b/Cargo.toml index 4d17aec2..7de1c827 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -216,7 +216,7 @@ name = "databricks_sql_kernel" crate-type = ["lib", "cdylib", "staticlib"] [build-dependencies] -tonic-prost-build = "0.14" +tonic-prost-build = { version = "0.14", default-features = false, features = ["transport"] } # Workspace — the kernel is its own single-member workspace root. # diff --git a/napi/Cargo.lock b/napi/Cargo.lock index 8bab46ea..dd024f06 100644 --- a/napi/Cargo.lock +++ b/napi/Cargo.lock @@ -2082,8 +2082,6 @@ dependencies = [ "prettyplease", "prost", "prost-types", - "pulldown-cmark", - "pulldown-cmark-to-cmark", "regex", "syn 2.0.118", "tempfile", @@ -2111,26 +2109,6 @@ dependencies = [ "prost", ] -[[package]] -name = "pulldown-cmark" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e" -dependencies = [ - "bitflags", - "memchr", - "unicase", -] - -[[package]] -name = "pulldown-cmark-to-cmark" -version = "22.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84bbb29c624230c4bd1047bbdb2aa47e41c860e9665ce62ba9504eebe91bf867" -dependencies = [ - "pulldown-cmark", -] - [[package]] name = "quinn" version = "0.11.11" @@ -3163,12 +3141,6 @@ version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" -[[package]] -name = "unicase" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" - [[package]] name = "unicode-ident" version = "1.0.24" diff --git a/pyo3/Cargo.lock b/pyo3/Cargo.lock index 29f64884..c5eba871 100644 --- a/pyo3/Cargo.lock +++ b/pyo3/Cargo.lock @@ -1958,8 +1958,6 @@ dependencies = [ "prettyplease", "prost", "prost-types", - "pulldown-cmark", - "pulldown-cmark-to-cmark", "regex", "syn 2.0.118", "tempfile", @@ -1987,26 +1985,6 @@ dependencies = [ "prost", ] -[[package]] -name = "pulldown-cmark" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9f068eba8e7071c5f9511831b44f32c740d5adf574e990f946ddb53db2f314e" -dependencies = [ - "bitflags", - "memchr", - "unicase", -] - -[[package]] -name = "pulldown-cmark-to-cmark" -version = "22.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84bbb29c624230c4bd1047bbdb2aa47e41c860e9665ce62ba9504eebe91bf867" -dependencies = [ - "pulldown-cmark", -] - [[package]] name = "pyo3" version = "0.29.0" @@ -3113,12 +3091,6 @@ version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" -[[package]] -name = "unicase" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357cc3acc6a036009fd6c973ed009037c732d60d0b4f6c673e9041497482a28f" - [[package]] name = "unicode-ident" version = "1.0.24"