Skip to content

.Net 8.0 webassembly starter project using raylib-cs nuget and raylib 5.0

License

Notifications You must be signed in to change notification settings

Kiriller12/RaylibWasm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RaylibWasm

.Net 8.0 webasssembly starter project using Raylib-cs nuget.

I've followed DotnetRaylibWasm example project and some official Microsoft documentation.

Setup

You must have .Net 8.0 installed before start.

Then install wasm toolset:

dotnet workload install wasm-tools

Build

You should use publish option for building.

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.0 (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

About

.Net 8.0 webassembly starter project using raylib-cs nuget and raylib 5.0

Topics

Resources

License

Stars

Watchers

Forks