#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

#1487 in WebAssembly

Download history 18/week @ 2024-01-07 20/week @ 2024-01-14 10/week @ 2024-01-21 6/week @ 2024-01-28 70/week @ 2024-02-04 155/week @ 2024-02-11 271/week @ 2024-02-18 521/week @ 2024-02-25 277/week @ 2024-03-03 231/week @ 2024-03-10 58/week @ 2024-03-17 180/week @ 2024-03-24 303/week @ 2024-03-31 101/week @ 2024-04-07 27/week @ 2024-04-14

622 downloads per month
Used in 2 crates

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