Skip to content

Documentation tells you to use buildall.sh, neglects to mention some dependencies #64

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
Zireael07 opened this issue Mar 30, 2025 · 3 comments · May be fixed by #65
Open

Documentation tells you to use buildall.sh, neglects to mention some dependencies #64

Zireael07 opened this issue Mar 30, 2025 · 3 comments · May be fixed by #65
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@Zireael07
Copy link

Documentation only calls out clang and ld-wasm (which btw is lld on Manjaro Linux), via trial and error I discovered there are two more:

  • wabt (wat2wasm is used)
  • tsc
@Zireael07
Copy link
Author

Oh, and to run unbundled you need to use the server.py in the root, not in /examples. Trying to use the latter leads to lots of errors where it can't find /lib-js/index.js, seemingly treating it as a subfolder of examples and not root?

@JohnDog3112
Copy link
Collaborator

As far as I can tell, the documentation does point out both wat2wasm and tsc, though it could probably be more concise.

For instance, this segment: https://github.com/twiddlingbits/twr-wasm/blob/main/examples/readme.md seems to only reference clang and wasm-ld as you mentioned above, however it did mention that server.py needs to be ran from root.

Additionally, the getting started segment describing instillation mentions clang and wasm-ld as required dependencies, but it later mentions typescript as an optional dependency and links to the full dependency list. Although, it needs to be revised a bit since it only references it for Windows instillation.

Lastly, you get the building from source page which does include the full dependency list, though, it only states you need wat2wasm and TypeScript not the specific packages that contain it.

As for needing to run server.py from root, I believe server.py is mainly there because it is only used for examples even though the examples pull from a root folder in their unbundled forms. This might change later, but for now it'll probably stay like that.

As for the documentation, I'll add more references to the building from source page as needed so people aren't missing dependencies when trying to run the examples from source. Also, feel free to comment with any other documentation pages I might have missed.

@JohnDog3112 JohnDog3112 self-assigned this Apr 1, 2025
@JohnDog3112 JohnDog3112 added the documentation Improvements or additions to documentation label Apr 1, 2025
@JohnDog3112 JohnDog3112 linked a pull request Apr 1, 2025 that will close this issue
@JohnDog3112 JohnDog3112 linked a pull request Apr 1, 2025 that will close this issue
@Zireael07
Copy link
Author

This is pretty unclear as I assumed "building from source" section in the online pages refers to building the library itself, not the examples.

I found that tsc is NOT optional since you can't run buildall.sh successfully without it.

The readme.md in the examples folder, at least in my copy, says to run /example/server.py and not ./server.py - for me personally, only the latter works, the former results in a ton of errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants