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)",
]
[[package]]
name = "fimfareader-cli"
version = "0.1.0"
dependencies = [
"fimfareader 0.1.0",
]
[[package]]
name = "flate2"
version = "1.0.11"

View file

@ -4,6 +4,11 @@ version = "0.1.0"
authors = ["Joakim Soderlund <joakim.soderlund@gmail.com>"]
edition = "2018"
[workspace]
members = [
"cli",
]
[profile.release]
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.
pub mod archive;
pub mod error;
pub mod query;
use std::env::args;
use std::io::stdin;
use std::io::stdout;
use std::io::Write;
use std::time::Instant;
use crate::archive::Fetcher;
use crate::error::Error;
use crate::query::parse;
use fimfareader::archive::Fetcher;
use fimfareader::error::Error;
use fimfareader::query::parse;
fn exit(error: 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;