-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52c9360
commit f74118e
Showing
1 changed file
with
23 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,38 @@ | ||
## .NET WebAssembly Browser app | ||
## Jitter2 in the browser | ||
|
||
## Build | ||
**Credits for this 'HowTo': https://github.com/disketteman/DotnetRaylibWasm** | ||
|
||
You can build the app from Visual Studio or from the command-line: | ||
## Local setup | ||
|
||
Make sure you have the latest version of .NET 7 for example from [here](https://dotnet.microsoft.com/en-us/download/dotnet/7.0), the prototype was built with: | ||
``` | ||
dotnet build -c Debug/Release | ||
dotnet --version | ||
7.0.100 | ||
``` | ||
|
||
After building the app, the result is in the `bin/$(Configuration)/net8.0/browser-wasm/AppBundle` directory. | ||
Install the official wasm tooling: | ||
|
||
## Run | ||
``` | ||
dotnet workload install wasm-tools | ||
dotnet workload install wasm-experimental | ||
``` | ||
|
||
Install a tool to create ad-hoc http server to serve `application/wasm`: | ||
|
||
``` | ||
dotnet tool install --global dotnet-serve | ||
``` | ||
|
||
## Run it | ||
|
||
You can build the app from Visual Studio or the command-line: | ||
`publish` the solution. Don't use `build`. Publishing may take a while. | ||
|
||
``` | ||
dotnet run -c Debug/Release | ||
dotnet publish -C Release | ||
``` | ||
|
||
Or you can start any static file server from the AppBundle directory: | ||
To serve the files use this command: | ||
|
||
``` | ||
dotnet tool install dotnet-serve | ||
dotnet serve -d:bin/$(Configuration)/net8.0/browser-wasm/AppBundle | ||
dotnet serve --mime .wasm=application/wasm --mime .js=text/javascript --mime .json=application/json --directory ./bin/Debug/net7.0/browser-wasm/AppBundle | ||
``` |