servicepoint/servicepoint2-binding-cs/build.rs
Vinzenz Schroeter 1dad113ca1 a bunch of minor changes combined:
- From instead of Into
- unsafe_data_ref for other payloads
- CByteSlice for returning memory spans
- send Packet instead of Into<Packet>
- expose packet layer to C/C#
2024-05-15 20:34:51 +02:00

20 lines
952 B
Rust

fn main() {
println!("cargo:rerun-if-changed=DOESNOTEXIST"); // rebuild every time
csbindgen::Builder::default()
.input_extern_file("../servicepoint2/src/bit_vec.rs")
.input_extern_file("../servicepoint2/src/byte_grid.rs")
.input_extern_file("../servicepoint2/src/command.rs")
.input_extern_file("../servicepoint2/src/compression_code.rs")
.input_extern_file("../servicepoint2/src/connection.rs")
.input_extern_file("../servicepoint2/src/pixel_grid.rs")
.input_extern_file("../servicepoint2/src/lib.rs")
.input_extern_file("../servicepoint2/src/c_slice.rs")
.input_extern_file("../servicepoint2/src/packet.rs")
.csharp_dll_name("servicepoint2")
.csharp_namespace("ServicePoint2.BindGen")
.csharp_use_nint_types(true)
.csharp_class_accessibility("public")
.generate_csharp_file("src/BindGen/ServicePoint2.g.cs")
.unwrap();
}