kimchi_napi/wrappers/
wires.rs1use kimchi::circuits::wires::Wire;
2use napi_derive::napi;
3
4#[napi(object)]
5#[derive(Clone, Copy, Debug, Default)]
6pub struct NapiWire {
7 pub row: u32,
8 pub col: u32,
9}
10
11impl From<NapiWire> for Wire {
12 fn from(value: NapiWire) -> Self {
13 Wire {
14 row: value.row as usize,
15 col: value.col as usize,
16 }
17 }
18}
19
20impl From<Wire> for NapiWire {
21 fn from(value: Wire) -> Self {
22 Self {
23 row: value.row as u32,
24 col: value.col as u32,
25 }
26 }
27}