{"id":16339701,"url":"https://github.com/kritzcreek/nemo-lang","last_synced_at":"2025-03-20T23:31:21.165Z","repository":{"id":205449600,"uuid":"714002079","full_name":"kritzcreek/nemo-lang","owner":"kritzcreek","description":"A small procedural programming language that compiles to Wasm GC","archived":false,"fork":false,"pushed_at":"2025-03-08T11:13:52.000Z","size":8464,"stargazers_count":15,"open_issues_count":13,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-17T18:49:06.184Z","etag":null,"topics":["compiler","programming-language","wasm"],"latest_commit_sha":null,"homepage":"https://kritzcreek.github.io/nemo-lang/","language":"Rust","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/kritzcreek.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":"2023-11-03T17:40:16.000Z","updated_at":"2025-03-08T11:13:56.000Z","dependencies_parsed_at":"2023-12-06T22:29:19.446Z","dependency_job_id":"4a1360bd-d3b6-4076-8ab0-920d5fbf4705","html_url":"https://github.com/kritzcreek/nemo-lang","commit_stats":null,"previous_names":["kritzcreek/nemo-lang"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kritzcreek%2Fnemo-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kritzcreek%2Fnemo-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kritzcreek%2Fnemo-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kritzcreek%2Fnemo-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kritzcreek","download_url":"https://codeload.github.com/kritzcreek/nemo-lang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244710746,"owners_count":20497303,"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","programming-language","wasm"],"created_at":"2024-10-10T23:54:57.333Z","updated_at":"2025-03-20T23:31:20.853Z","avatar_url":"https://github.com/kritzcreek.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nemo-lang\n\nnemo is a small procedural programming language that compiles to Wasm GC\n\n## Playground\n\nCheck out the [Nemo playground] for example programs.\nIt runs entirely in your browser, so you can play around and experiment however you like.\n\n## Motivation\n\nI \"know\" how to do a lot of things in compilers theoretically, conceptually, or in isolation.\nThis project helps me verify I can actually put them together and understand them well enough to put into practice.\n\nI think Wasm GC is a fantastic opportunity.\nIt could make creating new high-level interesting languages fun, and accessible.\nPart of making that a reality is building tooling, examples, and teaching materials.\nI hope Nemo can help in that effort.\n\nDepending on how the language evolves it might become part of my compilers course at TH Cologne.\n\n## Language Features\n\nMost features can be directly mapped to Wasm GC constructs. I'm just listing them here:\n\n- Function imports\n- Top-level functions\n- Globals\n- Primitive types: i32, f32, bool, unit\n- Composite types: Structs (nominal), Arrays (structural)\n- if-expressions\n- while\n- Early returns\n- Infix operators for most numeric instructions\n- Built-in functions/intrinsics for all other numeric functions\n\nFeatures we implement \"on-top\"\n\n- First order parametric polymorphism (Generics) via monomorphization\n- Variants \u0026 Pattern matching\n- First class functions (closures)\n- Lazy initialization for non-const globals\n- Type directed operator resolution (+ can mean both i32.add and f32.add)\n- Type directed field resolution for struct access\n- Nested set targets for composite types: `set p.particles[2].vx = 10.0`\n- Block scoping\n\n## Working on the project\n\nThe compiler is written in Rust, so at the minimum you'll need a [Rust toolchain].\n\nWhile developing the compiler a couple of other tools are useful/necessary to have:\n- just: The command runner used for tasks in the [justfile]\n- wasm-bindgen: Required to build the playground\n- wasm-tools: Wasm pretty printer/parser tools\n- wasm-opt: The wasm-opt tool from Emscripten packaged up as a Rust package\n\nThe easiest way I've found to install them is using [cargo-binstall]:\n```sh\ncargo binstall just wasm-bindgen-cli wasm-tools wasm-opt watchexec-cli\n```\n\nAdditionally you'll need [Deno] to run the tests.\n\n[Nemo playground]: https://kritzcreek.github.io/nemo-lang\n[Rust toolchain]: https://rustup.rs\n[cargo-binstall]: https://github.com/cargo-bins/cargo-binstall\n[justfile]: ./justfile\n[Deno]: https://deno.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkritzcreek%2Fnemo-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkritzcreek%2Fnemo-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkritzcreek%2Fnemo-lang/lists"}