SML On Stilts
Standard ML JavaScript CSS C Python Shell
Switch branches/tags
Nothing to show
Latest commit c7ba8cf Feb 7, 2014 @j4cbo j4cbo Merge pull request #1 from msullivan/master
Implement insert_id/affected_rows and add a blob type that works with sqlite.
Failed to load latest commit information.
barebones Add new very-barebones demo app. Unlike the wiki, this doesn't even u… Aug 30, 2010
chiralml [chiralml] Work around a severe SML/NJ bug. Sep 2, 2010
curl Add curl MLton FFI bindings Aug 7, 2010
db Implement the blob type for the sqlite backend. Afraid of the mysql b… Feb 6, 2014
mlmusic Change all existing calls to Form.unquote to use WebUtil.urldecode in… Aug 8, 2010
smelt [misc] Add smelt and squall binaries to .gitignore Aug 30, 2010
util Add .gitignore files Feb 23, 2010
web Add Form.import and Form.export Apr 3, 2011
wiki [wiki] Wiki demo fixes Aug 27, 2010
.gitignore ignore *.html.sml Mar 31, 2010
LICENSE Update copyright in LICENSE file Aug 12, 2010 Sep 30, 2013

SML On Stilts

Stilts is a framework for robust web development based on multistage programming. Rather than performing extensive introspection and processing at runtime, Stilts compiles portions of the application together in multiple passes to ensure strict correctness between components. For example, templates are never parsed on the fly; instead, they are pre-serialized as much as possible into code. Type-checking all invocations of the template ensures that the application always passes templates the parameters they expect. Similarly, SQL statements are wrapped together with their input and output types, and escaping code inserted automatically.

The framework is written in Standard ML. Both SML/NJ and MLton are supported, with parallel CM and ML Basis build systems.


  • Core Web application types, signatures, and utility functions.
  • A high-performance userspace threading system.
  • Server implementations of FastCGI, SCGI, and HTTP, allowing Stilts applications to be invoked from a variety of front-end Web servers or as a standalone daemon.
  • Smelt, an HTML / XML templating system.
  • Squall, a SQL query wrapper function generator.
  • Infrastructure for interfacing with MySQL and SQLite.
  • A simple Wiki, as a demo application.

See each component's README file for more documentation.


Some notes:

  • On debian, you will need to install the following packages in addition to smlnj: libckit-smlnj libmlnlffi-smlnj ml-nlffigen ml-lex ml-yacc ml-lpt

  • ml-yacc may fail like so:

      Usage: ml-yacc filename
      ../db/squall/ Error: tool "ML-Yacc" failed: "/usr/lib/smlnj/bin/ml-yacc" "" "input.grm"

    Run ml-yacc filename by hand. (Argh, SML/NJ.)