chore: cargo workspace with citygen and city crates

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Jeffrey Wilcke
2026-10-12 16:39:05 +02:00
parent 7b225cc5e8
commit 76c07e2927
7 changed files with 1163 additions and 0 deletions

1091
Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

29
Cargo.toml Normal file
View File

@@ -0,0 +1,29 @@
[workspace]
resolver = "3"
members = ["crates/citygen", "crates/city"]
[workspace.package]
edition = "2024"
version = "0.1.0"
license = "MIT"
[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
rand = "0.9"
rand_chacha = "0.9"
noise = "0.9"
thiserror = "2"
anyhow = "1"
ron = "0.10"
postcard = { version = "1", features = ["use-std"] }
serde_json = "1"
ratatui = "0.29"
crossterm = "0.28"
clap = { version = "4", features = ["derive"] }
unicode-width = "0.2"
[profile.dev]
opt-level = 1
[profile.release]
lto = "thin"

23
crates/city/Cargo.toml Normal file
View File

@@ -0,0 +1,23 @@
[package]
name = "city"
edition.workspace = true
version.workspace = true
license.workspace = true
[[bin]]
name = "city"
path = "src/main.rs"
[dependencies]
citygen = { path = "../citygen" }
serde.workspace = true
postcard.workspace = true
serde_json.workspace = true
anyhow.workspace = true
ratatui.workspace = true
crossterm.workspace = true
clap.workspace = true
ron.workspace = true
[dev-dependencies]
unicode-width.workspace = true

3
crates/city/src/main.rs Normal file
View File

@@ -0,0 +1,3 @@
fn main() {
println!("city");
}

13
crates/citygen/Cargo.toml Normal file
View File

@@ -0,0 +1,13 @@
[package]
name = "citygen"
edition.workspace = true
version.workspace = true
license.workspace = true
[dependencies]
serde.workspace = true
rand.workspace = true
rand_chacha.workspace = true
noise.workspace = true
thiserror.workspace = true
ron.workspace = true

View File

@@ -0,0 +1 @@
//! World model and generator for the cyberpunk city.

3
rust-toolchain.toml Normal file
View File

@@ -0,0 +1,3 @@
[toolchain]
channel = "stable"
components = ["rustfmt", "clippy"]