Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Rust bindings for SoapySDR

SoapySDR provides a hardware abstraction layer for many software defined radio devices.

API Documentation | crates.io | Changelog

Dependencies

This library requires dependencies not handled by Cargo:

  • libsoapysdr 0.8.x
  • pkg-config (Linux and macOS only)

Ubuntu

(Tested on Ubuntu 24.04)

sudo apt install libsoapysdr-dev pkg-config

# Choose the appropriate drivers for your hardware:
sudo apt install soapysdr-module-rtlsdr soapysdr-module-hackrf soapysdr-module-uhd soapysdr-module-lms7

Nix

soapysdr-with-plugins and pkg-config

(see shell.nix)

Windows

Install pre-built PothosSDR and add PothosSDR bin directory to system PATH.

MacOS

Install SoapySDR with Homebrew:

brew install pkg-config
brew tap pothosware/homebrew-pothos
brew update

# Then install the appropriate packages for your hardware:
brew install soapyrtlsdr
brew install soapyhackrf
brew install soapybladerf
# ...

Warning

Many SoapySDR driver modules have error handling and thread safety bugs. This library provides safe Rust wrappers assuming the drivers meet the (under-documented) intentions of the SoapySDR core API contract, but if SoapySDR loads modules that violate this contract and you do atypical things with them, you may encounter unexpected behavior. For details, see this SoapySDR issue.

Examples

This crate comes with two small utilities that serve as example code.

soapy-sdr-info

Displays device details like SoapySDRUtil.

cargo run --release --example soapy-sdr-info

soapy-sdr-stream

Records data from a device.

e.g. capture 15 seconds of data from the FM band:

cargo run --release --example soapy-sdr-stream -- -d driver=rtlsdr -r out.cfile -f 96M -s 1M -n 15M

The resulting file contains 32-bit little-endian complex float samples, and can be opened with inspectrum.

License

Licensed under either of

关于 About

Rust bindings for SoapySDR, the vendor-neutral software defined radio hardware abstraction layer
rust-bindingssdrsoapysdrsoftware-defined-radio

语言 Languages

Rust99.8%
C0.1%
Nix0.1%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
39
Total Commits
峰值: 11次/周
Less
More

核心贡献者 Contributors