{"id":18989438,"url":"https://github.com/source-academy/wabt","last_synced_at":"2026-04-13T11:30:17.369Z","repository":{"id":190265456,"uuid":"626896224","full_name":"source-academy/wabt","owner":"source-academy","description":"WebAssembly Toolkit for Source Academy Modules","archived":false,"fork":false,"pushed_at":"2024-03-09T23:55:13.000Z","size":1607,"stargazers_count":0,"open_issues_count":6,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-01-01T14:09:10.930Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/source-academy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-04-12T11:29:36.000Z","updated_at":"2023-04-16T13:59:40.000Z","dependencies_parsed_at":"2024-03-10T00:43:06.949Z","dependency_job_id":null,"html_url":"https://github.com/source-academy/wabt","commit_stats":null,"previous_names":["source-academy/wabt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-academy%2Fwabt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-academy%2Fwabt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-academy%2Fwabt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/source-academy%2Fwabt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/source-academy","download_url":"https://codeload.github.com/source-academy/wabt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240002130,"owners_count":19732164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T17:06:41.255Z","updated_at":"2026-04-13T11:30:17.328Z","avatar_url":"https://github.com/source-academy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WABT-Parser\nWrite WebAssembly in [Source Academy](https://sourceacademy.org/playground)!\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/Yongbeom-Kim/source-academy-wabt/assets/63487502/6569e1e1-01fa-439c-8bc9-aeb5356d07e9\" width=\"60%\"\u003e\u003c/img\u003e\n\u003c/p\u003e\n\n## Overview\nThis is a TypeScript port of (relevant features) of the [WebAssembly Binary Toolkit](https://github.com/webassembly/wabt) to be used in Source Academy's WebAssembly module.\n\nThe project is uploaded to [source-academy-wabt](https://www.npmjs.com/package/source-academy-wabt) on npm. To use it, you can do one of the following commands\n```sh\nnpm install source-academy-wabt\nyarn add source-academy-wabt\n```\n\nCurrently, this project has a partial port of a WebAssembly Text compiler (wat2wasm).\n\nTo write WebAssembly Text, see [EXAMPLES.md](./EXAMPLES.md).\n\n## Info for Developers\nThe following set of instructions will tell you how to set up a local copy of this repository on your local machine for building and development.\n\nYou will need to have a stable version of NodeJS on your local development machine. We recommend using the latest LTS version. You can use [nvm](https://github.com/creationix/nvm#installation) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows) to switch Node versions between different projects.\n\nYou will also need to have a package manager for your project. We recommend using a stable version of Yarn as the repository pipelines are using the [Yarn](https://yarnpkg.com/) package manager as well. To install the Yarn package manager through NPM, you can run the following command.\n\n```\nnpm install -g yarn\n```\n\nClone the repository on your local development machine and navigate to it using your favourite command line or shell tool.\n\n```\ngit clone https://github.com/source-academy/wabt.git\ncd wabt\n```\n\n## Testing\nThis project follows Test-Driven Development, where tests are written first before their corresponding features. Given the myriad of bugs in implementing any compiler, it is heavily recommended to follow this when contributing. Refer to [here](./test/README.md) for the test documentation.\n\n\n## Building the Project\nOn top of the dependencies in `package.json`, you will need the [C Preprocessor](https://gcc.gnu.org/onlinedocs/cpp/) to build this project. I'm not sure if you can just download the preprocessor by itself, so I reccommend you to just download the GNU GCC while you're at it. Go [here](https://gcc.gnu.org/install/) or [here (Windows)](https://winlibs.com)\n\nTo build the project, do `yarn bundle`. This will bundle the project for releasy by running: (1) the C Preprocessor on relevant files, (2) esbuild to bundle the TypeScript files and (3) tsc to emit `.d.ts` files.\n\n\n### Note on Preprocessor\nThis project uses the C Preprocessor to preprocess certain TypeScript files.\n\n#### Running the Preprocessor\nTo run the preprocessor, do `yarn run preprocess` or `yarn run cpp`.\n\n#### Macro Directives\nSince macro directives such as `#include \"something\"` are not valid TypeScript/JavaScript, they prefixed with a triple-forward slash `///#include \"something\"`. Triple slashes will be stripped from the source files before preprocessing, so take note not to use them as comments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsource-academy%2Fwabt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsource-academy%2Fwabt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsource-academy%2Fwabt/lists"}