refactor(ariadne): flatten Rust source layout

This commit is contained in:
2026-09-05 21:46:44 -04:00
parent 9334bdd6c2
commit ed2fea1030
8 changed files with 14 additions and 5 deletions

View File

@@ -99,6 +99,8 @@
- When creating a pull request from a worktree-specific development branch, create a dedicated pull-request branch - When creating a pull request from a worktree-specific development branch, create a dedicated pull-request branch
separate from the branch that names or anchors the worktree. separate from the branch that names or anchors the worktree.
Do not open pull requests directly from the worktree branch. Do not open pull requests directly from the worktree branch.
- Ariadne uses a flat Rust source layout under `src/ariadne/`.
Do not add a Cargo-default nested `src/ariadne/src/` source directory.
- In Bazel `BUILD` files, depend on vendored Rust crates through the public aliases under - In Bazel `BUILD` files, depend on vendored Rust crates through the public aliases under
`//third_party/crates`, for example `//third_party/crates:serde`. `//third_party/crates`, for example `//third_party/crates:serde`.
- Ariadne extraction must preserve the game-root season prefix for archived source. - Ariadne extraction must preserve the game-root season prefix for archived source.

View File

@@ -4,9 +4,9 @@ rust_library(
name = "ariadne_lib", name = "ariadne_lib",
crate_name = "ariadne", crate_name = "ariadne",
srcs = [ srcs = [
"src/artifact.rs", "artifact.rs",
"src/graph.rs", "graph.rs",
"src/lib.rs", "lib.rs",
], ],
deps = [ deps = [
"//third_party/crates:serde", "//third_party/crates:serde",
@@ -16,7 +16,7 @@ rust_library(
rust_test( rust_test(
name = "ariadne_lib_test", name = "ariadne_lib_test",
srcs = ["src/lib_test.rs"], srcs = ["lib_test.rs"],
deps = [ deps = [
":ariadne_lib", ":ariadne_lib",
"//third_party/crates:serde_json", "//third_party/crates:serde_json",
@@ -26,7 +26,7 @@ rust_test(
rust_binary( rust_binary(
name = "ariadne", name = "ariadne",
crate_name = "ariadne_cli", crate_name = "ariadne_cli",
srcs = ["src/main.rs"], srcs = ["main.rs"],
deps = [":ariadne_lib"], deps = [":ariadne_lib"],
) )

View File

@@ -3,6 +3,13 @@ name = "ariadne"
version = "0.1.0" version = "0.1.0"
edition = "2024" edition = "2024"
[lib]
path = "lib.rs"
[[bin]]
name = "ariadne"
path = "main.rs"
[dependencies] [dependencies]
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"