Update README.md

This commit is contained in:
Yoshifumi Kawai 2023-03-07 17:14:46 +09:00 committed by GitHub
parent 09f3bd07b8
commit 360f63f455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,8 +80,9 @@ cc::Build::new().file("lz4.c").compile("lz4");
// csbindgen code, generate both rust ffi and C# dll import // csbindgen code, generate both rust ffi and C# dll import
csbindgen::Builder::default() csbindgen::Builder::default()
.input_bindgen_file("lz4.rs") // read from bindgen generated code .input_bindgen_file("lz4.rs") // read from bindgen generated code
.rust_file_header("use super::lz4;") .rust_file_header("use super::lz4;") // import bindgen struct
.csharp_entry_point_prefix("csbindgen_") .rust_method_type_path("lz4") // invoke bindgen method
.csharp_entry_point_prefix("csbindgen_") // adjust same signature of rust method and C# EntryPoint
.csharp_dll_name("liblz4") .csharp_dll_name("liblz4")
.generate_to_file("lz4_ffi.rs", "../dotnet/NativeMethods.lz4.g.cs") .generate_to_file("lz4_ffi.rs", "../dotnet/NativeMethods.lz4.g.cs")
.unwrap(); .unwrap();