This is a Rust port of Microsoft/wsl-plugin-sample.
- Install Rust
- Install Clang
- Download the WSL Plugin header from Nuget
- Unzip the .nupkg file and copy
build\native\include\WslPluginApi.h
towsl-plugin-api-sys\include\WslPluginApi.h
- Unzip the .nupkg file and copy
cargo build
- Open a Visual Studio Developer Command Prompt as administrator and sign the plugin
cd path\to\wsl-plugin-sample-rust powershell .\scripts\sign-plugin.ps1 -Trust
- Register the plugin
.\scripts\register.cmd
- Stop the wslservice to load the plugin
.\scripts\stop-wsl.cmd
- Once loaded, open
C:\wsl-plugin-demo.txt
to see the plugin output