#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

14 releases (breaking)

0.24.0 Apr 2, 2024
0.23.0 Mar 27, 2024
0.22.0 Mar 11, 2024
0.16.0 Dec 5, 2023
0.15.0 Nov 27, 2023

#1519 in WebAssembly

Download history 10/week @ 2024-01-24 54/week @ 2024-01-31 63/week @ 2024-02-07 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 71/week @ 2024-05-08

652 downloads per month
Used in wit-bindgen-cli

Apache-2.0 WITH LLVM-exception

205KB
4.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

~7MB
~119K SLoC