Skip to content

release: use cross + rustls-tls for linux targets#15

Merged
jdx merged 2 commits intomainfrom
claude/practical-faraday-a4d954
Apr 18, 2026
Merged

release: use cross + rustls-tls for linux targets#15
jdx merged 2 commits intomainfrom
claude/practical-faraday-a4d954

Conversation

@jdx
Copy link
Copy Markdown
Contributor

@jdx jdx commented Apr 18, 2026

Summary

  • The aarch64-unknown-linux-gnu upload-assets job in run 24613265153 failed with fatal error: openssl/opensslconf.h: No such file or directoryopenssl-sys (pulled in by reqwest's native-tls feature) couldn't find aarch64 OpenSSL headers. setup-cross-toolchain-action installs aarch64-linux-gnu-gcc but points it at a stub sysroot that lacks the arch-specific openssl config.
  • Switch reqwest to rustls-tls (pure Rust) so TLS no longer depends on system libraries, and run Linux builds through cross so the per-target Docker image also gives us an older, more portable glibc — matching how fnox ships Linux binaries.
  • Identity::from_pkcs8_pem is native-tls-only. The per-registry client-cert path now concatenates cert+key into a combined PEM buffer and calls Identity::from_pem, which works under rustls.

Changes

  • Cargo.toml — reqwest: default-features = false, add rustls-tls
  • crates/aube-registry/Cargo.toml — drop now-redundant native-tls feature override
  • crates/aube-registry/src/client.rs — switch Identity::from_pkcs8_pemIdentity::from_pem with combined cert+key PEM
  • .github/workflows/release.yml — add build-tool matrix column (cross for Linux, cargo elsewhere); remove setup-cross-toolchain-action (the action installs cross itself)

Test plan

  • cargo build passes locally
  • cargo clippy --all-targets -- -D warnings clean
  • New release run uploads all six target archives, including aarch64-unknown-linux-gnu
  • Linux binaries run on a distro with older glibc (cross uses an older base image than ubuntu-latest)

🤖 Generated with Claude Code


Note

Medium Risk
Medium risk because it changes the TLS backend for all HTTP calls and modifies the release build pipeline for Linux targets, which could affect network compatibility and artifact portability.

Overview
Switches HTTP TLS from system OpenSSL to pure-Rust rustls. Workspace reqwest is rebuilt with default-features = false and rustls-tls (dropping native-tls/OpenSSL dependencies), and aube-registry removes its native-tls override; Cargo.lock updates accordingly.

Updates registry client mTLS handling and release builds. Per-registry client cert/key loading now concatenates cert+key into a single PEM and uses reqwest::Identity::from_pem for rustls compatibility, and the release workflow builds Linux targets via cross (matrix build-tool) while keeping cargo elsewhere and removing the cross toolchain setup step.

Reviewed by Cursor Bugbot for commit e214e23. Bugbot is set up for automated code reviews on this repo. Configure here.

The aarch64-unknown-linux-gnu release build was failing because
openssl-sys (pulled in by reqwest's native-tls feature) couldn't
find aarch64 OpenSSL headers — setup-cross-toolchain-action points
the host GCC at a stub sysroot that lacks them.

Switch reqwest to rustls-tls so TLS doesn't depend on system libs,
and run Linux builds through `cross` (matching fnox) so the Docker
image also gives us an older, more portable glibc.

Identity::from_pkcs8_pem is native-tls-only, so the per-registry
client-cert path now concatenates cert+key into a combined PEM and
calls Identity::from_pem, which works under rustls.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 18, 2026

Greptile Summary

This PR fixes a cross-compilation failure for aarch64-unknown-linux-gnu builds by eliminating the OpenSSL system-library dependency via two coordinated changes: switching reqwest from native-tls to rustls-tls (pure-Rust TLS), and replacing setup-cross-toolchain-action with cross for Linux targets in the release workflow.

Key changes:

  • Cargo.toml: reqwest now uses default-features = false with features = [\"json\", \"stream\", \"rustls-tls\"]
  • crates/aube-registry/Cargo.toml: The now-redundant native-tls feature override is removed
  • crates/aube-registry/src/client.rs: Identity::from_pkcs8_pem(cert, key) (native-tls-only) is replaced by concatenating cert+key into a combined PEM buffer and calling Identity::from_pem, which works under rustls
  • .github/workflows/release.yml: A build-tool matrix column selects cross for the two Linux targets and cargo for macOS/Windows; the setup-cross-toolchain-action step is removed since taiki-e/upload-rust-binary-action installs cross itself

Confidence Score: 5/5

Safe to merge — changes are well-scoped, the root cause of the build failure is correctly addressed, and the rustls migration is complete and consistent.

All four changed files are coherent: the workspace-level reqwest switch to rustls-tls, the redundant native-tls removal in the registry crate, the Identity::from_pem adaptation (which is the correct API under rustls), and the workflow migration to cross all fit together cleanly. The PEM concatenation correctly inserts a newline between cert and key. No open edge cases were found.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/release.yml Adds build-tool matrix column (cross for Linux, cargo elsewhere) and removes the now-superseded setup-cross-toolchain-action; both upload steps correctly thread build-tool through to the action.
Cargo.toml Switches reqwest to default-features = false with rustls-tls, eliminating the openssl-sys transitive dependency that broke aarch64-unknown-linux-gnu builds.
crates/aube-registry/Cargo.toml Drops the now-redundant native-tls feature override on reqwest; the workspace-level change is the single source of truth.
crates/aube-registry/src/client.rs Replaces Identity::from_pkcs8_pem(cert, key) (native-tls-only) with a cert+key PEM concatenation and Identity::from_pem, which works under rustls; newline handling between the two PEM blocks is correct.

Reviews (2): Last reviewed commit: "release: use cross + rustls-tls for linu..." | Re-trigger Greptile

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit ddb786b. Configure here.

Comment thread Cargo.toml Outdated
Setting `default-features = false` dropped http2, charset, and
system-proxy along with native-tls. http2 is load-bearing — the
registry client explicitly relies on ALPN multiplexing for
concurrent fetches (see client.rs idle-connection-pool comment).
system-proxy matters for users behind corporate proxies. Restore
all three.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jdx jdx merged commit 0107088 into main Apr 18, 2026
16 checks passed
@jdx jdx deleted the claude/practical-faraday-a4d954 branch April 18, 2026 21:09
jdx added a commit that referenced this pull request Apr 18, 2026
aube can now be installed via npm (`npm install -g @endevco/aube`), and
Linux binaries have been rebuilt with broader glibc compatibility and a
pure-Rust TLS stack — no more OpenSSL system dependency.

## Highlights

- **Install from npm** — `npm install -g @endevco/aube` ships native
binaries for all six supported platforms (macOS, Linux, Windows ×
arm64/x64). The multicall shims `aubr` and `aubx` work out of the box.
- **Better Linux portability** — Linux targets are now built with
`cross`, producing binaries that run on older glibc versions. The switch
from OpenSSL to `rustls` removes the system OpenSSL dependency entirely.

## Added

- **npm distribution** — aube is now published on npm as
`@endevco/aube`. At install time, a `preinstall` script fetches the
correct `@endevco/aube-<os>-<arch>` sub-package and hardlinks the three
binaries (`aube`, `aubr`, `aubx`) into place. No runtime JS shim — npm's
bin wrapper calls the native binary directly. Pre-releases use the
`next` dist-tag; stable releases use `latest`.
([#12](#12) by @jdx)

  ```sh
  npm install -g @endevco/aube
  # or try it without installing
  npx @endevco/aube --version
  ```

> **Note:** Because install relies on `preinstall`, the
`--ignore-scripts` flag and fully offline caches are not supported. Use
mise or `cargo install` in those environments.

## Changed

- **TLS backend switched to rustls** — HTTP requests now use the
pure-Rust `rustls` TLS implementation instead of the system's OpenSSL
via `native-tls`. This eliminates the need for OpenSSL headers at build
time and removes the OpenSSL runtime dependency on Linux.
([#15](#15) by @jdx)
- **Linux builds use `cross`** — Linux release binaries (x86_64 and
aarch64) are now compiled inside `cross`'s Docker images, which target
an older glibc baseline for broader distribution compatibility.
([#15](#15) by @jdx)

## Fixed

- **Per-registry client certificate auth** — The mTLS client certificate
path now concatenates cert and key into a single PEM buffer and calls
`Identity::from_pem`, which works correctly under rustls. The previous
`Identity::from_pkcs8_pem` was a `native-tls`-only API.
([#15](#15) by @jdx)

**Full Changelog**:
6587e37...16ded6f

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> This is primarily a release/versioning PR (changelogs, version bumps,
and dependency lockfile updates) with no functional code changes shown
in the diff, so runtime risk is low.
> 
> **Overview**
> Prepares the `v1.0.0-beta.2` release by adding a top-level
`CHANGELOG.md` and per-crate changelogs, and bumping the workspace +
internal crate versions from `1.0.0-beta.1` to `1.0.0-beta.2`.
> 
> Updates `Cargo.lock` for the release (dependency version/lock refresh)
and syncs the reported CLI/docs version (`aube.usage.kdl`,
`docs/cli/index.md`, `docs/cli/commands.json`) to `1.0.0-beta.2`.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
0e53762. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

Co-authored-by: release-plz[bot] <release-plz+bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant