{"id":16444055,"url":"https://github.com/keens/webml","last_synced_at":"2025-04-07T11:08:28.733Z","repository":{"id":14905299,"uuid":"76655122","full_name":"KeenS/webml","owner":"KeenS","description":"A Standard ML Compiler for the Web","archived":false,"fork":false,"pushed_at":"2022-09-21T07:21:52.000Z","size":4594,"stargazers_count":385,"open_issues_count":23,"forks_count":12,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-31T09:08:19.280Z","etag":null,"topics":["compiler","rust","standard-ml","webassembly"],"latest_commit_sha":null,"homepage":"","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/KeenS.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}},"created_at":"2016-12-16T13:17:01.000Z","updated_at":"2025-03-26T17:52:18.000Z","dependencies_parsed_at":"2022-08-28T08:01:33.020Z","dependency_job_id":null,"html_url":"https://github.com/KeenS/webml","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeenS%2Fwebml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeenS%2Fwebml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeenS%2Fwebml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KeenS%2Fwebml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KeenS","download_url":"https://codeload.github.com/KeenS/webml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247640464,"owners_count":20971557,"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","rust","standard-ml","webassembly"],"created_at":"2024-10-11T09:23:08.227Z","updated_at":"2025-04-07T11:08:28.715Z","avatar_url":"https://github.com/KeenS.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WebML -- A Standard ML compiler for the Web\n[![Build Status](https://travis-ci.org/KeenS/webml.svg?branch=master)](https://travis-ci.org/KeenS/webml)\n\nWebML is to be a Standard ML (SML '97) Compiler that works on web browsers and generates [WebAssembly](http://WebAssembly.org) binaries. WebAssembly binaries can be run on web browsers.\nThis means you can run SML REPL on web browsers.\n\n## Status\nUnder very early stage of initial development.\nCompiles only minimal subset of SML codes. The garbage collector is not complete.\n\n## Links\n\n* Try [Online-compiler](https://KeenS.github.io/webml/online-compiler.html)\n* Project is hosted at [GitHub](https://github.com/KeenS/webml)\n\n## Implemented features\n### Core\n\n* Declaration\n    + [ ] `val`\n        - [x] basic (`val ident = expr`)\n        - [x] pattern (`val pat = expr`)\n        - [ ] tyvar `val 'a pat = expr`\n        - [ ] typed (`val pat : ty = expr`)\n        - [ ] `and` (`val pat = expr and pat = expr`)\n    + [ ] `fun`\n        - [x] basic (`fun ident ident ... = expr`)\n        - [x] pattern (`fun ident pat ... = expr`)\n        - [x] multi-clause (`fun ident pat ... = expr | ident pat ... = expr`)\n        - [x] `op` (`fun op ident pat ... = expr`)\n        - [ ] tyvar (`fun 'a ident pat ... = expr`)\n        - [ ] typed (`fun ident pat ... : ty = expr`)\n        - [ ] `and` (`fun ident pat ... = expr and ident pat ... = expr`)\n    + [ ] `type` (`type ident = ty`)\n    + [ ] `datatype`\n        - [ ] `datatype ident = Con of ty | Con ...`\n            - [x] basic (`datatype ident = Con of ty | Con ...`)\n            - [ ] tyvar (`datatype 'a ident = Con of ty | Con ...`)\n            - [ ] `and` (`datatype ident = Con | ... and ident = Con | ...`)\n            - [ ] `withtype` (`datatype ident = Con ... withtype ..`)\n        - [ ] `datatype ident = datatype ident`\n    + [ ] `abstype`\n    + [ ] `exception`\n    + [x] `local ... in ... end`\n    + [ ] `open ..`\n    + [x] `decl ; decl`\n        - [x] `decl decl`\n        - [x] `decl ; decl`\n    + [x] `infix`\n    + [x] `infixr`\n    + [x] `nonfix`\n* Expressions\n    + [ ] special constant\n        - [x] integer\n        - [ ] real\n            - [x] `123.456`\n            - [ ] `123e456`\n            - [ ] `123E456`\n            - [ ] `123e~456`\n        - [ ] word\n        - [x] char\n        - [x] string\n    + [x] value identifier\n    + [x] `op`\n    + [ ] record\n        - [ ] basic (`{ label = expr , ...}`)\n        - [x] tuple\n        - [x] 0-tuple\n        - [ ] `#label`\n    + [ ] list (`[expr, ..., expr]`)\n    + [x] `(expr; ...; expr)`\n    + [x] paren (`(expr)`)\n    + [x] `let .. in .. end`\n        - [x] basic (`let decl ... in expr end`)\n        - [x] derived (`let decl ... in expr; ...; expr end`)\n    + [x] function application\n    + [x] infix operator\n        - [x] L\n        - [x] R\n    + [ ] typed (`exp : ty`)\n    + [ ] exception\n        - [ ] `handle`\n        - [ ] `raise`\n    + [ ] `fn`\n        - [x] basic (`fn ident =\u003e expr`)\n        - [ ] pattern (`fn pat =\u003e expr`)\n        - [ ] multi-clause `fn pat =\u003e expr | pat =\u003e expr ...`\n    + [x] `andalso`\n    + [x] `orelse`\n    + [x] `if .. then .. else`\n    + [x] `while .. do ..`\n    + [x] `case .. of ..`\n* Pattern\n    + [x] wildcard\n    + [ ] special constant\n        - [x] integer\n        - [ ] word\n        - [x] char\n        - [x] string\n    + [x]  value identifier\n    + [x] `op`\n    + [ ] record\n        - [ ] basic (`{ label = pat , ...}`)\n        - [ ] wildcard (`...`)\n        - [ ] label as variable (`{ var (as pat), ...}`)\n        - [x] tuple\n        - [x] 0-tuple\n    + [ ] list\n    + [x] paren\n    + [x] Constructor\n    + [x] infix\n    + [ ] typed (`pat : ty`)\n    + [ ] layerd (`ident as pat`)\n* Type\n    + [ ] type variable\n    + [ ] record\n    + [ ] type construction\n        - [x] without param (`ident`)\n        - [ ] with param (`ty ident`)\n    + [x] tuple\n    + [x] function\n    + [x] paren\n* Initial Basis\n    + [x] `unit`\n    + [x] `bool`\n        - [x] `true`\n        - [x] `false`\n    + [x] `int`\n    + [ ] `word`\n    + [x] `string`\n    + [x] `char`\n    + [ ] `list`\n        - [ ] `nil`\n        - [ ] `::`\n    + [ ] `ref`\n        - [ ] `ref`\n        - [ ] `:=`\n    + [ ] `exn`\n    + [x] `=`\n    + [ ] `Match`\n    + [ ] `Bind`\n* Overloaded\n    + [x] `+`\n    + [x] `-`\n    + [x] `*`\n    + [x] `div`\n    + [x] `mod`\n    + [x] `/`\n    + [x] `\u003c`\n    + [x] `\u003e`\n    + [x] `\u003c=`\n    + [x] `\u003e=`\n    + [ ] `abs`\n    + [ ] `~`\n\n### Module\n\nnot yet implemented\n\n### Program\n\n* Program\n    + [x] decl (`decl decl ...`)\n    + [x] expr (`expr decl ...`)\n        - Note: toplevel expression `expr` should be treated as `val it = expr`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeens%2Fwebml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeens%2Fwebml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeens%2Fwebml/lists"}