From 0d75c7bd0badd031fc893b620cf840c0ccabaf57 Mon Sep 17 00:00:00 2001 From: Edward Langley Date: Wed, 15 Apr 2026 22:21:58 -0700 Subject: [PATCH] refactor(core): scaffold empty improvise-core sub-crate Lay the groundwork for Phase B of improvise-36h: a new `crates/improvise-core/` sub-crate that will house the pure-data core (model, view, workbook, format) once the files move in the next commit. Only scaffolding here: - New `crates/improvise-core/Cargo.toml` mirroring improvise-formula's structure; declares deps on improvise-formula, anyhow, indexmap, serde. - New `crates/improvise-core/src/lib.rs` with the single re-export `pub use improvise_formula as formula;` so that in the next commit the moved code's `crate::formula::*` paths resolve unchanged. - Root `Cargo.toml` adds the new crate to the workspace members and the main crate's `[dependencies]`, ready to receive the move. No source files change yet; cargo check --workspace still compiles as before. Co-Authored-By: Claude Opus 4.6 (1M context) --- Cargo.lock | 12 ++++++++++++ Cargo.toml | 3 ++- crates/improvise-core/Cargo.toml | 16 ++++++++++++++++ crates/improvise-core/src/lib.rs | 6 ++++++ 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 crates/improvise-core/Cargo.toml create mode 100644 crates/improvise-core/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index b2565b1..4860c20 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -737,6 +737,7 @@ dependencies = [ "dirs", "enum_dispatch", "flate2", + "improvise-core", "improvise-formula", "indexmap", "pest", @@ -751,6 +752,17 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "improvise-core" +version = "0.1.0-rc2" +dependencies = [ + "anyhow", + "improvise-formula", + "indexmap", + "proptest", + "serde", +] + [[package]] name = "improvise-formula" version = "0.1.0-rc2" diff --git a/Cargo.toml b/Cargo.toml index 658acfa..55b98d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = [".", "crates/improvise-formula"] +members = [".", "crates/improvise-formula", "crates/improvise-core"] [package] name = "improvise" @@ -18,6 +18,7 @@ name = "improvise" path = "src/main.rs" [dependencies] +improvise-core = { path = "crates/improvise-core" } improvise-formula = { path = "crates/improvise-formula" } ratatui = "0.30" crossterm = "0.29" diff --git a/crates/improvise-core/Cargo.toml b/crates/improvise-core/Cargo.toml new file mode 100644 index 0000000..bd764df --- /dev/null +++ b/crates/improvise-core/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "improvise-core" +version = "0.1.0-rc2" +edition = "2024" +description = "Pure-data model, views, and workbook for improvise" +license = "Apache-2.0" +repository = "https://github.com/fiddlerwoaroof/improvise" + +[dependencies] +improvise-formula = { path = "../improvise-formula" } +anyhow = "1" +indexmap = { version = "2", features = ["serde"] } +serde = { version = "1", features = ["derive"] } + +[dev-dependencies] +proptest = "1" diff --git a/crates/improvise-core/src/lib.rs b/crates/improvise-core/src/lib.rs new file mode 100644 index 0000000..68364e4 --- /dev/null +++ b/crates/improvise-core/src/lib.rs @@ -0,0 +1,6 @@ +//! Pure-data core of the `improvise` project: `Model`, views, `Workbook`, +//! and number formatting. Depends on `improvise-formula` for AST types; +//! has no awareness of UI, I/O, or commands. +//! +//! Scaffolded empty in this commit; the modules land in the next commit. +pub use improvise_formula as formula;