Registry / other / rust-hdl

rust-hdl

JSON →
library0.46.0rscratesunverified

Write firmware for FPGAs in Rust using a hardware description language embedded in Rust.

# Cargo.toml [dependencies] rust-hdl = "0.46.0"
INSTALL
IMPORT
SIG · RUST-HDL
R
rust-hdl
otherrustv0.46.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rust_hdl
use rust_hdl::prelude::*;

Defines a simple FPGA circuit using rust-hdl.

use rust_hdl::prelude::*; #[derive(LogicBlock)] struct Blinky { clock: Signal<In, Clock>, led: Signal<Out, Bit>, } impl Logic for Blinky { #[hdl_gen] fn update(&mut self) { self.led.next = self.clock.val; } } fn main() { let mut blinky = Blinky { clock: Signal::default(), led: Signal::default(), }; blinky.connect_all(); println!("Blinky circuit created"); }
Debug
Known issues
gotchaRequires nightly Rust and specific target
fix
Use nightly Rust and add target 'riscv32imac-unknown-none-elf'
affects: >=0.40.0
Upgrade
Version history
0.46.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
rust-hdl — cargo add rust-hdl · libregistry