Skip to content

Commit

Permalink
Merge pull request #3 from jsturtevant/building-local
Browse files Browse the repository at this point in the history
Add notes on how to build the project
  • Loading branch information
jsturtevant authored Jun 3, 2024
2 parents cf44e74 + 387d5c1 commit b3a97cb
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
26 changes: 25 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
We are currently working on improving the contributor experience. Bug fixes and new features must be submitted using a pull request.
# Submitting bugs and fixes
Open an issue detailing the issue you've encountered or feature you would like to see.

Bug fixes and new features must be submitted using a pull request and pass CI to be included in the project.

## Building the project locally

Requires [.NET 8+](https://dotnet.microsoft.com/en-us/download)

```
dotnet msbuild src/WasmComponent.Sdk/build/WasmComponent.Sdk.targets /t:PrepareWasmSdks
git submodule update --init
dotnet build
```

If you are experiencing issues with values not being updated, try running `dotnet clean` and using the steps above

## Testing

Run the tests:

```
dotnet test
```

## Getting help
While we work on improving the documentation for contributing, if you have any questions please drop a note in the [c# zulip chat](https://bytecodealliance.zulipchat.com/#narrow/stream/407028-C.23.2F.2Enet-collaboration).
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,6 @@ This is a wrapper around various other bits of tooling:
* [WASI SDK](https://github.com/WebAssembly/wasi-sdk) and [Emscripten](https://emscripten.org/), both of which are used by NativeAOT-LLVM.
* Compatible versions of these will be downloaded and cached on your machine the first time you run a build, so the first build will take a few minutes. After that it will only take seconds.

## Contributing

See our [contributing docs](./CONTRIBUTING.md) for details on how to build and contribute to this project.
4 changes: 3 additions & 1 deletion src/WasmComponent.Sdk/build/WasmComponent.Sdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

<EmSdkVersion>3.1.23</EmSdkVersion>
<EmSdkUrl>https://github.com/emscripten-core/emsdk/archive/refs/tags/$(EmSdkVersion).zip</EmSdkUrl>
<EmscriptenRoot>$([System.IO.Path]::Combine("$([System.Environment]::GetFolderPath(SpecialFolder.UserProfile))", ".emsdk", "emsdk-$(EmSdkVersion)"))</EmscriptenRoot>
<!-- Support bring your own emscripten if $(EMSDK) is already set-->
<EmscriptenRoot Condition="'$(EMSDK)' == ''">$([System.IO.Path]::Combine("$([System.Environment]::GetFolderPath(SpecialFolder.UserProfile))", ".emsdk", "emsdk-$(EmSdkVersion)"))</EmscriptenRoot>
<EmscriptenRoot Condition="'$(EMSDK)' != ''">$(EMSDK)</EmscriptenRoot>
</PropertyGroup>

<Target Name="EmitWasmOnBuild" AfterTargets="CopyFilesToOutputDirectory" DependsOnTargets="LinkNativeLlvm; ConvertToWasmComponent"
Expand Down

0 comments on commit b3a97cb

Please sign in to comment.