From 09ef58a3049bca39b8e0d319bcda5d0f29b43d78 Mon Sep 17 00:00:00 2001 From: Nicholas Maselli Date: Thu, 27 Apr 2023 11:30:35 -0400 Subject: [PATCH] Update README.md --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7d626c5..ddfba62 100644 --- a/README.md +++ b/README.md @@ -47,11 +47,13 @@ pub extern "C" fn my_add(x: i32, y: i32) -> i32 { Setup csbindgen code to `build.rs`. ```rust -csbindgen::Builder::default() - .input_extern_file("lib.rs") - .csharp_dll_name("nativelib") - .generate_csharp_file("../dotnet/NativeMethods.g.cs") - .unwrap(); +fn main() { + csbindgen::Builder::default() + .input_extern_file("lib.rs") + .csharp_dll_name("nativelib") + .generate_csharp_file("../dotnet/NativeMethods.g.cs") + .unwrap(); +} ``` It will generate this C# code.