{"id":33261773,"url":"https://github.com/minoki/LunarML","last_synced_at":"2025-11-21T22:01:06.929Z","repository":{"id":40488340,"uuid":"143456413","full_name":"minoki/LunarML","owner":"minoki","description":"The Standard ML compiler that produces Lua/JavaScript","archived":false,"fork":false,"pushed_at":"2025-10-24T14:11:14.000Z","size":7590,"stargazers_count":425,"open_issues_count":7,"forks_count":11,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-11-17T07:14:56.367Z","etag":null,"topics":["lua","standard-ml","transpiler"],"latest_commit_sha":null,"homepage":"","language":"Standard ML","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/minoki.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"minoki"}},"created_at":"2018-08-03T17:41:13.000Z","updated_at":"2025-11-14T03:21:48.000Z","dependencies_parsed_at":"2023-11-07T10:25:47.237Z","dependency_job_id":"20721083-23bc-4bc6-ae1b-7b84a82256b4","html_url":"https://github.com/minoki/LunarML","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/minoki/LunarML","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minoki%2FLunarML","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minoki%2FLunarML/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minoki%2FLunarML/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minoki%2FLunarML/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/minoki","download_url":"https://codeload.github.com/minoki/LunarML/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/minoki%2FLunarML/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285697828,"owners_count":27216628,"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","status":"online","status_checked_at":"2025-11-21T02:00:06.175Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["lua","standard-ml","transpiler"],"created_at":"2025-11-17T04:00:32.049Z","updated_at":"2025-11-21T22:01:06.917Z","avatar_url":"https://github.com/minoki.png","language":"Standard ML","readme":"# LunarML\n\nThe Standard ML compiler that produces Lua/JavaScript.\n\nThe documentation is available at \u003chttps://lunarml.readthedocs.io/en/latest/\u003e.\n\n## Trying pre-built binaries\n\nIf you obtained an archive named `lunarml-{version}-{arch}-{os}.tar.gz`:\n\n```\n$ tar xf lunarml-0.3.0-{arch}-{os}.tar.gz\n$ cd lunarml-0.3.0\n$ make install PREFIX=/opt/lunarml\n$ export PATH=/opt/lunarml/bin:$PATH\n$ lunarml compile example/hello.sml\n```\n\nAlso, Docker image is available:\n\n```\n$ docker pull ghcr.io/minoki/lunarml:latest\n$ docker run --rm -v \"$(pwd)\":/work -w /work ghcr.io/minoki/lunarml:latest lunarml compile example/hello.sml\n$ lua example/hello.lua\nHello world!\n```\n\nIn case you do not want to use Docker, there are precompiled scripts available in the tarball.\nYou can use `install-precompiled-lua` target to install `lunarml.lua` which can be run with Lua 5.3/5.4 and LuaFileSystem.\n\n```\n$ make install-precompiled-lua PREFIX=/opt/lunarml\n$ export PATH=/opt/lunarml/bin:$PATH\n$ lunarml compile example/hello.sml\n```\n\nYou can use `install-precompiled-node` target to install `lunarml.mjs` to be run with Node.js.\n\n```\n$ make install-precompiled-node PREFIX=/opt/lunarml\n$ export PATH=/opt/lunarml/bin:$PATH\n$ lunarml compile example/hello.sml\n```\n\nWarning: Script-compiled LunarML is slow. Use native binary for serious use.\n\n## Building and Installing\n\nYou need a recent version of MLton to build the executable, and Lua 5.3+ or recent Node.js to run the compiled script.\n\n```sh-session\n$ make\n$ make test-lua\n$ make test-lua-continuations\n$ make test-luajit\n$ make test-nodejs\n$ make test-nodejs-cps\n$ bin/lunarml compile example/hello.sml\n$ lua example/hello.lua\nHello world!\n```\n\nYou can install the built binary with `make install`:\n\n```\n$ make install PREFIX=/opt/lunarml\n$ export PATH=\"/opt/lunarml/bin:$PATH\"\n$ lunarml compile example/hello.sml\n```\n\nAlternatively, you can use Docker to build and run LunarML.\n\n```sh-session\n$ docker build -f package/docker/Dockerfile -t lunarml:0.3.0 .\n$ docker run --rm -v \"$(pwd)\":/work -w /work lunarml:0.3.0 lunarml compile example/hello.sml\n$ lua example/hello.lua\nHello world!\n```\n\n## Usage\n\n```\nlunarml compile [options] input.(sml|mlb)\n```\n\nSubcommands:\n\n* `compile`: Compile a program.\n* `check`: Type check only.\n* `help`: Show help.\n* `version`: Show version information.\n\nTargets:\n\n* Lua\n    * `--lua` (default): Targets Lua 5.3+.\n    * `--lua-continuations`: Targets Lua 5.3+. Supports one-shot delimited continuations. Also, supports deeply nested `handle`.\n    * `--luajit`: Targets LuaJIT.\n* JavaScript (ES2020+)\n    * `--nodejs`: Produces a JavaScript program for Node.js. The default extension is `.mjs`.\n    * `--nodejs-cps`: Produces a JavaScript program for Node.js (CPS mode; supports delimited continuations). The default extension is `.mjs`.\n    * `--webjs`: Produces a JavaScript program for Web. The default extension is `.js`.\n    * `--webjs-cps`: Produces a JavaScript program for Web (CPS mode; supports delimited continuations). The default extension is `.js`.\n\nOutput type:\n\n* `--exe` (default): Produces Lua/JavaScript program.\n* `--lib`: Produces a Lua/JavaScript module.\n\n## Features\n\n* Full SML '97 language, including signatures and functors\n    * Note that some features conform to Successor ML rather than SML '97.\n* Successor ML features\n* Other language extensions\n* A subset of SML Basis Library\n* ML Basis system for multi-file project\n* Interface to Lua\n* Interface to JavaScript\n* Delimited continuations\n* Other libraries\n","funding_links":["https://github.com/sponsors/minoki"],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminoki%2FLunarML","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminoki%2FLunarML","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminoki%2FLunarML/lists"}