Skip to content

Commit

Permalink
Update WASM README.md (#61681)
Browse files Browse the repository at this point in the history
* Update WASM README.md
  • Loading branch information
AaronRobinsonMSFT authored Nov 16, 2021
1 parent 293e5ed commit 0749730
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions src/mono/wasm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This depends on `emsdk` to be installed.

## emsdk on mac
## emsdk on macOS

* You can run `make provision-wasm`, which will install it to `$reporoot/src/mono/wasm/emsdk` .
Note: Irrespective of `$(EMSDK_PATH)`'s value, `provision-wasm` will always install into `$reporoot/src/mono/wasm/emsdk`.
Expand All @@ -17,13 +17,7 @@ Do not install `latest` but rather specific version e.g. `./emsdk install 2.0.23

Make sure to set `EMSDK_PATH` variable, whenever building, or running tests for wasm.

### Windows dependencies

Windows build [requirements](https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/windows-requirements.md)

If `EMSDK_PATH` is not set, the `emsdk` should be provisioned automatically during the build.

## Building on mac
## Building on macOS

* To build the whole thing, with libraries:

Expand All @@ -33,9 +27,17 @@ If `EMSDK_PATH` is not set, the `emsdk` should be provisioned automatically duri

`make runtime`

### Note: Additional msbuild arguments can be passed with: `make build-all MSBUILD_ARGS="/p:a=b"`
**Note:** Additional msbuild arguments can be passed with: `make build-all MSBUILD_ARGS="/p:a=b"`

## emsdk on Windows

Windows build [requirements](https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/windows-requirements.md)

If `EMSDK_PATH` is not set, the `emsdk` should be provisioned automatically during the build.

**Note:** The EMSDK has an implicit dependency on Python for it to be initialized. A consequence of this is that if the system doesn't have Python installed prior to attempting a build, the automatic provisioning will fail and be in an invalid state. Therefore, if Python needs to be installed after a build attempt the `$reporoot/src/mono/wasm/emsdk` directory should be manually deleted and then a rebuild attempted.

### Bulding on windows
## Bulding on Windows

* To build everything

Expand All @@ -47,7 +49,7 @@ If `EMSDK_PATH` is not set, the `emsdk` should be provisioned automatically duri

The latest engines can be installed with jsvu (JavaScript engine Version Updater https://github.com/GoogleChromeLabs/jsvu)

### Mac
### macOS

* Install npm with brew:

Expand Down Expand Up @@ -83,7 +85,7 @@ Add `~/.jsvu` to your `PATH`:

Library tests can be run with js engines: `v8`, `SpiderMonkey`,or `JavaScriptCore`:

### Mac
### macOS

* `v8`: `make run-tests-v8-$(lib_name)`
* SpiderMonkey: `make run-tests-sm-$(lib_name)`
Expand All @@ -105,7 +107,7 @@ Examples of running tests for individual libraries:
`.\dotnet.cmd build /t:Test /p:TargetOS=Browser src\libraries\System.Collections.Concurrent\tests`
`.\dotnet.cmd build /t:Test /p:TargetOS=Browser /p:JSEngine="SpiderMonkey" src\libraries\System.Text.Json\tests`

### Browser tests on mac
### Browser tests on macOS

Or they can be run with a browser (Chrome):

Expand All @@ -125,9 +127,9 @@ The wrapper script used to actually run these tests, accepts:

* set `XHARNESS_CLI_PATH=/path/to/xharness/artifacts/bin/Microsoft.DotNet.XHarness.CLI/Debug/netcoreapp3.1/Microsoft.DotNet.XHarness.CLI.dll`

### Note: Additional msbuild arguments can be passed with: `make .. MSBUILD_ARGS="/p:a=b"`
**Note:** Additional msbuild arguments can be passed with: `make .. MSBUILD_ARGS="/p:a=b"`

## Debugger tests on mac
## Debugger tests on macOS

Debugger tests need `Google Chrome` to be installed.

Expand Down Expand Up @@ -173,4 +175,4 @@ Bumping Emscripten version involves these steps:
## Code style
* Is enforced via [eslint](https://eslint.org/) and rules are in `./.eslintrc.js`
* You could check the style by running `npm run lint` in `src/mono/wasm/runtime` directory
* You can install [plugin into your VS Code](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) to show you the errors as you type
* You can install [plugin into your VS Code](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) to show you the errors as you type

0 comments on commit 0749730

Please sign in to comment.