nextpnr/rust/example_printnets/src/lib.rs

10 lines
240 B
Rust
Raw Normal View History

2025-09-25 10:09:55 +02:00
use nextpnr::Context;
2023-12-08 18:36:48 +01:00
#[no_mangle]
pub extern "C" fn rust_example_printnets(ctx: &mut Context) {
println!("Nets in design:");
2025-09-25 10:09:55 +02:00
for (name, _net) in &ctx.nets() {
2023-12-08 18:36:48 +01:00
println!(" {}", ctx.name_of(name).to_str().unwrap());
}
}