feat(ariadne): add graph core crate

This commit is contained in:
2026-09-05 22:15:20 -04:00
parent 64773e0948
commit 6b408cd66d
12 changed files with 65 additions and 43 deletions

View File

@@ -1,18 +1,3 @@
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library")
rust_library(
name = "ariadne_lib",
crate_name = "ariadne",
srcs = ["src/lib.rs"],
)
rust_binary(
name = "ariadne",
crate_name = "ariadne_cli",
srcs = ["src/main.rs"],
deps = [":ariadne_lib"],
)
sh_binary(
name = "extract_and_decompile",
srcs = ["extract-and-decompile.sh"],

View File

@@ -1,27 +0,0 @@
# Ariadne
Ariadne prepares Ren'Py game source for later analysis.
## Bazel shape
Keep project-owned source under `src/ariadne/`. Keep game-derived files local and ignored under
`src/ariadne/output/`.
The first target is a shell entry point:
```sh
bazel run //src/ariadne:extract_and_decompile -- \
--game-root /path/to/game-install
```
The script defaults to `<workspace>/src/ariadne/output`.
This path stays stable when you run the command from inside `src/ariadne`.
Use the game installation directory as the game root.
One run processes all installed season directories.
Extracted archive source keeps the archive path relative to the game root, so files with the same
internal path from different season installs do not overwrite each other.
If `rpycdec` is not available, the script uses `extract-tools.nix` to enter a Nix shell.
Keep the script as a thin orchestration layer.
Bazel owns stable inputs and wrappers.
Keep large game files and recovered output outside the build graph.

9
src/ariadne/bin/BUILD Normal file
View File

@@ -0,0 +1,9 @@
load("@rules_rust//rust:defs.bzl", "rust_binary")
rust_binary(
name = "ariadne",
crate_name = "ariadne_cli",
visibility = ["//src/ariadne:__pkg__"],
srcs = ["main.rs"],
deps = ["//src/ariadne/core:ariadne_lib"],
)

View File

@@ -0,0 +1,11 @@
[package]
name = "ariadne-bin"
version = "0.1.0"
edition = "2024"
[[bin]]
name = "ariadne"
path = "main.rs"
[dependencies]
ariadne = { path = "../core" }

16
src/ariadne/core/BUILD Normal file
View File

@@ -0,0 +1,16 @@
load("@rules_rust//rust:defs.bzl", "rust_library")
rust_library(
name = "ariadne_lib",
crate_name = "ariadne",
crate_root = "lib.rs",
visibility = ["//src/ariadne:__subpackages__"],
srcs = [
"graph.rs",
"lib.rs",
],
deps = [
"//third_party/crates:serde",
"//third_party/crates:serde_json",
],
)

View File

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

View File

@@ -0,0 +1,4 @@
//! In-memory graph model used by Ariadne pipeline stages.
#[derive(Clone, Debug, Default, Eq, PartialEq)]
pub struct Graph;

View File

@@ -1,3 +1,5 @@
pub mod graph;
pub fn run() {
println!("Ariadne");
}