{"id":13437725,"url":"https://github.com/ballercat/walt","last_synced_at":"2025-05-14T05:10:32.283Z","repository":{"id":40003082,"uuid":"91142264","full_name":"ballercat/walt","owner":"ballercat","description":":zap: Walt is a JavaScript-like syntax for WebAssembly text format :zap:","archived":false,"fork":false,"pushed_at":"2023-01-02T16:57:45.000Z","size":19798,"stargazers_count":4655,"open_issues_count":27,"forks_count":122,"subscribers_count":113,"default_branch":"master","last_synced_at":"2025-05-10T23:46:10.441Z","etag":null,"topics":["compiler","javascript","webassembly"],"latest_commit_sha":null,"homepage":"https://ballercat.github.io/walt/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ballercat.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-13T01:52:46.000Z","updated_at":"2025-05-07T19:14:20.000Z","dependencies_parsed_at":"2023-02-01T03:30:36.935Z","dependency_job_id":null,"html_url":"https://github.com/ballercat/walt","commit_stats":null,"previous_names":[],"tags_count":293,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ballercat%2Fwalt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ballercat%2Fwalt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ballercat%2Fwalt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ballercat%2Fwalt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ballercat","download_url":"https://codeload.github.com/ballercat/walt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076848,"owners_count":22010611,"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":["compiler","javascript","webassembly"],"created_at":"2024-07-31T03:00:59.720Z","updated_at":"2025-05-14T05:10:32.254Z","avatar_url":"https://github.com/ballercat.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"walt.png\" width=\"117\" height=\"74\"\u003e\u003cbr\u003e\u003cbr\u003e\n  \u003cb\u003eWalt\u003c/b\u003e |\n  \u003ci\u003eAlternative Syntax for WebAssembly\u003c/i\u003e |\n  \u003ca href=\"https://ballercat.github.io/walt/\"\u003eDemo\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://travis-ci.org/ballercat/walt\"\u003e\u003cimg src=\"https://travis-ci.org/ballercat/walt.svg?branch=master\" alt=\"Build Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/ballercat/walt/issues\"\u003e\u003cimg src=\"https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat\" alt=\"contributions welcome\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://coveralls.io/github/ballercat/walt?branch=master\"\u003e\u003cimg src=\"https://coveralls.io/repos/github/ballercat/walt/badge.svg?branch=master\" alt=\"Coverage Status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/prettier/prettier\"\u003e\u003cimg src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square\" alt=\"code style: prettier\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://gitter.im/walt-js-wasm/Lobby\"\u003e\u003cimg src=\"https://badges.gitter.im/gitterHQ/gitter.png\" alt=\"Gitter chat\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n:zap: **Walt** is an alternative syntax for WebAssembly text format. It's an experiment for using JavaScript syntax to write to as 'close to the metal' as possible. _It's JavaScript with rules._ `.walt` files compile directly to WebAssembly binary format.\n\nHighlights:\n\n* Write _\"close to the metal\"_ JavaScript!\n* **No C/C++ or Rust required**, just _typed_ JavaScript.\n* **NO LLVM/binary toolkits required**, zero dependencies 100% written in JS.\n* Fast compilation, integrates into webpack!\n\n\n:book: Read the [Quick Start Guide](https://github.com/ballercat/walt/wiki/Walt-In-5-Minutes)\n\n:rocket: Try it out in the [Walt Explorer](https://ballercat.github.io/walt/).\n\n:pray: Contributions are welcomed! [Contributing guide](https://github.com/ballercat/walt/blob/master/CONTRIBUTING.md).\n\n:hatched_chick: Current status: **Alpha**\n\n### [Roadmap](https://github.com/ballercat/walt/wiki/Roadmap)\n\n# Problem\n\nWriting zero-overhead, optimized WebAssembly is pretty tough to do. The syntax for `.wat` files is terse and difficult to work with directly. If you do not wish to use a systems language like C or Rust,\nthen you're kind of out of luck. Your best bet (currently) is to write very plain C code, compile that to .wast and then optimize that result. Then you're ready to compile that into the final WebAssembly binary. This is an\nattempt to take C/Rust out of the equation and write 'as close to the metal' as possible without losing readability.\n\nI feel like this is currently a problem. Most Web engineers are not familiar with the C family languages or Rust. It's a barrier for wide spread adoption of WebAssembly. A competent Front-end engineer\nshould be able to edit WebAssembly as easily as any other systems programmer.\n\n# Solution\n\nProvide a **thin layer** of syntax sugar on top of `.wat` text format. Preferably porting as much of JavaScript syntax to WebAssembly as possible. This improved syntax should give direct control over\nthe WebAssembly output. Meaning there should be minimal to none post optimization to be done to the wast code generated. The re-use of JavaScript semantics is intentional as I do not wish to create a brand new language.\n\nHere is what an example of a `.walt` module which exports a recursive Fibonacci function looks like:\n\n```js\nexport function fibonacci(n: i32): i32 {\n  if (n \u003c= 0) return 0;\n\n  if (n == 1) return 1;\n\n  return fibonacci(n - 1) + fibonacci(n - 2);\n}\n```\n\n\nWhen this code is ran through the walt compiler you end up with a buffer which can be used to create a WebAssembly module with a `fibonacci` export just as you would expect. All done with familiar JS syntax and without any external binary toolkits! A working demo of this exists in the `fibonacci-spec.js` [unit test file](https://github.com/ballercat/walt/blob/master/packages/walt-compiler/src/__tests__/fibonacci-spec.js).\n\n# Project Goals\n\nThe ultimate goal of Walt is to make WebAssembly accessible to average JavaScript engineer by providing a subset of JavaScript syntax which compiles to WebAssembly bytecode directly. That WebAssembly should be easy to make use of and simple to integrate into an existing project with the current build tools.\n\n## Use cases\n\nPretty much everyone who wants a quick-start into wasm can use Walt to get there. The use-cases are not specific to this project alone but more to WebAssembly in general. The fact that Walt does not require a stand-alone compiler and can integrate into any(almost?) build tool still makes certain projects better candidates over others.\n\n* Web/Node libraries, looking to improve performance.\n* Games\n* Projects depending on heavy real-time computation from complex UIs to 3D visualizations\n* Web VR/AR\n* Anyone interested in WebAssembly who is not familiar with system languages.\n\nSee [Wiki](https://github.com/ballercat/walt/wiki) for detailed design decisions etc.\n\n## Prior Art\n* [wah](https://github.com/tmcw/wah) - A slightly higher level syntax on top of the wasm text format\n* [mini-c](https://github.com/maierfelix/mini-c) - Experimental C to WebAssembly compiler\n\n## Contributors\n\n[\u003cimg alt=\"ballercat\" src=\"https://avatars2.githubusercontent.com/u/743990?v=4\u0026s=117\" width=\"117\"\u003e](https://github.com/ballercat) |[\u003cimg alt=\"tbroadley\" src=\"https://avatars0.githubusercontent.com/u/8731922?v=4\u0026s=117\" width=\"117\"\u003e](https://github.com/tbroadley) |[\u003cimg alt=\"thomassturm\" src=\"https://avatars3.githubusercontent.com/u/276995?v=4\u0026s=117\" width=\"117\"\u003e](https://github.com/thomassturm) |[\u003cimg alt=\"Baransu\" src=\"https://avatars2.githubusercontent.com/u/9558691?v=4\u0026s=117\" width=\"117\"\u003e](https://github.com/Baransu) |[\u003cimg alt=\"whitecrownclown\" src=\"https://avatars0.githubusercontent.com/u/8309417?v=4\u0026s=117\" width=\"117\"\u003e](https://github.com/whitecrownclown) |[\u003cimg alt=\"balajmarius\" src=\"https://avatars3.githubusercontent.com/u/5159921?v=4\u0026s=117\" width=\"117\"\u003e](https://github.com/balajmarius) |\n:---: |:---: |:---: |:---: |:---: |:---: |\n[ballercat](https://github.com/ballercat) |[tbroadley](https://github.com/tbroadley) |[thomassturm](https://github.com/thomassturm) |[Baransu](https://github.com/Baransu) |[whitecrownclown](https://github.com/whitecrownclown) |[balajmarius](https://github.com/balajmarius) |\n\n[\u003cimg alt=\"hlaaftana\" src=\"https://avatars0.githubusercontent.com/u/10591326?v=4\u0026s=117\" width=\"117\"\u003e](https://github.com/hlaaftana) |[\u003cimg alt=\"ForsakenHarmony\" src=\"https://avatars3.githubusercontent.com/u/8845940?v=4\u0026s=117\" width=\"117\"\u003e](https://github.com/ForsakenHarmony) |[\u003cimg alt=\"hamlim\" src=\"https://avatars2.githubusercontent.com/u/5579638?v=4\u0026s=117\" width=\"117\"\u003e](https://github.com/hamlim) |[\u003cimg alt=\"petetnt\" src=\"https://avatars2.githubusercontent.com/u/7641760?v=4\u0026s=117\" width=\"117\"\u003e](https://github.com/petetnt) |[\u003cimg alt=\"novoselrok\" src=\"https://avatars2.githubusercontent.com/u/6417322?v=4\u0026s=117\" width=\"117\"\u003e](https://github.com/novoselrok) |[\u003cimg alt=\"Dragas\" src=\"https://avatars2.githubusercontent.com/u/6078508?v=4\u0026s=117\" width=\"117\"\u003e](https://github.com/Dragas) |\n:---: |:---: |:---: |:---: |:---: |:---: |\n[hlaaftana](https://github.com/hlaaftana) |[ForsakenHarmony](https://github.com/ForsakenHarmony) |[hamlim](https://github.com/hamlim) |[petetnt](https://github.com/petetnt) |[novoselrok](https://github.com/novoselrok) |[Dragas](https://github.com/Dragas) |\n\n","funding_links":[],"categories":["JavaScript","Assembler / WebAssembly","Languages"],"sub_categories":["WASM-like"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fballercat%2Fwalt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fballercat%2Fwalt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fballercat%2Fwalt/lists"}