build: wire rustls QUIC cdylib into the mojo env and Docker image - #35
Merged
Conversation
ADR-003 follow-up #6 needs flare's rustls QUIC cdylib for HTTP/3. flare's pixi activation hook runs the cargo build, but our conda- packaged flare omits that hook on the second install (it lives on flare's source tree), so we build it explicitly. pixi.toml: - Add `rust = ">=1.83,<2"` to the mojo feature so cargo is on PATH for the rustls cdylib build (and for any future Rust ffi work). - Add `pixi run -e mojo rustls-build` task that runs flare's build_rustls.sh. Idempotent — cargo's incremental build and the script's atomic install copy mean repeat runs are cheap. Dockerfile: - Stage 1 invokes `pixi run -e mojo rustls-build` after the mojo env is installed, before the main.mojo compile. ~20s the first time, ~1s on cache hit. - Stage 2 copies both libflare_tls.so and libflare_rustls_quic.so into /usr/local/lib (already on the loader path). Best-effort — fall back to a warning if a build path doesn't exist on a future flare layout change. Lets a future HTTP/3 deploy bind h3 without rebuilding the image. Co-authored-by: opencode-agent <noreply@opencode.ai>
johnnyhuy
added a commit
that referenced
this pull request
Aug 9, 2026
ADR-003 follow-up #6 needs flare's rustls QUIC cdylib for HTTP/3. flare's pixi activation hook runs the cargo build, but our conda- packaged flare omits that hook on the second install (it lives on flare's source tree), so we build it explicitly. pixi.toml: - Add `rust = ">=1.83,<2"` to the mojo feature so cargo is on PATH for the rustls cdylib build (and for any future Rust ffi work). - Add `pixi run -e mojo rustls-build` task that runs flare's build_rustls.sh. Idempotent — cargo's incremental build and the script's atomic install copy mean repeat runs are cheap. Dockerfile: - Stage 1 invokes `pixi run -e mojo rustls-build` after the mojo env is installed, before the main.mojo compile. ~20s the first time, ~1s on cache hit. - Stage 2 copies both libflare_tls.so and libflare_rustls_quic.so into /usr/local/lib (already on the loader path). Best-effort — fall back to a warning if a build path doesn't exist on a future flare layout change. Lets a future HTTP/3 deploy bind h3 without rebuilding the image. Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ADR-003 follow-up #6 needs flare's
libflare_rustls_quic.sofor HTTP/3. flare's own pixi activation hook would build it, but our conda-packaged flare omits that hook on the second install (it lives on flare's source tree), so we build it explicitly.pixi.toml: addrust = ">=1.83,<2"to the mojo feature, plus apixi run -e mojo rustls-buildtask that runs flare'sbuild_rustls.sh.Dockerfile: stage 1 invokespixi run -e mojo rustls-buildafter the mojo env is installed (~20s first time, ~1s on cache hit). Stage 2 copies bothlibflare_tls.soandlibflare_rustls_quic.sointo/usr/local/lib.Consequences
HttpServer.bind_with_http3inmain.mojo) is now a small follow-up once flare#7 / reactor TLS lands.Testing
pixi run -e mojo rustls-buildbuilds and installs the cdylib at the canonical path.pixi/envs/mojo/lib/libflare_rustls_quic.so(~1.05 MB).uv run pytest— 42 passed, ruff + mypy clean.