{"id":7791675,"url":"https://github.com/CalmSystem/wala","last_synced_at":"2025-07-17T18:31:03.835Z","repository":{"id":232891130,"uuid":"454218794","full_name":"CalmSystem/wala","owner":"CalmSystem","description":"It aims to be for WASM what YAML is for JSON. Programming language targetting WebAssembly. Human friendly WAT","archived":false,"fork":false,"pushed_at":"2022-04-19T11:48:35.000Z","size":441,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-25T07:34:20.252Z","etag":null,"topics":["programming-language","wasm","webassembly","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/CalmSystem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2022-02-01T00:44:31.000Z","updated_at":"2024-10-22T18:34:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"c255c0df-5ea2-4f5b-87a4-cb8ab90860e7","html_url":"https://github.com/CalmSystem/wala","commit_stats":null,"previous_names":["calmsystem/wala"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/CalmSystem/wala","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalmSystem%2Fwala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalmSystem%2Fwala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalmSystem%2Fwala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalmSystem%2Fwala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CalmSystem","download_url":"https://codeload.github.com/CalmSystem/wala/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalmSystem%2Fwala/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265645301,"owners_count":23804183,"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":["programming-language","wasm","webassembly","zig"],"created_at":"2024-04-12T00:13:18.342Z","updated_at":"2025-07-17T18:31:03.830Z","avatar_url":"https://github.com/CalmSystem.png","language":"Zig","funding_links":[],"categories":["zig"],"sub_categories":[],"readme":"# Wala\n\nA language trying to simplify [WebAssembly Text](https://developer.mozilla.org/en-US/docs/WebAssembly/Understanding_the_text_format) syntax while keeping the full expressiveness and retro-compatibility. Unwittingly becoming a Zig toolchain for WASM.\n\nPronounced `\\vwa.la\\` as in french voila *(meaning here it is)*. The exact acronym's composition is unspecified but can be interpreted as [WebAssembly](https://webassembly.org/) Language Adaptor or What Another Linguistic Anomaly.\n\n## Philosophy\n\nIt is implemented as a set of complementary extensions over standard [WebAssembly Text Format](https://webassembly.github.io/spec/core/text/index.html)\n\n```wal\nfunc $fib export()\n  u64 $n -\u003e ?\n  if {$n \u003c= 2}\n    1\n    +\n      $fib{$n - 2}\n      $fib{$n - 1}\n\n```\n\nIs expended to:\n```wat\n(module\n  (func $fib (export \"fib\") (param $n i64) (result i64)\n    (if (result i64) (i64.le_u (local.get $n) (i64.const 2))\n      (i64.const 1)\n      (i64.add\n        (call $fib (i64.sub (local.get $n) (i64.const 2)))\n        (call $fib (i64.sub (local.get $n) (i64.const 1)))))))\n```\n\nFor working [samples](./samples) see: [fib](./samples/fib.wala), [fizzbuzz](./samples/fizzbuzz.wala),  [99bottles](./samples/99-bottles-of-beer.wala), ...\n\n## Install\n\n### Prerequisites\n\n- [Zig](https://ziglang.org/learn/getting-started)\n- [Zigmod](https://nektro.github.io/zigmod/)\n\n#### Optional\n\n- [Binaryen](https://github.com/WebAssembly/binaryen) for additional optimizations\n- [Wasmtime](https://github.com/bytecodealliance/wasmtime) for WASI runtime\n\n### Building\n\n```sh\ngit clone https://github.com/CalmSystem/wala.git\ncd wala\nzigmod ci\nzig build -Drelease-safe\nPATH=$PATH:./zig-out/bin\n```\n\n## Usage\n\n* Run built module *(default WASI engine: `--runtime wasmtime`)*\n```sh\nwala run samples/hello.wala\n```\n* Convert `samples/fib.wala` to Wasm\n```sh\nwala build samples/fib.wala \u003e fib.wasm\n```\n\n## Features\n\n### Sweet expression\n\nDeducing parentheses from indentation based on [Readable Lisp S-expressions Project](https://readable.sourceforge.io/)'s [Spir110](https://srfi.schemers.org/srfi-110/srfi-110.html)\n\n#### Curly infix expressions\n\n- `{\"hello\" upper}` -\u003e `(upper \"hello)`\n- `{a + b}` -\u003e `(+ a b)`\n- `{a * b * c}` -\u003e `(* a b c)`\n- `{$fn call a b c}` -\u003e `(call $fb a b c}`\n\n#### Neoteric expression\n\nLike function calls\n\n- `cos(v)` -\u003e `(cos v)`\n- `e()` -\u003e `(e)`\n- `sum(a b c)` -\u003e `(sum a b c)`\n- `f{n + 1}` -\u003e `(f (+ n 1))`\n\n### Short const\n\n- `42i32` -\u003e `(i32.const 42)`\n\u003c!-- TODO: - `1.3f64` -\u003e `(f64.const 1.3)` --\u003e\n\n### Operand type deduction\n\n- `(i32.add 35 7)` -\u003e `(i32.add (i32.const 35) (i32.const 7))`\n- `(i64.add 35 7)` -\u003e `(i64.add (i64.const 35) (i64.const 7))`\n\n### Common operators\n\n- `(+ 35i32 7)` -\u003e `(i32.add (i32.const 35) (i32.const 7))`\n- `(+ 35i64 7)` -\u003e `(i64.add (i64.const 35) (i64.const 7))`\n\n### Ident expansion\n\n- `($a_func $a_param $a_global)` -\u003e `(call $a_func (local.get $a_param) (global.get $a_global))`\n\n#### Assign operator\n\n- `{$a_local = 5}` -\u003e `(local.set $a_local (i32.const 5))`\n- `{$a_global = 5}` -\u003e `(global.set $a_local (i32.const 5))`\n\n### Interface types numbers\n\n- `{42s64 \u003c= 1}` -\u003e `(i64.le_s (i64.const 42) (i64.const 1))`\n- `{42u64 \u003c= 1}` -\u003e `(i64.le_u (i64.const 42) (i64.const 1))`\n\n### Define\n\n- `{$C := 5} (call $func $C $C)` -\u003e `(call $func (i32.const 5) (i32.const 5))`\n\n### Planned\n\n#### Result Type Deduction\n\nNo need to specify blocks and function result types\n\n#### Interface integration\n\nAllows to define, import and use `wit` declarations. See [fib.wasi.wal](./test/wala/fib.wasi.wal)\n\n## License\n\nDistributed under the MIT license to facilitate cooperation and knowledge sharing. However, use with respect to contributors and end-users is strongly advised. See [LICENSE](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCalmSystem%2Fwala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCalmSystem%2Fwala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCalmSystem%2Fwala/lists"}