Skip to content

Commit

Permalink
Split library and binary (ordinals#1273)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Jan 18, 2023
1 parent a082b40 commit 24110af
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ edition = "2021"
autotests = false
homepage = "https://github.com/casey/ord"
repository = "https://github.com/casey/ord"
autobins = false

[workspace]
members = [".", "test-bitcoincore-rpc"]
Expand Down Expand Up @@ -57,6 +58,14 @@ reqwest = { version = "0.11.10", features = ["blocking"] }
test-bitcoincore-rpc = { path = "test-bitcoincore-rpc" }
unindent = "0.1.7"

[[bin]]
name = "ord"
path = "src/bin/main.rs"

[lib]
name = "ord"
path = "src/lib.rs"

[[test]]
name = "integration"
path = "tests/lib.rs"
Expand Down
3 changes: 3 additions & 0 deletions src/bin/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
ord::main();
}
2 changes: 1 addition & 1 deletion src/main.rs → src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fn timestamp(seconds: u32) -> NaiveDateTime {
NaiveDateTime::from_timestamp_opt(seconds.into(), 0).unwrap()
}

fn main() {
pub fn main() {
env_logger::init();

ctrlc::set_handler(move || {
Expand Down

0 comments on commit 24110af

Please sign in to comment.