Use workspaces to separate crates

This commit is contained in:
RJ Rybarczyk 2019-11-15 02:44:30 +00:00
parent 2afd53148f
commit 88fef649b1
76 changed files with 46 additions and 40 deletions

View file

@ -14,8 +14,8 @@ script:
- RUSTFLAGS="-C link-dead-code" cargo build --verbose
- rm -f target/debug/lightning-* # Make sure we drop old test binaries
- RUSTFLAGS="-C link-dead-code" cargo test --verbose
- if [ "$(rustup show | grep default | grep 1.34.2)" != "" ]; then cd fuzz && cargo test --verbose && ./travis-fuzz.sh; fi
- if [ "$(rustup show | grep default | grep stable)" != "" ]; then cd net-tokio && cargo build --verbose && cd ..; fi
- if [ "$(rustup show | grep default | grep 1.34.2)" != "" ]; then cd lightning/fuzz && cargo test --verbose && ./travis-fuzz.sh; fi
- if [ "$(rustup show | grep default | grep stable)" != "" ]; then cd lightning-net-tokio && cargo build --verbose && cd ..; fi
- if [ "$(rustup show | grep default | grep stable)" != "" ]; then
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
tar xzf master.tar.gz &&

View file

@ -1,38 +1,6 @@
[package]
name = "lightning"
version = "0.0.9"
authors = ["Matt Corallo"]
license = "Apache-2.0"
repository = "https://github.com/rust-bitcoin/rust-lightning/"
description = """
A Bitcoin Lightning library in Rust.
Does most of the hard work, without implying a specific runtime, requiring clients implement basic network logic, chain interactions and disk storage.
Still missing tons of error-handling. See GitHub issues for suggested projects if you want to contribute. Don't have to bother telling you not to use this for anything serious, because you'd have to build a client around it to even try.
"""
[workspace]
[features]
# Supports tracking channels with a non-bitcoin chain hashes. Currently enables all kinds of fun DoS attacks.
non_bitcoin_chain_hash_routing = []
fuzztarget = ["secp256k1/fuzztarget", "bitcoin/fuzztarget", "bitcoin_hashes/fuzztarget"]
# Unlog messages superior at targeted level.
max_level_off = []
max_level_error = []
max_level_warn = []
max_level_info = []
max_level_debug = []
[dependencies]
bitcoin = "0.20"
bitcoin_hashes = "0.7"
secp256k1 = "0.15"
[dev-dependencies.bitcoin]
version = "0.20"
features = ["bitcoinconsensus"]
[dev-dependencies]
hex = "0.3"
rand = "0.4"
[profile.dev]
opt-level = 1
members = [
"lightning",
"lightning-net-tokio",
]

View file

@ -11,7 +11,7 @@ For Rust-Lightning clients which wish to make direct connections to Lightning P2
[dependencies]
bitcoin = "0.20"
bitcoin_hashes = "0.7"
lightning = { version = "0.0.9", path = "../" }
lightning = { version = "0.0.9", path = "../lightning" }
secp256k1 = "0.15"
tokio-codec = "0.1"
futures = "0.1"

38
lightning/Cargo.toml Normal file
View file

@ -0,0 +1,38 @@
[package]
name = "lightning"
version = "0.0.9"
authors = ["Matt Corallo"]
license = "Apache-2.0"
repository = "https://github.com/rust-bitcoin/rust-lightning/"
description = """
A Bitcoin Lightning library in Rust.
Does most of the hard work, without implying a specific runtime, requiring clients implement basic network logic, chain interactions and disk storage.
Still missing tons of error-handling. See GitHub issues for suggested projects if you want to contribute. Don't have to bother telling you not to use this for anything serious, because you'd have to build a client around it to even try.
"""
[features]
# Supports tracking channels with a non-bitcoin chain hashes. Currently enables all kinds of fun DoS attacks.
non_bitcoin_chain_hash_routing = []
fuzztarget = ["secp256k1/fuzztarget", "bitcoin/fuzztarget", "bitcoin_hashes/fuzztarget"]
# Unlog messages superior at targeted level.
max_level_off = []
max_level_error = []
max_level_warn = []
max_level_info = []
max_level_debug = []
[dependencies]
bitcoin = "0.20"
bitcoin_hashes = "0.7"
secp256k1 = "0.15"
[dev-dependencies.bitcoin]
version = "0.20"
features = ["bitcoinconsensus"]
[dev-dependencies]
hex = "0.3"
rand = "0.4"
[profile.dev]
opt-level = 1