ByteBulletin

[tooling] · · 1 min read

Rust fec crate brings faster forward error correction to SDR and satellite links

A new Rust library, fec, implements CCSDS-standard convolutional and Reed-Solomon codes with SIMD acceleration that outperforms the reference C library in every benchmark.

By ByteBulletin Editors · Editorial Team


Forward error correction is the invisible glue that keeps satellite and software-defined radio links intelligible under noise. A new Rust crate, fec, aims to replace the aging C libraries that have long dominated this niche, offering bit-compatible codes with dramatically better performance on modern hardware.

fec implements two error-correcting codes that are ubiquitous in SDR and spacecraft communications: the Viterbi-decoded convolutional code and Reed-Solomon block codes. The implementation follows the CCSDS standard (131.0-B) for parameters, including the dual-basis transform used in real spacecraft telemetry, and is bit-compatible with Phil Karn's widely used libfec C library. That means data encoded with fec can be decoded by libfec and vice versa — a crucial feature for drop-in adoption.

The headline feature is speed. In benchmarks reported by the author, fec with its SIMD feature decodes faster than libfec on every test case. Notably, libfec's fastest convolutional build is a 32-bit binary that relies on SSE2 assembly; a 64-bit build of libfec has no SIMD path at all. fec's SIMD kernels work on both 32-bit and 64-bit targets, and on a Zen4 laptop (Ryzen 7840HS) the Rust crate outperforms the C library across the board. Reed-Solomon decoding also benefits from the implementation's efficient design, even without SIMD.

For developers integrating error correction into existing C codebases, the companion fec-shim crate exposes fec under libfec's C ABI, providing functions like init_rs_char and create_viterbi27 as a drop-in replacement. This lowers the barrier to adopting a faster, memory-safe implementation without rewriting existing infrastructure.

SHARE

← All stories