Skip to content

Commit

Permalink
cargo toml (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ad96el authored Feb 22, 2024
1 parent 9ea3ab9 commit 5d456e3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@ tokio = {version = "1", features = ["full"]}
uuid = {version = "1.4.1", features = ["v4", "serde"]}

[features]
default = []
peregrine = []
spiritnet = []

[[bin]]
features = ["spiritnet"]
name = "attester_spiritnet"
path = "src/main.rs"
required-features = ["spiritnet"]

[[bin]]
name = "attester_peregrine"
path = "src/main.rs"
required-features = ["peregrine"]
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ WORKDIR /app
COPY . /app/

# Build backend
RUN cargo build --release --bins
RUN cargo build --release --features=peregrine --bin=attester_peregrine
RUN cargo build --release --features=spiritnet --bin=attester_spiritnet

# Final Stage
FROM rust:slim-buster
Expand Down
4 changes: 2 additions & 2 deletions src/kilt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ pub mod runtime {}
#[cfg(feature = "spiritnet")]
pub type RuntimeCall = runtime::runtime_types::spiritnet_runtime::RuntimeCall;

#[cfg(not(feature = "spiritnet"))]
#[cfg(feature = "peregrine")]
#[subxt::subxt(runtime_metadata_path = "metadata_peregrine_11210.scale")]
pub mod runtime {}

#[cfg(not(feature = "spiritnet"))]
#[cfg(feature = "peregrine")]
pub type RuntimeCall = runtime::runtime_types::peregrine_runtime::RuntimeCall;

#[derive(Clone, Debug, Default, Eq, PartialEq)]
Expand Down

0 comments on commit 5d456e3

Please sign in to comment.