conditional compile for executable
This commit is contained in:
@@ -11,6 +11,10 @@ license = "Apache-2.0"
|
|||||||
keywords = ["hash", "console", "cli", "stream"]
|
keywords = ["hash", "console", "cli", "stream"]
|
||||||
categories = ["command-line-utilities", "development-tools"]
|
categories = ["command-line-utilities", "development-tools"]
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["nobin"]
|
||||||
|
nobin = []
|
||||||
|
|
||||||
[lints.rust]
|
[lints.rust]
|
||||||
unsafe_code = "forbid"
|
unsafe_code = "forbid"
|
||||||
|
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ mod sha1;
|
|||||||
mod sha256;
|
mod sha256;
|
||||||
mod sha3_256;
|
mod sha3_256;
|
||||||
|
|
||||||
use crate::Args;
|
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
type BITS512 = [u8; 64];
|
type BITS512 = [u8; 64];
|
||||||
|
|||||||
@@ -1,5 +1,2 @@
|
|||||||
mod args;
|
|
||||||
pub use args::Args;
|
|
||||||
|
|
||||||
mod hashes;
|
mod hashes;
|
||||||
mod hex_table;
|
mod hex_table;
|
||||||
|
|||||||
11
src/main.rs
11
src/main.rs
@@ -1,9 +1,10 @@
|
|||||||
use clap::Parser;
|
#![cfg(not(feature = "nobin"))]
|
||||||
use hashstream::Args;
|
|
||||||
|
mod args;
|
||||||
|
use args::Args;
|
||||||
|
|
||||||
|
use clap::Parser;
|
||||||
|
|
||||||
pub struct Hashes {
|
|
||||||
hashes: Args,
|
|
||||||
}
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let args = Args::parse();
|
let args = Args::parse();
|
||||||
println!("Hello, world!");
|
println!("Hello, world!");
|
||||||
|
|||||||
Reference in New Issue
Block a user