Skip to content

Commit

Permalink
qnap: Make qnap related code conditionally compiled
Browse files Browse the repository at this point in the history
  • Loading branch information
lcruz99 committed Dec 4, 2024
1 parent 0dd6826 commit 03917df
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions ci/build_libtelio.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ def post_qnap_build_wrap_binary_on_qpkg(config, args):
"packages": {
"teliod": {"teliod": "teliod"},
},
"build_args": ("--features", "qnap"),
},
"macos": {
"packages": {
Expand Down
3 changes: 3 additions & 0 deletions clis/teliod/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ dirs = "4.0.0"

[dev-dependencies]
rand = "0.8.5"

[features]
qnap = []
3 changes: 3 additions & 0 deletions clis/teliod/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ mod configure_interface;
mod core_api;
mod daemon;
mod nc;
#[cfg(feature = "qnap")]
mod qnap;

use crate::{
Expand All @@ -45,6 +46,7 @@ enum Cmd {
Daemon { config_path: String },
#[clap(flatten)]
Client(ClientCmd),
#[cfg(feature = "qnap")]
#[clap(about = "Receive and parse http requests")]
Cgi,
}
Expand Down Expand Up @@ -137,6 +139,7 @@ async fn main() -> Result<(), TeliodError> {
Err(TeliodError::DaemonIsNotRunning)
}
}
#[cfg(feature = "qnap")]
Cmd::Cgi => {
qnap::parse_cgi();
Ok(())
Expand Down

0 comments on commit 03917df

Please sign in to comment.