I get some low level errors when building for Windows.
cargo build --target x86_64-pc-windows-gnu --release Compiling lunatic v0.11.4 error[E0512]: cannot transmute between types of different sizes, or dependently-sized types --> /home/jack/.cargo/registry/src/github.com-1ecc6299db9ec823/lunatic-0.11.4/src/mailbox.rs:312:51 | 312 | let function: fn(C, Mailbox<M, S>) = unsafe { std::mem::transmute(function) }; | ^^^^^^^^^^^^^^^^^^^ | = note: source type:
i32(32 bits) = note: target type:
fn(C, Mailbox<M, S>)` (64 bits)
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> /home/jack/.cargo/registry/src/github.com-1ecc6299db9ec823/lunatic-0.11.4/src/host/mod.rs:73:38
|
73 | let function: fn(i32) = unsafe { std::mem::transmute(function) };
| ^^^^^^^^^^^^^^^^^^^
|
= note: source type: i32
(32 bits)
= note: target type: fn(i32)
(64 bits)
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> /home/jack/.cargo/registry/src/github.com-1ecc6299db9ec823/lunatic-0.11.4/src/process.rs:321:18
|
321 | unsafe { std::mem::transmute(entry) };
| ^^^^^^^^^^^^^^^^^^^
|
= note: source type: i32
(32 bits)
= note: target type: fn(ProcessRef<T>, <T as AbstractProcess>::Arg) -> <T as AbstractProcess>::State
(64 bits)
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> /home/jack/.cargo/registry/src/github.com-1ecc6299db9ec823/lunatic-0.11.4/src/process.rs:352:70
|
352 | let handler: fn(state: &mut T::State) = unsafe { std::mem::transmute(handler) };
| ^^^^^^^^^^^^^^^^^^^
|
= note: source type: i32
(32 bits)
= note: target type: for<'r> fn(&'r mut <T as AbstractProcess>::State)
(64 bits)
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> /home/jack/.cargo/registry/src/github.com-1ecc6299db9ec823/lunatic-0.11.4/src/process.rs:357:34
|
357 | unsafe { std::mem::transmute(handler) };
| ^^^^^^^^^^^^^^^^^^^
|
= note: source type: i32
(32 bits)
= note: target type: for<'r> fn(&'r mut <T as AbstractProcess>::State, Process<()>)
(64 bits)
error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
--> /home/jack/.cargo/registry/src/github.com-1ecc6299db9ec823/lunatic-0.11.4/src/protocol.rs:303:52
|
303 | let function: fn(C, Protocol<P, S>) = unsafe { std::mem::transmute(function) };
| ^^^^^^^^^^^^^^^^^^^
|
= note: source type: i32
(32 bits)
= note: target type: fn(C, Protocol<P, S>)
(64 bits)
For more information about this error, try rustc --explain E0512
.
error: could not compile lunatic
due to 6 previous errors
`
Since Im new to rust I don't dare to debug the code since its unsafe. App is working fine on Linux, error only appears when building for windows.