Skip to content

refactor: split gateway into a Cargo workspace member#4

Merged
jaredLunde merged 1 commit into
mainfrom
workspace-split
Jun 30, 2026
Merged

refactor: split gateway into a Cargo workspace member#4
jaredLunde merged 1 commit into
mainfrom
workspace-split

Conversation

@jaredLunde

Copy link
Copy Markdown
Contributor

What

Moves the single beyond-ai crate into crates/gateway/ and turns the repo root into a virtual Cargo workspace, so additional open-source AI components (an agent harness, etc.) can live beside the gateway without entangling its deps/build.

This is M0 of a larger effort — the structural "make room for crates" step. No agent code yet.

Behavior-neutral

Package beyond-ai and lib beyond_ai are unchanged, so every use beyond_ai::… and CARGO_BIN_EXE_beyond-ai keeps working. The diff is almost entirely git mv renames plus four small manifest/doc edits.

Changes

  • root Cargo.toml[workspace]: members = ["crates/*"], resolver = "3", lints hoisted to [workspace.lints] (so the unsafe/panic-surface denies apply to every future crate root), [profile.release] at root, and [workspace.dependencies] for deps shared with future crates.
  • crates/gateway/Cargo.toml: inherits workspace lints/edition/shared deps; gateway-specific deps (pingora, store, rustls…) stay local.
  • Dockerfile: build line → cargo build --release -p beyond-ai --bin beyond-ai.
  • mise.toml: example task → cargo run -p beyond-ai --example mint_dev_key.
  • README: quick-start paths point at crates/gateway/.
  • CI/publish workflows: no edits needed — they go through mise tasks + the Dockerfile.

Verification

cargo build · clippy --all-targets -D warnings · cargo fmt --all --check · dprint check · 99 unit · 21 integration (+10 smoke ignored) · benches compile · docker image builds and --help runs.

🤖 Generated with Claude Code

Move the single `beyond-ai` crate into `crates/gateway/` and turn the repo
root into a virtual Cargo workspace, so additional AI components (an agent
harness, etc.) can live beside the gateway without entangling its deps/build.

Behavior-neutral: package `beyond-ai` and lib `beyond_ai` are unchanged, so
every `use beyond_ai::…` and `CARGO_BIN_EXE_beyond-ai` keeps working.

- root Cargo.toml -> [workspace]: members = ["crates/*"], resolver = 3,
  hoisted lints to [workspace.lints], [profile.release] at root, and
  [workspace.dependencies] for deps shared with future crates.
- crates/gateway/Cargo.toml: inherits workspace lints/edition/shared deps;
  gateway-specific deps (pingora, store, rustls…) stay local.
- Dockerfile: build line -> `cargo build --release -p beyond-ai --bin beyond-ai`.
- mise.toml: example task -> `cargo run -p beyond-ai --example mint_dev_key`.
- README: quick-start paths point at crates/gateway/.

Verified: build · clippy -D warnings · cargo fmt --all --check · dprint check ·
99 unit · 21 integration · benches compile · docker image builds and runs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jaredLunde jaredLunde merged commit 0433fe0 into main Jun 30, 2026
1 check passed
@jaredLunde jaredLunde deleted the workspace-split branch June 30, 2026 05:30
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