From 4e781f56c96f11fb2ec54652fef52ed1780d2960 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Fri, 4 Oct 2024 00:35:06 -0700 Subject: [PATCH] cargo: merge Cargo.toml files into a cargo workspaces --- Cargo.toml | 40 +++++++++++++++++++++++++++++++++ saphyr/README.md => README.md | 0 bench/Cargo.toml | 8 +++---- parser/Cargo.toml | 42 ++++++++++++++--------------------- saphyr/Cargo.toml | 41 +++++++++++++++------------------- 5 files changed, 79 insertions(+), 52 deletions(-) create mode 100644 Cargo.toml rename saphyr/README.md => README.md (100%) diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..a222dc3 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,40 @@ +[profile.release] +lto = true + +[workspace] +members = [ + "parser", + "saphyr", + "bench", +] +resolver = "2" + +[workspace.package] +authors = [ + "Ethiraric ", + "David Aguilar ", + "Yuheng Chen " +] +version = "0.0.2" +documentation = "https://docs.rs/saphyr" +keywords = [ "yaml", "parser" ] +categories = [ "encoding", "parser-implementations" ] +license = "MIT OR Apache-2.0" +description = "A fully YAML 1.2 compliant YAML library" +repository = "https://github.com/saphyr-rs/saphyr" +readme = "README.md" +edition = "2021" +rust-version = "1.70.0" + +[workspace.dependencies] +arraydeque = "0.5.1" +encoding_rs = { version = "0.8.33" } +hashlink = "0.8" +libtest-mimic = "0.3.0" +quickcheck = "1.0" +saphyr = { path = "saphyr" } +saphyr-bench = { path = "bench" } +saphyr-parser = { path = "parser" } + +[workspace.lints.rust] +unsafe_op_in_unsafe_fn = "deny" diff --git a/saphyr/README.md b/README.md similarity index 100% rename from saphyr/README.md rename to README.md diff --git a/bench/Cargo.toml b/bench/Cargo.toml index 985a6fa..309e84c 100644 --- a/bench/Cargo.toml +++ b/bench/Cargo.toml @@ -1,14 +1,14 @@ [package] name = "saphyr-bench" -version = "0.0.1" authors = [ "Ethiraric " ] -license = "MIT" description = "Utilities to benchmark saphyr" +license = "MIT" readme = "README.md" -edition = "2021" +edition = { workspace = true } +version = { workspace = true } [dependencies] -saphyr-parser = "0.0.1" +saphyr-parser = { workspace = true } [[bin]] name = "time_parse" diff --git a/parser/Cargo.toml b/parser/Cargo.toml index 386b404..296c657 100644 --- a/parser/Cargo.toml +++ b/parser/Cargo.toml @@ -1,36 +1,28 @@ [package] name = "saphyr-parser" -version = "0.0.2" -authors = [ - "Yuheng Chen ", - "Ethiraric ", - "David Aguilar " -] -documentation = "https://docs.rs/saphyr-parser" -keywords = [ "yaml", "parser", "deserialization" ] -categories = [ "encoding", "parser-implementations", "parsing" ] -license = "MIT OR Apache-2.0" -description = "A fully YAML 1.2 compliant YAML parser" -repository = "https://github.com/saphyr-rs/saphyr-parser" readme = "README.md" -edition = "2021" -rust-version = "1.70.0" +authors = { workspace = true } +categories = { workspace = true } +description = { workspace = true } +documentation = { workspace = true } +edition = { workspace = true } +keywords = { workspace = true } +license = { workspace = true } +repository = { workspace = true } +rust-version = { workspace = true } +version = { workspace = true } [features] debug_prints = [] [dependencies] -arraydeque = "0.5.1" -hashlink = "0.8" +arraydeque = { workspace = true } +hashlink = { workspace = true } [dev-dependencies] -libtest-mimic = "0.3.0" -quickcheck = "1.0" -saphyr = "0.0.1" - -[profile.release-lto] -inherits = "release" -lto = true +libtest-mimic = { workspace = true } +quickcheck = { workspace = true } +saphyr = { workspace = true } [[test]] name = "yaml-test-suite" @@ -41,9 +33,9 @@ name = "dump_events" path = "tools/dump_events.rs" [[bin]] -name = "time_parse" +name = "time_parser_parse" path = "tools/time_parse.rs" [[bin]] -name = "run_bench" +name = "run_parser_bench" path = "tools/run_bench.rs" diff --git a/saphyr/Cargo.toml b/saphyr/Cargo.toml index dd5f7a2..2ea4048 100644 --- a/saphyr/Cargo.toml +++ b/saphyr/Cargo.toml @@ -1,34 +1,29 @@ [package] name = "saphyr" -version = "0.0.1" -authors = [ - "Yuheng Chen ", - "Ethiraric ", - "David Aguilar " -] -documentation = "https://docs.rs/saphyr" -keywords = [ "yaml", "parser" ] -categories = [ "encoding", "parser-implementations" ] -license = "MIT OR Apache-2.0" -description = "A fully YAML 1.2 compliant YAML library" -repository = "https://github.com/saphyr-rs/saphyr" -readme = "README.md" -edition = "2021" -rust-version = "1.70.0" +authors = { workspace = true } +categories = { workspace = true } +description = { workspace = true } +documentation = { workspace = true } +edition = { workspace = true } +keywords = { workspace = true } +license = { workspace = true } +version = { workspace = true } +readme = { workspace = true } +repository = { workspace = true } +rust-version = { workspace = true } [features] default = [ "encoding" ] encoding = [ "dep:encoding_rs" ] [dependencies] -arraydeque = "0.5.1" -saphyr-parser = "0.0.2" -encoding_rs = { version = "0.8.33", optional = true } -hashlink = "0.8" +arraydeque = { workspace = true } +encoding_rs = { workspace = true, optional = true } +hashlink = { workspace = true } +saphyr-parser = { workspace = true } [dev-dependencies] -quickcheck = "1.0" +quickcheck = { workspace = true } -[profile.release-lto] -inherits = "release" -lto = true +[lints] +workspace = true