{"id":18062921,"url":"https://github.com/stagas/wat-compiler","last_synced_at":"2025-04-11T15:13:28.956Z","repository":{"id":60315378,"uuid":"334239225","full_name":"stagas/wat-compiler","owner":"stagas","description":"webassembly wat text format to binary compiler","archived":false,"fork":false,"pushed_at":"2022-12-07T17:33:45.000Z","size":471,"stargazers_count":21,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-10T03:11:14.638Z","etag":null,"topics":["binary","bytecode","compiler","wabt","wasm","wat","webassembly"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/stagas.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}},"created_at":"2021-01-29T19:10:44.000Z","updated_at":"2025-01-21T00:39:29.000Z","dependencies_parsed_at":"2023-01-24T19:33:07.573Z","dependency_job_id":null,"html_url":"https://github.com/stagas/wat-compiler","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fwat-compiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fwat-compiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fwat-compiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stagas%2Fwat-compiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stagas","download_url":"https://codeload.github.com/stagas/wat-compiler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248429117,"owners_count":21101785,"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":["binary","bytecode","compiler","wabt","wasm","wat","webassembly"],"created_at":"2024-10-31T05:08:52.366Z","updated_at":"2025-04-11T15:13:28.926Z","avatar_url":"https://github.com/stagas.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ewat-compiler\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\nwebassembly wat text format to binary compiler\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"#install\"\u003e        🔧 \u003cstrong\u003eInstall\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"#example\"\u003e        🧩 \u003cstrong\u003eExample\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"#api\"\u003e            📜 \u003cstrong\u003eAPI docs\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"https://github.com/stagas/wat-compiler/releases\"\u003e 🔥 \u003cstrong\u003eReleases\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"#contribute\"\u003e     💪🏼 \u003cstrong\u003eContribute\u003c/strong\u003e\u003c/a\u003e\n · \u003ca href=\"https://github.com/stagas/wat-compiler/issues\"\u003e   🖐️ \u003cstrong\u003eHelp\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n***\n\n## Install\n\n```sh\n$ npm i wat-compiler\n```\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### Table of Contents\n\n*   [make](#make)\n    *   [Parameters](#parameters)\n\n### make\n\n[index.js:25-27](https://github.com/stagas/wat-compiler/blob/da299d9672ca3cf692083212afadad27720fd8f1/index.js#L25-L27 \"Source code on GitHub\")\n\nCompiles a WAT source string to a buffer.\n\n```js\nimport compile from 'wat-compiler'\nconst buffer = compile('(func (export \"answer\") (result i32) (i32.const 42))')\nconst mod = new WebAssembly.Module(buffer)\nconst instance = new WebAssembly.Instance(mod)\nconsole.log(instance.exports.answer()) // =\u003e 42\n```\n\n#### Parameters\n\n*   `code` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** The WAT code to compile\n*   `options` **Options** An options object\n\n    *   `options.metrics` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Enable metrics with console.time\n*   `context`  \u0026#x20;(optional, default `{}`)\n\nReturns **[Uint8Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array)** The buffer to be passed on to WebAssembly\n\n## Contribute\n\n[Fork](https://github.com/stagas/wat-compiler/fork) or\n[edit](https://github.dev/stagas/wat-compiler) and submit a PR.\n\nAll contributions are welcome!\n\n## License\n\nPublic Domain © 2021\n[stagas](https://github.com/stagas)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstagas%2Fwat-compiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstagas%2Fwat-compiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstagas%2Fwat-compiler/lists"}