#wasm-interface #bindings-generator #wasm-bindings #wit-bindgen #component #c-sharp #generate

wit-bindgen-csharp

C# bindings generator for WIT and the component model, typically used through the wit-bindgen-cli crate

13 breaking releases

0.26.0 May 30, 2024
0.24.0 Apr 2, 2024
0.23.0 Mar 27, 2024
0.16.0 Dec 5, 2023
0.15.0 Nov 27, 2023

#4 in #c-sharp

Download history 128/week @ 2024-02-14 437/week @ 2024-02-21 543/week @ 2024-02-28 238/week @ 2024-03-06 85/week @ 2024-03-13 54/week @ 2024-03-20 284/week @ 2024-03-27 226/week @ 2024-04-03 77/week @ 2024-04-10 26/week @ 2024-04-17 391/week @ 2024-04-24 159/week @ 2024-05-01 84/week @ 2024-05-08 226/week @ 2024-05-15 95/week @ 2024-05-22 217/week @ 2024-05-29

668 downloads per month
Used in wit-bindgen-cli

Apache-2.0 WITH LLVM-exception

230KB
5K SLoC

// generate the c# and the component meta module

cargo run c-sharp --string-encoding utf8 --out-dir testing-csharp tests/codegen/floats.wit

// to run the runtime tests with Native AOT, you need some additional set up

// install emscripten curl.exe -OL https://github.com/emscripten-core/emsdk/archive/refs/heads/main.zip unzip main.zip cd .\emsdk-main\main\emsdk-main .\emsdk_env.ps1 activate 3.1.23 --permanant

// install wasi-sdk and set env curl.exe -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sdk-20.0.m-mingw.tar.gz | tar xzvf - $env:WASI_SDK_PATH="c:\users\jstur\wasi-sdk-20.0+m"

Dependencies

~6.5MB
~116K SLoC