5 releases (breaking)

Uses new Rust 2024

0.5.0-rc Mar 22, 2026
0.4.0 Feb 27, 2026
0.3.0 Feb 19, 2026
0.2.0 Feb 19, 2026
0.1.0 Feb 18, 2026

#1600 in Rust patterns

MIT license

29KB
602 lines

CSPCL - Rust Bindings

Safe Rust bindings for the CubeSat Space Protocol Convergence Layer (CSPCL), enabling Bundle Protocol 7 (BP7) bundles to be transmitted over CubeSat Space Protocol (CSP).

Features

  • Type-safe API - Safe Rust wrappers around C FFI
  • Bundle Send/Receive - Simple interface for BP7 bundle handling
  • Automatic Cleanup - Resource management via RAII (Drop trait)
  • Cross-platform - POSIX (Linux) and FreeRTOS support

Quick Start

Add to Cargo.toml:

[dependencies]
cspcl = "0.1"

Basic usage:

use cspcl::Cspcl;

// Initialize with local CSP address
let mut cspcl = Cspcl::init(1)?;
cspcl.open_rx_socket()?;

// Send bundle to CSP address 2
let bundle = vec![/* BP7 bundle data */];
cspcl.send_bundle(&bundle, 2)?;

// Receive bundle (5 second timeout)
let (data, src_addr) = cspcl.recv_bundle(5000)?;
println!("Received {} bytes from CSP addr {}", data.len(), src_addr);

Documentation

See main repository README for complete documentation and examples.

License

MIT

Dependencies

~0.8–3.5MB
~68K SLoC