set up building main bin with feature
This commit is contained in:
parent
480a9f72fb
commit
22095ec627
4 changed files with 6 additions and 9 deletions
|
@ -6,17 +6,12 @@ autobins = true
|
|||
|
||||
[features]
|
||||
default = []
|
||||
algorithms = []
|
||||
|
||||
[[bin]]
|
||||
name = "sha256sum"
|
||||
path = "src/bin/sha256sum.rs"
|
||||
required-features = []
|
||||
all-algorithms = []
|
||||
|
||||
[[bin]]
|
||||
name = "picca"
|
||||
path = "src/bin/picca.rs"
|
||||
required-features = ["algorithms"]
|
||||
required-features = ["all-algorithms"]
|
||||
|
||||
[dependencies]
|
||||
sha2 = "0.10.9"
|
||||
|
|
2
Justfile
2
Justfile
|
@ -14,10 +14,12 @@ default: build-docker build-release doc
|
|||
# main build
|
||||
build-release:
|
||||
cargo build --release
|
||||
cargo build --release --bin picca --features all-algorithms
|
||||
|
||||
# debug build
|
||||
build-debug:
|
||||
cargo build
|
||||
cargo build --bin picca --features all-algorithms
|
||||
|
||||
# build docker images locally
|
||||
build-docker: clean
|
||||
|
|
|
@ -6,7 +6,7 @@ WORKDIR /usr/src/picca
|
|||
COPY . .
|
||||
|
||||
RUN apk upgrade --no-cache && apk add musl-dev
|
||||
RUN cargo install --path . && cargo clean
|
||||
RUN cargo install --path . --bin picca --features all-algorithms && cargo clean
|
||||
|
||||
FROM alpine:3 AS package
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ pub struct Args {
|
|||
)]
|
||||
pub debug: bool,
|
||||
|
||||
#[cfg(feature = "algorithms")]
|
||||
#[cfg(feature = "all-algorithms")]
|
||||
#[arg(
|
||||
short,
|
||||
long,
|
||||
|
|
Loading…
Add table
Reference in a new issue