| Crates.io | tdms-rs |
| lib.rs | tdms-rs |
| version | 2.0.0 |
| created_at | 2026-01-09 09:39:18.193393+00 |
| updated_at | 2026-01-16 07:23:41.877326+00 |
| description | Pure Rust library for reading and writing National Instruments TDMS files with full format support and ergonomic APIs |
| homepage | https://github.com/robingkn/tdms-rs |
| repository | https://github.com/robingkn/tdms-rs |
| max_upload_size | |
| id | 2031874 |
| size | 143,335 |
A pure Rust library for reading and writing National Instruments TDMS (Technical Data Management Streaming) files with high performance and zero-copy capabilities.
use tdms_rs::TdmsFile;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let file = TdmsFile::open("data.tdms")?;
let group = file.group("Sensors").ok_or("Group not found")?;
let channel = group.channel("Temperature").ok_or("Channel not found")?;
let mut data = vec![0.0f64; channel.len()];
channel.read(0..channel.len(), &mut data)?;
println!("Read {} samples", data.len());
Ok(())
}
use tdms_rs::TdmsWriter;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut writer = TdmsWriter::create("output.tdms")?;
let mut group = writer.add_group("DAQ")?;
let mut channel = group.add_channel::<f64>("Voltage")?;
channel.write(&[1.0, 2.0, 3.0])?;
writer.close()?;
Ok(())
}
unsafe memory operations.Licensed under either of Apache License 2.0 or MIT License at your option.