{"id":16100817,"url":"https://github.com/pannous/wasp","last_synced_at":"2025-03-15T10:31:00.150Z","repository":{"id":41800622,"uuid":"125729811","full_name":"pannous/wasp","owner":"pannous","description":"🐝 Wasp : Wasm programming language","archived":false,"fork":false,"pushed_at":"2024-04-27T13:28:54.000Z","size":19172,"stargazers_count":96,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-02T01:29:12.900Z","etag":null,"topics":["aot","compilers","language","programming","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"C++","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/pannous.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"github":["pannous"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2018-03-18T13:52:03.000Z","updated_at":"2024-05-29T10:58:04.980Z","dependencies_parsed_at":"2024-01-01T11:30:08.315Z","dependency_job_id":"d0095424-0faa-426a-9087-be5257d3f42d","html_url":"https://github.com/pannous/wasp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pannous%2Fwasp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pannous%2Fwasp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pannous%2Fwasp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pannous%2Fwasp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pannous","download_url":"https://codeload.github.com/pannous/wasp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243718807,"owners_count":20336589,"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":["aot","compilers","language","programming","wasm","webassembly"],"created_at":"2024-10-09T18:48:19.271Z","updated_at":"2025-03-15T10:31:00.135Z","avatar_url":"https://github.com/pannous.png","language":"C++","funding_links":["https://github.com/sponsors/pannous"],"categories":["C++"],"sub_categories":[],"readme":"# 𓆤 Wasp : Wasm Programming Language\n\n**[Wasp](https://github.com/pannous/wasp/wiki)** is a new unified notation for both markup/object data and code.  \nWasp is the foundation layer of the higher order programming language [angle](https://github.com/pannous/wasp/wiki).\n\u003c!-- https://github.com/pannous/angle --\u003e\n\n«Data is Code and Code is Data»\n\n## [Wasp Syntax](https://github.com/pannous/wasp/wiki/syntax)\n\nFor example, an HTML registration form:\n\n```html\n\u003cform\u003e\n  \u003c!--comment--\u003e\n  \u003cdiv class=\"form-group\"\u003e\n    \u003clabel for=\"email\"\u003eEmail address:\u003c/label\u003e\n    \u003cinput type=\"email\" id=\"email\"\u003e\n  \u003c/div\u003e\n  \u003cbutton class='btn btn-info'\u003eSubmit\u003c/button\u003e\n\u003c/form\u003e\n```\n\nCan be represented in Wasp as:\n\n```text\nform{                                 \n  //comment                          \n  div{ class:\"form-group\"             \n    label{ for:email                  \n      \"Email address:\"                \n    }\n    input{ type:email id:email}     \n  }\n  button{ class:['btn' 'btn-info']  \n    'Submit'                        \n  }\n}\n```\n\nHtml is just an arbitrary example of structured data, wasp can represent any data, like json, xml, yaml,\ns-expressions...\nThe difference from passive data is that Wasp is fully typed and also used for active data, such as code.\n\n## Online Demo\n\n[wasp.pannous.com](https://wasp.pannous.com)\n\n## Runtime\n\nThe wasp runtime is available as\n\n* native **binary** for Mac, Linux and Windows\n* small standalone **webassembly** file (~50kb), with or without\n* a wasm **compiler** (~100kb) in wasm:\n\n# Angle Language\n\n[Angle](https://github.com/pannous/wasp/wiki/angle) is a new Programming Language using Wasp as data format,  \n\"Lisp with Hashes\" and optional braces.\n\nHello World in Angle is  \n`\"Hello World\"`\n\nThe deep formal reason why this is a valid program is that the last object in a block is its return value  \nand the last result in the root block of the main file is printed.\n\nFibonacci in Angle is\n\n```\nfibonacci number = if number\u003c2 : 1 else fibonacci(number - 1) + fibonacci it - 2\n```\n\nNote how number simulataneously acts as type and variable name.  \nNote how the unique argument `number` can be accessed via `it` keyword and some brackets are optional\n\n[Auto typed](https://github.com/pannous/wasp/wiki/type-inference) fibonacci in Angle is\n\n```\nfib := if it\u003c2 : 1 else fib(it-1) + fib it - 2\n```\n\nAngle runs as wasm file inside browsers an as small lambdas in edge computing.\nAngle programms **compiled to wasm**, which dont make use of the standard api can be extremely small \u003c1kb, just like\nhandwritten [wast](https://www.richinfante.com/2020/01/03/webassembly-examples) but with much more comfort.\n\n## built-in linker\n\nLike in swift, all files within the source file's directory are parsed and available without extra `use` / `include`\nkeyword. However other projects and source files can be included dynamically or statically aot at compile time.\n\n## built-in component model\n\nThe webassembly [component model](https://github.com/WebAssembly/component-model) is a first class citizen of\nangle: `wit` files and syntax can be included directly:\n\n```\nflags virtues{ \n  fast\n  safe\n}\n\nwasp virtues  = fast + safe\n```\n\nNo need for any bindgen, unless interfacing with components of other languages.\nIn fact we hope to promote wit to a universal header file format.\n\nWasp and Angle are **free of dependencies** (other than gcc, if the runtime is to be compiled from scratch).\nOnly some optional features can make use of external dependencies:\n\nThe natives runtimes can be configured to ship with a JIT wasm runtime (wasmtime, wasmedge, wasm3, wasmer,\nwasm-micro-runtime and V8!)\n\nThe **native** Wasp/Angle binary contains a small **WebView** connector making use of the host's browser component (Edge\nor WebKit).\nSince the Angle language can be compiled from wasm to wasm, this gives a whole self sufficient programming environment\nin less than 200kb,  \nwith similar power to [electron](https://www.electronjs.org/) and QT.\n\nNote: The full wasp_compiler.wasm is currently 2MB but can be shrunk back close to the 70kb of wasp_runtime.wasm once\nthe lazy external references are removed again.\n\nUntil a smart way is found to write directly to the WebViews canvas, native angle ships with a low\noverhead **[graphics](https://github.com/pannous/wasp/wiki/graphics)** adapter (using SDL) for fast fullscreen painting\nin native wasp bundles.\n\n## [Documentation](https://github.com/pannous/wasp/wiki/)\n\n- [Syntax specification](https://github.com/pannous/wasp/wiki/syntax)\n- [Features](https://github.com/pannous/wasp/wiki/features)\n- [Inventions](https://github.com/pannous/wasp/wiki/Inventions)\n- [Examples](https://github.com/pannous/wasp/wiki/Examples)\n\n## Wasp Data Model\n\n**Wasp**, is a new unified notation for both object and markup data. The notation is a superset of what can be\nrepresented by JSON, HTML and XML, but overcomes many limitations these popular data formats, yet still having a very\nclean syntax and simple data model.\n\n- It has **clean syntax** with **fully-type** data model *(like JSON or even better)*\n- It is **generic** and **extensible** *(like XML or even better)*\n- It has built-in **mixed content** support *(like HTML5 or even better)*\n- It supports **high-order** composition *(like S-expression or even better)*\n\n|                        | [Wasp](https://github.com/pannous/wasp/wiki)/[Mark](https://github.com/henry-luo/wasp) | JSON     | HTML | XML | S-expr  | YAML     |\n|------------------------|----------------------------------------------------------------------------------------|----------|------|-----|---------|----------|\n| Clean syntax           | yes                                                                                    | yes      | no   | yes | yes     | yes      |\n| Fully-typed            | yes                                                                                    | yes      | no   | no  | yes     | yes      |\n| Generic                | yes                                                                                    | yes      | no   | yes | yes     | yes      |\n| Mixed content support  | yes                                                                                    | hard     | yes  | yes | hard    | hard     |\n| High-order composition | yes                                                                                    | possible | no   | yes | yes     | possible |\n| Wide adoption          | not yet                                                                                | yes      | yes  | yes | limited | limited  |\n\nWasp has a simple and fully-typed data model.\n\n## [Documentation](https://github.com/pannous/wasp/wiki/)\n\n- [Data model](https://github.com/pannous/wasp/wiki/data)\n- [FAQ](https://github.com/pannous/wasp/wiki/FAQ)\n- [Examples](https://github.com/pannous/wasp/wiki/Examples)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpannous%2Fwasp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpannous%2Fwasp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpannous%2Fwasp/lists"}