Split crate into a workspace

This commit is contained in:
Joakim Soderlund 2019-08-17 13:19:44 +00:00
parent 67883cc5fb
commit 0df8b3aded
5 changed files with 28 additions and 7 deletions

7
Cargo.lock generated
View file

@ -111,6 +111,13 @@ dependencies = [
"zip 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "zip 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "fimfareader-cli"
version = "0.1.0"
dependencies = [
"fimfareader 0.1.0",
]
[[package]] [[package]]
name = "flate2" name = "flate2"
version = "1.0.11" version = "1.0.11"

View file

@ -4,6 +4,11 @@ version = "0.1.0"
authors = ["Joakim Soderlund <joakim.soderlund@gmail.com>"] authors = ["Joakim Soderlund <joakim.soderlund@gmail.com>"]
edition = "2018" edition = "2018"
[workspace]
members = [
"cli",
]
[profile.release] [profile.release]
lto = true lto = true

8
cli/Cargo.toml Normal file
View file

@ -0,0 +1,8 @@
[package]
name = "fimfareader-cli"
version = "0.1.0"
authors = ["Joakim Soderlund <joakim.soderlund@gmail.com>"]
edition = "2018"
[dependencies.fimfareader]
path = ".."

View file

@ -1,18 +1,14 @@
//! Main module. //! Main module.
pub mod archive;
pub mod error;
pub mod query;
use std::env::args; use std::env::args;
use std::io::stdin; use std::io::stdin;
use std::io::stdout; use std::io::stdout;
use std::io::Write; use std::io::Write;
use std::time::Instant; use std::time::Instant;
use crate::archive::Fetcher; use fimfareader::archive::Fetcher;
use crate::error::Error; use fimfareader::error::Error;
use crate::query::parse; use fimfareader::query::parse;
fn exit(error: Error) -> ! { fn exit(error: Error) -> ! {
eprintln!("{}", error); eprintln!("{}", error);

5
src/lib.rs Normal file
View file

@ -0,0 +1,5 @@
//! Fimfareader.
pub mod archive;
pub mod error;
pub mod query;