#wit #csharp #module-linking #interface-types #bindgen #wasi #wasmtime #webassembly

wit-bindgen-csharp

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

7 releases (breaking)

0.18.0 Feb 13, 2024
0.17.1 Feb 13, 2024
0.16.0 Dec 5, 2023
0.15.0 Nov 27, 2023
0.13.1 Oct 30, 2023

#1504 in WebAssembly

Download history 23/week @ 2023-11-01 116/week @ 2023-11-08 76/week @ 2023-11-15 119/week @ 2023-11-22 150/week @ 2023-11-29 145/week @ 2023-12-06 67/week @ 2023-12-13 60/week @ 2023-12-20 32/week @ 2023-12-27 33/week @ 2024-01-03 66/week @ 2024-01-10 39/week @ 2024-01-17 49/week @ 2024-01-24 103/week @ 2024-01-31 123/week @ 2024-02-07 287/week @ 2024-02-14

568 downloads per month
Used in 2 crates

Apache-2.0 WITH LLVM-exception

190KB
4K 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
~117K SLoC