diff --git a/Cargo.toml b/Cargo.toml index ad24ccc..c05ad4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,15 +1,47 @@ +[workspace] +members = ["backend-tauri"] +default-members = ["."] +resolver = "2" + +[package] +name = "diffedit3" +description = "Edit diffs in a 3-pane view" +license = { workspace = true } +repository = { workspace = true } +readme = { workspace = true } +version = { workspace = true } +edition = { workspace = true } +include = ["/src", "/webapp/dist", "/*.md"] + [workspace.package] -version = "0.1.0" # Also update package.json and tauri.conf.json +version = "0.1.0" # Also update package.json and tauri.conf.json edition = "2021" license = "Apache-2.0" readme = "README.md" repository = "https://github.com/ilyagr/diffedit3" -[workspace] -members = [ "backend-tauri", "backend-local-server"] -default-members = [ - "backend-local-server", - # `cargo build` should ignore the Tauri binary. - # `cargo tauri build` must be used for that. -] -resolver = "2" +[dependencies] +clap = { version = "4.5.0", features = ["derive"] } +indexmap = { version = "2.2.3", features = ["serde"] } +open = "5.0.1" +parking_lot = "0.12.1" +poem = { version = "2.0.0", features = ["embed"] } +rust-embed = { version = "8.2.0" } +serde = { version = "1.0.196", features = ["serde_derive"] } +thiserror = "1.0.57" +tokio = { version = "1.36.0", features = [ + "macros", + "rt-multi-thread", + "signal", +] } +toml = { version = "0.8.10", features = ["indexmap"] } +tracing-subscriber = "0.3.18" +walkdir = "2.4.0" + +[dev-dependencies] +insta = { version = "1.34.0", features = [ + "redactions", + "serde", + "yaml", + "json", +] } diff --git a/backend-local-server/Cargo.toml b/backend-local-server/Cargo.toml deleted file mode 100644 index 9332b6a..0000000 --- a/backend-local-server/Cargo.toml +++ /dev/null @@ -1,30 +0,0 @@ -[package] -name = "diffedit3" -description = "Edit diffs in a 3-pane view" -license = { workspace = true } -repository = { workspace = true } -readme = { workspace = true } -version = { workspace = true } -edition = { workspace = true } - -[dependencies] -clap = { version = "4.5.0", features = ["derive"] } -indexmap = { version = "2.2.3", features = ["serde"] } -open = "5.0.1" -parking_lot = "0.12.1" -poem = { version = "2.0.0", features = ["embed"] } -rust-embed = { version = "8.2.0" } -serde = { version = "1.0.196", features = ["serde_derive"] } -thiserror = "1.0.57" -tokio = { version = "1.36.0", features = ["macros", "rt-multi-thread", "signal"] } -toml = { version = "0.8.10", features = ["indexmap"] } -tracing-subscriber = "0.3.18" -walkdir = "2.4.0" - -[dev-dependencies] -insta = { version = "1.34.0", features = [ - "redactions", - "serde", - "yaml", - "json", -] } diff --git a/backend-local-server/TODOs.md b/backend-local-server/TODOs.md deleted file mode 100644 index fa340fd..0000000 --- a/backend-local-server/TODOs.md +++ /dev/null @@ -1,4 +0,0 @@ -build.rs script to check whether dist changed - -Move everything in `backend-local-server` one level up, make it the "diffedit3" -crate. \ No newline at end of file diff --git a/backend-local-server/webapp-dist b/backend-local-server/webapp-dist deleted file mode 120000 index 28abf42..0000000 --- a/backend-local-server/webapp-dist +++ /dev/null @@ -1 +0,0 @@ -../webapp/dist/ \ No newline at end of file diff --git a/backend-tauri/Cargo.toml b/backend-tauri/Cargo.toml index 576ea32..1bd0bcf 100644 --- a/backend-tauri/Cargo.toml +++ b/backend-tauri/Cargo.toml @@ -12,7 +12,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" indexmap = { version = "2.2.3", features = ["serde"] } clap = { version = "4.5.0", features = ["derive"] } -diffedit3 = { path = "../backend-local-server" } +diffedit3 = { path = ".." } parking_lot = "0.12.1" [features] diff --git a/backend-local-server/src/bin/diffedit3-web.rs b/src/bin/diffedit3-web.rs similarity index 100% rename from backend-local-server/src/bin/diffedit3-web.rs rename to src/bin/diffedit3-web.rs diff --git a/backend-local-server/src/fs.rs b/src/fs.rs similarity index 100% rename from backend-local-server/src/fs.rs rename to src/fs.rs diff --git a/backend-local-server/src/lib.rs b/src/lib.rs similarity index 100% rename from backend-local-server/src/lib.rs rename to src/lib.rs diff --git a/backend-local-server/src/local_server.rs b/src/local_server.rs similarity index 99% rename from backend-local-server/src/local_server.rs rename to src/local_server.rs index 60c3d69..499b1f4 100644 --- a/backend-local-server/src/local_server.rs +++ b/src/local_server.rs @@ -18,7 +18,7 @@ use crate::DataInterface; type DataInterfacePointer = Arc>>; #[derive(rust_embed::RustEmbed)] -#[folder = "webapp-dist/"] +#[folder = "webapp/dist/"] struct StaticFiles; pub type ExitCode = i32; diff --git a/backend-local-server/src/types.rs b/src/types.rs similarity index 100% rename from backend-local-server/src/types.rs rename to src/types.rs