cargo: split library and application into subcrates with virtual workspaces

This commit is contained in:
Matt Bilker 2019-11-09 08:53:32 +00:00
parent ac25fb4691
commit 045f2787f6
No known key found for this signature in database
GPG Key ID: 69ADF8AEB6C8B5D1
27 changed files with 40 additions and 28 deletions

View File

@ -1,31 +1,8 @@
[package]
name = "kbinxml"
version = "2.0.0"
authors = ["Matt Bilker <me@mbilker.us>"]
description = "An encoder/decoder for Konami's binary XML format used in many of their games."
edition = "2018"
[dependencies]
byteorder = "1.3.2"
bytes = "0.4.10"
encoding_rs = "0.8.6"
indexmap = "1.0.1"
lazy_static = "1.0.0"
log = "0.4.6"
quick-xml = "0.17.0"
rustc-hex = "2.0.1"
snafu = "0.6.0"
anyhow = { version = "1.0.19", optional = true }
clap = { version = "2.32.0", optional = true }
pretty_env_logger = { version = "0.3.0", optional = true }
[features]
build_binary = ["anyhow", "clap", "pretty_env_logger"]
[workspace]
members = [
"kbinxml",
"kbinxml_cli",
]
[profile.release]
lto = true
[[bin]]
name = "kbinxml"
required-features = ["build_binary"]

17
kbinxml/Cargo.toml Normal file
View File

@ -0,0 +1,17 @@
[package]
name = "kbinxml"
version = "2.0.0"
authors = ["Matt Bilker <me@mbilker.us>"]
description = "An encoder/decoder for Konami's binary XML format used in many of their games."
edition = "2018"
[dependencies]
byteorder = "1.3.2"
bytes = "0.4.10"
encoding_rs = "0.8.6"
indexmap = "1.0.1"
lazy_static = "1.0.0"
log = "0.4.6"
quick-xml = "0.17.0"
rustc-hex = "2.0.1"
snafu = "0.6.0"

18
kbinxml_cli/Cargo.toml Normal file
View File

@ -0,0 +1,18 @@
[package]
name = "kbinxml_cli"
version = "2.0.0"
authors = ["Matt Bilker <me@mbilker.us>"]
description = "An encoder/decoder for Konami's binary XML format used in many of their games."
edition = "2018"
[dependencies]
anyhow = "1.0.19"
byteorder = "1.3.2"
clap = "2.32.0"
encoding_rs = "0.8.6"
kbinxml = { path = "../kbinxml" }
pretty_env_logger = "0.3.0"
[[bin]]
name = "kbinxml"
path = "src/main.rs"