Libftd2xx
Rust safe wrappers for the libftd2xx drivers
Install / Use
/learn @ftdi-rs/Libftd2xxREADME
libftd2xx
Rust safe wrapper for the FTDI D2XX drivers.
This takes the libftd2xx-ffi C bindings crate and extends it with rust safe wrappers.
Usage
Simply add this crate as a dependency in your Cargo.toml.
[dependencies.libftd2xx]
version = "0.33.1"
# statically link the vendor library, defaults to dynamic if not set
# this will make things "just work" on Linux and Windows
features = ["static"]
This is a basic example to get your started. Check the source code or documentation for more examples.
use libftd2xx::{Ftdi, FtdiCommon};
let mut ft = Ftdi::new()?;
let info = ft.device_info()?;
println!("Device information: {:?}", info);
This crate is just a wrapper around the FTD2XX driver; I2C, SPI, and GPIO
examples using the embedded-hal traits can be found in
ftdi-embedded-hal.
udev rules
To access the FTDI USB device as a regular user on Linux you need to update the udev rules.
Create a file called /etc/udev/rules.d/99-ftdi.rules with:
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6011", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", MODE="0666"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", MODE="0666"
Then, reload the rules:
sudo udevadm control --reload-rules
sudo udevadm trigger
Linking
By default this crate with use dynamic linking for the vendor library.
Use the static feature flag to enable static linking.
Dynamic Linking on Linux
The shared object libftd2xx.so must exist on your system.
See FTDI Drivers Installation Guide for Linux for instructions.
Dynamic Linking on Windows
The FTD2XX DLL must exist on your system PATH. The easiest way to install this is with the vendor provided setup executable.
Static Linking on Linux or Windows
No special considerations are needed, the static library is distributed with permission from FTDI in the libftd2xx-ffi crate.
References
Troubleshooting
Unknown Device on Linux
Remove the VCP FTDI driver.
sudo rmmod ftdi_sio
sudo rmmod usbserial
See FTDI Drivers Installation Guide for Linux for more details.
Related Skills
himalaya
339.3kCLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language).
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
coding-agent
339.3kDelegate coding tasks to Codex, Claude Code, or Pi agents via background process
