conditional compile for executable

This commit is contained in:
2025-08-19 00:06:38 -04:00
parent 84688c4062
commit 95fbadfc09
4 changed files with 10 additions and 10 deletions

View File

@@ -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"

View File

@@ -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];

View File

@@ -1,5 +1,2 @@
mod args;
pub use args::Args;
mod hashes; mod hashes;
mod hex_table; mod hex_table;

View File

@@ -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!");