{"id":28766098,"url":"https://github.com/mdn/watify","last_synced_at":"2026-01-20T17:58:44.859Z","repository":{"id":279617107,"uuid":"939348594","full_name":"mdn/watify","owner":"mdn","description":"Compile WAT to WASM with WASM 🙇","archived":false,"fork":false,"pushed_at":"2025-05-26T12:04:05.000Z","size":493,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-01T12:56:16.188Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-26T11:57:24.000Z","updated_at":"2025-03-04T12:50:37.000Z","dependencies_parsed_at":"2025-02-26T14:46:28.318Z","dependency_job_id":null,"html_url":"https://github.com/mdn/watify","commit_stats":null,"previous_names":["mdn/watify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mdn/watify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdn%2Fwatify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdn%2Fwatify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdn%2Fwatify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdn%2Fwatify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdn","download_url":"https://codeload.github.com/mdn/watify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdn%2Fwatify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260350936,"owners_count":22995856,"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":"2025-06-17T11:40:59.021Z","updated_at":"2026-01-20T17:58:44.847Z","avatar_url":"https://github.com/mdn.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Watify\n\nCompile WAT to WASM with WASM 🙇\n\n## Usage\n\nFor local testing, build the package, then server the project root\nby running an http server. THe `index.html` file has this example.\nThe output can be seen in the browser's console.\n\n```javascript\nimport init, { watify } from \"watify\";\nconst w = `\n(module\n  (func $fac (export \"fac\") (param $x i64) (result i64)\n    (return_call $fac-aux (local.get $x) (i64.const 1))\n  )\n\n  (func $fac-aux (param $x i64) (param $r i64) (result i64)\n    (if (result i64) (i64.eqz (local.get $x))\n      (then (return (local.get $r)))\n      (else\n        (return_call $fac-aux\n          (i64.sub (local.get $x) (i64.const 1))\n          (i64.mul (local.get $x) (local.get $r))\n        )\n      )\n    )\n  )\n)`;\ninit().then(() =\u003e {\n  const wasm = watify(w);\n  console.log(wasm);\n  WebAssembly.instantiate(wasm, {}).then((result) =\u003e {\n    const fac = result.instance.exports.fac;\n    console.log(fac(5n));\n  });\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdn%2Fwatify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdn%2Fwatify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdn%2Fwatify/lists"}