@ondeinference / ed / commits / a87e191

build(watchos): use native-tls for reqwest so arm64_32 builds

reqwest 0.13's rustls feature pulls in aws-lc-sys, whose C code fails on arm64_32 because it assumes 64-bit limbs on aarch64. ring fails there too, on its pointer-size asserts. On watchOS, ed-acp and ed-onde-account now use reqwest's native-tls (Security.framework) and ed-mcp uses rmcp's reqwest-native-tls, so no rustls crypto provider is built. Other platforms keep rustls with aws-lc. The workspace reqwest dependency no longer picks a TLS backend; each crate chooses one per target. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

Seto Elkahfi committed Oct 16, 2026 at 23:38 UTC a87e191a78a03ef57780d94f5ec5bc2f46c6af66
5 files changed +137 -7
Cargo.lock
+107 -3
@@ -1299,7 +1299,7 @@ dependencies = [
1299 "bitflags 2.13.2",
1300 "core-foundation 0.10.1",
1301 "core-graphics-types 0.2.0",
1302 - "foreign-types",
1302 + "foreign-types 0.5.0",
1303 "libc",
1304 ]
1305
@@ -2445,6 +2445,15 @@ version = "0.2.0"
2445 source = "registry+https://github.com/rust-lang/crates.io-index"
2446 checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
2447
2448 +[[package]]
2449 +name = "foreign-types"
2450 +version = "0.3.2"
2451 +source = "registry+https://github.com/rust-lang/crates.io-index"
2452 +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
2453 +dependencies = [
2454 + "foreign-types-shared 0.1.1",
2455 +]
2456 +
2457 [[package]]
2458 name = "foreign-types"
2459 version = "0.5.0"
@@ -2452,7 +2461,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2461 checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"
2462 dependencies = [
2463 "foreign-types-macros",
2455 - "foreign-types-shared",
2464 + "foreign-types-shared 0.3.1",
2465 ]
2466
2467 [[package]]
@@ -2466,6 +2475,12 @@ dependencies = [
2475 "syn 3.0.6",
2476 ]
2477
2478 +[[package]]
2479 +name = "foreign-types-shared"
2480 +version = "0.1.1"
2481 +source = "registry+https://github.com/rust-lang/crates.io-index"
2482 +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
2483 +
2484 [[package]]
2485 name = "foreign-types-shared"
2486 version = "0.3.1"
@@ -3499,6 +3514,22 @@ dependencies = [
3514 "webpki-roots 1.0.9",
3515 ]
3516
3517 +[[package]]
3518 +name = "hyper-tls"
3519 +version = "0.6.0"
3520 +source = "registry+https://github.com/rust-lang/crates.io-index"
3521 +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
3522 +dependencies = [
3523 + "bytes",
3524 + "http-body-util",
3525 + "hyper",
3526 + "hyper-util",
3527 + "native-tls",
3528 + "tokio",
3529 + "tokio-native-tls",
3530 + "tower-service",
3531 +]
3532 +
3533 [[package]]
3534 name = "hyper-util"
3535 version = "0.1.21"
@@ -4436,7 +4467,7 @@ dependencies = [
4467 "bitflags 2.13.2",
4468 "block",
4469 "core-graphics-types 0.1.3",
4439 - "foreign-types",
4470 + "foreign-types 0.5.0",
4471 "log",
4472 "objc",
4473 "paste",
@@ -4593,6 +4624,23 @@ dependencies = [
4624 "typenum",
4625 ]
4626
4627 +[[package]]
4628 +name = "native-tls"
4629 +version = "0.2.18"
4630 +source = "registry+https://github.com/rust-lang/crates.io-index"
4631 +checksum = "465500e14ea162429d264d44189adc38b199b62b1c21eea9f69e4b73cb03bbf2"
4632 +dependencies = [
4633 + "libc",
4634 + "log",
4635 + "openssl",
4636 + "openssl-probe",
4637 + "openssl-sys",
4638 + "schannel",
4639 + "security-framework",
4640 + "security-framework-sys",
4641 + "tempfile",
4642 +]
4643 +
4644 [[package]]
4645 name = "ndk"
4646 version = "0.9.0"
@@ -5515,12 +5563,49 @@ dependencies = [
5563 "thiserror 2.0.21",
5564 ]
5565
5566 +[[package]]
5567 +name = "openssl"
5568 +version = "0.10.81"
5569 +source = "registry+https://github.com/rust-lang/crates.io-index"
5570 +checksum = "77823a27f0babb03091cb9ed9ef80af3b39dbc82f97e8fa530374b7dafd87a45"
5571 +dependencies = [
5572 + "bitflags 2.13.2",
5573 + "cfg-if",
5574 + "foreign-types 0.3.2",
5575 + "libc",
5576 + "openssl-macros",
5577 + "openssl-sys",
5578 +]
5579 +
5580 +[[package]]
5581 +name = "openssl-macros"
5582 +version = "0.1.1"
5583 +source = "registry+https://github.com/rust-lang/crates.io-index"
5584 +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
5585 +dependencies = [
5586 + "proc-macro2",
5587 + "quote",
5588 + "syn 2.0.119",
5589 +]
5590 +
5591 [[package]]
5592 name = "openssl-probe"
5593 version = "0.2.1"
5594 source = "registry+https://github.com/rust-lang/crates.io-index"
5595 checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe"
5596
5597 +[[package]]
5598 +name = "openssl-sys"
5599 +version = "0.9.117"
5600 +source = "registry+https://github.com/rust-lang/crates.io-index"
5601 +checksum = "b47e7e6bb2c38cd930d25a23b40fa52e068c10e85f3e03a7f5ba5aaca5713695"
5602 +dependencies = [
5603 + "cc",
5604 + "libc",
5605 + "pkg-config",
5606 + "vcpkg",
5607 +]
5608 +
5609 [[package]]
5610 name = "option-ext"
5611 version = "0.2.0"
@@ -6562,10 +6647,12 @@ dependencies = [
6647 "http-body-util",
6648 "hyper",
6649 "hyper-rustls",
6650 + "hyper-tls",
6651 "hyper-util",
6652 "js-sys",
6653 "log",
6654 "mime",
6655 + "native-tls",
6656 "percent-encoding",
6657 "pin-project-lite",
6658 "quinn",
@@ -6576,6 +6663,7 @@ dependencies = [
6663 "serde_json",
6664 "sync_wrapper",
6665 "tokio",
6666 + "tokio-native-tls",
6667 "tokio-rustls",
6668 "tokio-util",
6669 "tower",
@@ -8645,6 +8733,16 @@ dependencies = [
8733 "syn 3.0.6",
8734 ]
8735
8736 +[[package]]
8737 +name = "tokio-native-tls"
8738 +version = "0.3.1"
8739 +source = "registry+https://github.com/rust-lang/crates.io-index"
8740 +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
8741 +dependencies = [
8742 + "native-tls",
8743 + "tokio",
8744 +]
8745 +
8746 [[package]]
8747 name = "tokio-rayon"
8748 version = "2.1.0"
@@ -9455,6 +9553,12 @@ dependencies = [
9553 "uuid 0.8.2",
9554 ]
9555
9556 +[[package]]
9557 +name = "vcpkg"
9558 +version = "0.2.15"
9559 +source = "registry+https://github.com/rust-lang/crates.io-index"
9560 +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
9561 +
9562 [[package]]
9563 name = "vec_map"
9564 version = "0.8.2"
Cargo.toml
+1 -1
@@ -46,7 +46,7 @@ smbcloud-gresiq-sdk = "0.4.7"
46 # The ACP crates (ed-mcp, ed-acp, ed-acp-tui, ed-acp-testkit) use these; ed-agent does not.
47 agent-client-protocol = "2.2"
48 rmcp = { version = "3.5", default-features = false }
49 -reqwest = { version = "0.13", default-features = false, features = ["rustls", "json", "stream"] }
49 +reqwest = { version = "0.13", default-features = false, features = ["json", "stream"] }
50 ratatui = { version = "0.30.2", default-features = false, features = ["crossterm", "layout-cache", "unstable-rendered-line-info"] }
51 crossterm = { version = "0.29", features = ["event-stream"] }
52 tokio-util = "0.7"
crates/ed-acp/Cargo.toml
+10 -1
@@ -24,7 +24,6 @@ async-trait.workspace = true
24 tokio = { workspace = true, features = ["full"] }
25 tokio-util.workspace = true
26 futures.workspace = true
27 -reqwest.workspace = true
27 serde.workspace = true
28 serde_json.workspace = true
29 anyhow.workspace = true
@@ -34,6 +33,16 @@ uuid.workspace = true
33 directories.workspace = true
34 base64.workspace = true
35
36 +# reqwest 0.13's `rustls` feature is the aws-lc provider, whose C code doesn't build for
37 +# arm64_32 (`aws-lc-sys` takes it for a 64-bit limb target), and `ring` asserts 64-bit
38 +# pointers on aarch64. watchOS uses `native-tls`, which is Security.framework and needs no
39 +# rustls provider at all.
40 +[target.'cfg(not(target_os = "watchos"))'.dependencies]
41 +reqwest = { workspace = true, features = ["rustls"] }
42 +
43 +[target.'cfg(target_os = "watchos")'.dependencies]
44 +reqwest = { workspace = true, features = ["native-tls"] }
45 +
46 [dev-dependencies]
47 tokio = { version = "1", features = ["full"] }
48 # Turn the `local` feature on for this crate's own tests.
crates/ed-mcp/Cargo.toml
+9 -1
@@ -16,7 +16,7 @@ agent-client-protocol = { workspace = true, optional = true }
16 ed-agent = { workspace = true, optional = true }
17 async-trait = { workspace = true, optional = true }
18 http = "1"
19 -rmcp = { workspace = true, features = ["client", "transport-streamable-http-client-reqwest", "reqwest"] }
19 +rmcp = { workspace = true, features = ["client", "transport-streamable-http-client-reqwest"] }
20 tokio = { workspace = true, features = ["sync", "time", "process", "macros", "io-std", "io-util", "rt"] }
21 tokio-util.workspace = true
22 futures.workspace = true
@@ -24,6 +24,14 @@ serde_json.workspace = true
24 anyhow.workspace = true
25 tracing.workspace = true
26
27 +# rmcp's `reqwest` feature turns on reqwest's aws-lc provider, which doesn't build for
28 +# arm64_32; watchOS takes `reqwest-native-tls` (Security.framework) instead.
29 +[target.'cfg(not(target_os = "watchos"))'.dependencies]
30 +rmcp = { workspace = true, features = ["reqwest"] }
31 +
32 +[target.'cfg(target_os = "watchos")'.dependencies]
33 +rmcp = { workspace = true, features = ["reqwest-native-tls"] }
34 +
35 # Spawning an MCP server as a child process needs `exec`, which Apple hides on tvOS and
36 # watchOS (`libc` has no `execv` there, so `nix` under `process-wrap` doesn't compile). The
37 # stdio transport is everywhere else.
crates/ed-onde-account/Cargo.toml
+10 -1
@@ -12,11 +12,20 @@ repository.workspace = true
12 homepage.workspace = true
13
14 [dependencies]
15 -reqwest.workspace = true
15 serde.workspace = true
16 serde_json.workspace = true
17 thiserror.workspace = true
18
19 +# reqwest 0.13's `rustls` feature is the aws-lc provider, whose C code doesn't build for
20 +# arm64_32 (`aws-lc-sys` takes it for a 64-bit limb target), and `ring` asserts 64-bit
21 +# pointers on aarch64. watchOS uses `native-tls`, which is Security.framework and needs no
22 +# rustls provider at all.
23 +[target.'cfg(not(target_os = "watchos"))'.dependencies]
24 +reqwest = { workspace = true, features = ["rustls"] }
25 +
26 +[target.'cfg(target_os = "watchos")'.dependencies]
27 +reqwest = { workspace = true, features = ["native-tls"] }
28 +
29 [dev-dependencies]
30 axum = "0.8"
31 tokio = { workspace = true, features = ["macros", "net", "rt-multi-thread"] }