Skip to content

Commit 45a3489

Browse files
committed
fix compilation errors
1 parent 869d68b commit 45a3489

File tree

8 files changed

+27
-17
lines changed

8 files changed

+27
-17
lines changed

.github/workflows/rust.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Install Linux dependencies
2222
run: |
2323
sudo apt update
24-
sudo apt-get install -y --no-install-recommends libsoapysdr-dev protobuf-compiler
24+
sudo apt-get install -y --no-install-recommends libiio-dev libsoapysdr-dev protobuf-compiler
2525
2626
- name: Code linting
2727
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
@@ -30,7 +30,7 @@ jobs:
3030
run: cargo fmt --all --check
3131

3232
- name: Build
33-
run: cargo build --verbose --release
33+
run: cargo build --verbose --release --all-features
3434

3535
- name: Run tests, examples and benchmarks
3636
run: cargo test --workspace --all-features --all-targets

crates/jet1090/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ratatui = "0.29.0"
3535
redis = { version = "1.0.1", features = ["tokio-comp"] }
3636
regex = "1.12.2"
3737
reqwest = { version = "0.12.26", default-features = false, features = ["rustls-tls"] }
38-
rs1090 = { version = "0.4.15", path = "../rs1090", features = ["aircraft"] }
38+
rs1090 = { version = "0.4.15", path = "../rs1090", features = ["aircraft", "sdr"] }
3939
serde = { version = "1.0.228", features = ["derive"] }
4040
serde_json = "1.0.143"
4141
soapysdr = { version = "0.4.4", optional = true }

crates/jet1090/src/source.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ impl Source {
310310
Address::Pluto(config) => {
311311
#[cfg(not(feature = "pluto"))]
312312
{
313-
error!("Compile jet1090 with the pluto feature, {:?} argument ignored", uri);
313+
error!("Compile jet1090 with the pluto feature, {:?} argument ignored", config);
314314
std::process::exit(127);
315315
}
316316
#[cfg(feature = "pluto")]
@@ -332,7 +332,7 @@ impl Source {
332332
Address::Soapy(config) => {
333333
#[cfg(not(feature = "soapy"))]
334334
{
335-
error!("Compile jet1090 with the soapy feature, {:?} argument ignored", args);
335+
error!("Compile jet1090 with the soapy feature, {:?} argument ignored", config);
336336
std::process::exit(127);
337337
}
338338
#[cfg(feature = "soapy")]

crates/rs1090/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ edition.workspace = true
1111

1212
[features]
1313
aircraft = ['dirs', 'reqwest', 'rusqlite', 'zip']
14-
rtlsdr = ['desperado/rtlsdr']
15-
pluto = ['desperado/pluto']
16-
soapy = ['desperado/soapy']
14+
rtlsdr = ['sdr', 'desperado/rtlsdr']
15+
pluto = ['sdr', 'desperado/pluto']
16+
soapy = ['sdr', 'desperado/soapy']
17+
sdr = ['dep:desperado']
1718
sero = ['prost', 'tonic', 'tonic-prost', 'dirs', 'reqwest']
1819
ssh = ['async-recursion', 'bytes', 'dirs', 'http', 'hyper-util', 'makiko', 'ssh2-config', 'tower']
1920

@@ -22,7 +23,7 @@ ansi_term = "0.12.1"
2223
async-recursion = { version = "1.1.1", optional = true }
2324
async-stream = "0.3.6"
2425
bytes = { version = "1.11.0", optional = true }
25-
desperado = "0.1.2"
26+
desperado = { version = "0.1.2", optional = true }
2627
deku = { version = "0.20.2", features = ["logging"] }
2728
dirs = { version = "6.0.0", optional = true }
2829
futures = "0.3.31"

crates/rs1090/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pub mod prelude {
3131
#[cfg(not(target_arch = "wasm32"))]
3232
pub use crate::source::beast;
3333

34+
#[cfg(feature = "sdr")]
3435
pub use crate::source::iqread;
3536

3637
#[cfg(feature = "sero")]

crates/rs1090/src/source/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#[cfg(not(target_arch = "wasm32"))]
22
pub mod beast;
33

4+
#[cfg(feature = "sdr")]
45
pub mod iqread;
56

67
#[cfg(feature = "sero")]

dist-workspace.toml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,20 @@ installers = ["shell", "powershell", "homebrew"]
1212
# A GitHub repo to push Homebrew formulas to
1313
tap = "xoolive/homebrew-homebrew"
1414
# Target platforms to build apps for (Rust target-triple syntax)
15-
targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
15+
targets = [
16+
"aarch64-apple-darwin",
17+
"aarch64-unknown-linux-gnu",
18+
"x86_64-apple-darwin",
19+
"x86_64-unknown-linux-gnu",
20+
"x86_64-pc-windows-msvc",
21+
]
1622
# Which actions to run on pull requests
1723
pr-run-mode = "plan"
1824
# Publish jobs to run in CI
1925
publish-jobs = ["homebrew"]
2026
# Whether to pass --all-features to cargo build
21-
all-features = true
27+
# all-features = true
28+
features = ["rtlsdr", "sero", "ssh"]
2229
# Path that installers should place binaries in
2330
install-path = "CARGO_HOME"
2431
# Whether to install an updater program
@@ -28,13 +35,13 @@ install-updater = true
2835
github-build-setup = "../release_setup.yml"
2936

3037
[dist.dependencies.apt]
31-
libsoapysdr-dev = "*"
38+
# libsoapysdr-dev = "*"
3239
# soapysdr-module-rtlsdr = "*" # only for running
3340
protobuf-compiler = "*"
3441

3542
[dist.dependencies.homebrew]
36-
soapysdr = { stage = ["build", "run"] }
37-
soapyrtlsdr = { stage = ["run"] }
43+
# soapysdr = { stage = ["build", "run"] }
44+
# soapyrtlsdr = { stage = ["run"] }
3845
protobuf = { stage = ["build"] }
3946

4047
[dist.github-custom-runners]

flake.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@
6666
openssl
6767
python3
6868
bzip2
69-
soapysdr
69+
# soapysdr
7070
protobuf
7171
] ++ lib.optionals pkgs.stdenv.isLinux [
7272
lld
7373
rustPlatform.bindgenHook # issue with stdbool.h on nix flake check
7474
];
7575

7676
buildInputs = with pkgs; [
77-
soapysdr
77+
# soapysdr
7878
] ++ lib.optionals pkgs.stdenv.isDarwin [
7979
libiconv
8080
];
@@ -102,7 +102,7 @@
102102

103103
jet1090 = craneLib.buildPackage (commonArgs // {
104104
pname = "jet1090";
105-
cargoExtraFlags = "--all-features -p jet1090";
105+
cargoExtraFlags = "--features rtlsdr,ssh,sero -p jet1090";
106106
meta.mainProgram = "jet1090";
107107
inherit cargoArtifacts;
108108

0 commit comments

Comments
 (0)