https://github.com/kant2002/nativeaotwasm
Sample for WASM and NativeAOT
https://github.com/kant2002/nativeaotwasm
nativeaot wasm webassembly
Last synced: about 1 year ago
JSON representation
Sample for WASM and NativeAOT
- Host: GitHub
- URL: https://github.com/kant2002/nativeaotwasm
- Owner: kant2002
- Created: 2023-02-05T11:31:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-01T20:27:29.000Z (about 3 years ago)
- Last Synced: 2024-10-11T20:39:25.502Z (almost 2 years ago)
- Topics: nativeaot, wasm, webassembly
- Language: HTML
- Homepage:
- Size: 45.9 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Experiments with NativeAOT WASM
===============================
# Well known properties
List of properties which I want to see in the SDK.
- `WasmHasCanvas` enable displaying of canvas on the default template. True by default.
# Well known items
List of properties which I want to see in the SDK. These items mostly to plug additional JS files into MSBuild dependency tracking.
- `EmscriptenPostJs` Allow pass files to `--post-js`.
- `EmscriptenLibrary` Allow pass files to `--js-library`.
# Steps how to add support for NativeAOT-LLVM
Add following block to your project
```xml
false
browser-wasm
```
If you want play with WASI, in additional to steps above install `dotnet workload install wasi-experimental` and add `false` to your project to opt-out of WASI-Sdk tooling.
If you want to use `wasmtime` also add
```
```
For wasmtime you should enable threading `--enable-threads --wasi-modules experimental-wasi-threads`
# How to test
```
cd helloworld
& $env:EMSDK_HOME\emsdk.ps1 activate 3.1.23
dotnet publish
npx http-server bin/Debug/net7.0/browser-wasm/publish/
```
# Prerequiresites
```
git clone https://github.com/emscripten-core/emsdk ../emsdk
cd ../emsdk
git checkout b4fd475
cd ../nativeaotwasm
```
Set `$env:EMSDK_HOME` to `emsdk` folder.