Skip to content

Documentation #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/gettingstarted/helloworld.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ You can run a local server to view your helloworld program.
- Execute with the shell command `python server.py`.
- Open your web browser and browse to `http://localhost:8000/index.html`
- You should see 'Hello World' in the browser window!
- Note: localhost and 127.0.0.1 works but 0.0.0.0 may cause issues with CORS headers

At this pont your folder structure should look like this:

Expand Down
2 changes: 1 addition & 1 deletion docs/gettingstarted/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ After twr-wasm is cloned, use VS Code `File | Open Folder`.

[See here](https://github.com/twiddlingbits/twr-wasm/blob/main/examples/readme.md) for information on running the examples or building the examples.

[See here](../more/building.md) for information on building the source.
[See here](../more/building.md) for information on building the source and it's required dependencies.

The primary downside to this method is that the JavaScript side of twr-wasm will not be placed in a node_modules folder. This will create a little extra work to configure a bundler, TypeScript or VS Code to find the location of the twr-wasm module imports.

Expand Down
6 changes: 3 additions & 3 deletions docs/more/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ The `main` branch contains the latest release. The `dev` branch is work in prog
## Tools Needed to Build twr-wasm Source
You will need these core tools, versions used in release are in ():

- TypeScript (5.4.5)
- TypeScript (5.4.5) - program is usually called tsc
- clang tool chain (17.0.6) - for C/C++ code
- wasm-ld (17.0.6) - to link the .wasm files
- wat2wasm (1.0.34) - to compile WebAssembly (.wat) files of which I have a few
- wasm-ld (17.0.6) - to link the .wasm files (packaged as lld in linux)
- wat2wasm (1.0.34) - to compile WebAssembly (.wat) files of which I have a few (packaged as wabt in linux)
- GNU make (4.4.1)
- git - to clone twr-wasm source, or to clone llvm, if you want to build libc++

Expand Down
2 changes: 2 additions & 0 deletions examples/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ The examples will run without building using chrome and a file:// URL. The file
- Ensure clang and wasm-ld are installed
- Ensure a version of gnu make is installed (to use the Makefiles).
- the examples use parcel v2 as a bundler
- Ensure typescript and wat2wasm are installed
- For the full list of dependencies see [Building From Source](https://twiddlingbits.dev/docsite/more/building/)
- to run the examples on your local machine using the provided server script (server.py), you need to install python. This script sets certain CORS headers needed by SharedArrayBuffer, that are not usually set using other dev servers.

## Build and execute the examples with a local http server
Expand Down