RaylibWasm
.Net 10 (.Net 8+) webassembly starter project using raylib-cs nuget 7.0.2 and raylib 5.5
Install / Use
/learn @Kiriller12/RaylibWasmREADME
RaylibWasm
.Net 8+ webasssembly starter project using raylib-cs nuget.
I've followed DotnetRaylibWasm example project and some official Microsoft documentation.
[!IMPORTANT] Please read the instructions below for building and publishing the project, as this may affect its functionality and cause unexpected errors.
Supported .Net versions
[!IMPORTANT] The project has been updated to .Net 10 ("main" branch), .Net 8 version is available in the "net-8" branch.
Setup
You must have .Net 8+ installed before start.
Then install wasm toolset:
dotnet workload install wasm-tools
Build
[!WARNING] Do not use Visual Studio publication, it may cause some strange errors!
Just call this command from the root directory of the solution:
dotnet publish -c Release
Run
You could use whatever web-server you want to serve published files.
OR
You could also use dotnet serve for this purpose:
If it's not installed, you need to install it with this command:
dotnet tool install --global dotnet-serve
And then just call this command to start web server for your build:
dotnet serve --mime .wasm=application/wasm --mime .js=text/javascript --mime .json=application/json --directory RaylibWasm\bin\Release\net8.0\browser-wasm\AppBundle\
While server is running you can use publish command to update your files without any need to restart server.
Notes
This project includes webassembly build of raylib native 5.5 (raylib.a file), because it is not included with raylib-cs nuget.
Raylib-cs may still have some webassembly compatibility issues that have been mentioned here and here.
This project is not perfect, so I would welcome your suggestions and PR requests.
Thanks
- to Ray and all raylib contributors for such a wonderful lib
- to ChrisDill for raylib C# bindings
- to stanoddly for dotnet webassembly example project
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
