PitchHut
Log in / Sign up
LunarML
5 views
Compile Standard ML to Lua and JavaScript with ease.
Pitch

LunarML is a powerful compiler that transforms Standard ML code into Lua or JavaScript. With easy installation options via Docker or precompiled binaries, you can quickly build and run your programs in your preferred environment. Enhance your coding experience and explore endless possibilities with LunarML, making cross-platform development simple.

Description

LunarML is an innovative Standard ML compiler designed to produce high-quality Lua and JavaScript outputs, enabling developers to leverage the simplicity of Standard ML while utilizing the versatility of these two popular languages. Whether you are a seasoned professional or just starting out, LunarML provides a robust framework for building applications that can run seamlessly on multiple platforms.

Features

  • Comprehensive Support for SML '97: LunarML supports the full Standard ML '97 language, including signatures, functors, and some features aligned with Successor ML.
  • Powerful Language Extensions: Utilize extended features to enhance your programming capabilities.
  • Multi-File Project Management: The ML Basis system offers structured support for managing larger projects with ease.
  • Interfaces for Lua and JavaScript: Easily integrate with Lua and JavaScript, allowing for greater flexibility and functionality within your applications.
  • Delimited Continuations: Harness advanced programming concepts with support for delimited continuations.
  • Subset of SML Basis Library: Access a range of foundational libraries, streamlining your development process.

Usage

LunarML is simple to use, with the following basic command syntax:

lunarml compile [options] input.(sml|mlb)

Subcommands Include:

  • compile: For compiling your program.
  • help: To get assistance on using the tool.
  • version: To check the current version of the compiler.

Compilation Targets:

  • Lua: Compile your code for Lua 5.3+.
  • JavaScript (ES2020+): Create JavaScript programs ready for Node.js execution.

Usage Examples

Here’s a quick start to compile a simple example:

$ lunarml compile example/hello.sml
$ lua example/hello.lua
Hello world!

LunarML makes it easy to get up and running, whether you're using precompiled binaries or building your own from source. With Docker support for easy environment configuration, you can dive straight into your coding without the hassles of manual setup.

For comprehensive documentation and examples, please visit the official LunarML Documentation.

Explore LunarML today and elevate your development capabilities with this powerful compiler!