feat(ariadne): add graph core crate
This commit is contained in:
@@ -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"],
|
||||
|
||||
@@ -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
9
src/ariadne/bin/BUILD
Normal 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"],
|
||||
)
|
||||
11
src/ariadne/bin/Cargo.toml
Normal file
11
src/ariadne/bin/Cargo.toml
Normal 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
16
src/ariadne/core/BUILD
Normal 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",
|
||||
],
|
||||
)
|
||||
@@ -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"
|
||||
4
src/ariadne/core/graph.rs
Normal file
4
src/ariadne/core/graph.rs
Normal file
@@ -0,0 +1,4 @@
|
||||
//! In-memory graph model used by Ariadne pipeline stages.
|
||||
|
||||
#[derive(Clone, Debug, Default, Eq, PartialEq)]
|
||||
pub struct Graph;
|
||||
@@ -1,3 +1,5 @@
|
||||
pub mod graph;
|
||||
|
||||
pub fn run() {
|
||||
println!("Ariadne");
|
||||
}
|
||||
Reference in New Issue
Block a user