Experimental — v0.1

Lasso in Rust

An experimental Lasso 9 runtime for modern Linux. Strict compatibility, no silent semantic drift, built in Rust.

Explore the Language Get Started with the CLI

What is LaiRu?

LaiRuLasso in Rust — is an open-source interpreter targeting Lasso 9 compatibility, running on modern Linux. Where the original Lasso 9 server is no longer maintained, LaiRu aims to give existing Lasso applications a path forward without silent changes to their semantics.

LaiRu 0.1 is a runnable compatibility foundation. It implements a focused core of the Lasso 9 language — enough to run real code, serve real pages, and query MySQL databases — while clearly documenting its current limits. When a feature is missing, LaiRu fails loudly rather than silently mishandling legacy behaviour.

Pre-production status. LaiRu 0.1 is not a complete drop-in replacement for Lasso 9. Read the Roadmap before attempting to run a production application.

Live from LaiRu

This page is being rendered by LaiRu right now. A few expressions evaluated at request time:

▶ Running on LaiRu
6 * 7 42
'hello world'->uppercase HELLO WORLD
array(1, 2, 3, 4, 5)->sum 15
42 > 0 ? 'positive' | 'negative' positive
date()->format('YYYY-MM-dd') 2026-05-13

What’s Implemented

📝

Language Core

Variables, literals, operators, arbitrary-precision arithmetic, methods, and control flow.

🧩

Type System

Custom types, traits, parent types, data fields, member methods, and access control.

🔍

Query Expressions

Native query syntax: with / where / order by / group by / select and aggregates.

📦

Captures

Closures, yield/resume, detached captures, continuations, and error handlers.

📄

Templates

Bracket-tag rendering for .lasso, .lasso9, and .lp files with LDML support.

🌐

HTTP Service

TCP and unix socket serving, FastCGI/FPM, nginx and Apache integration.

🗄️

MySQL Database

Inline queries, prepared statements, TLS, result metadata, and connection pooling.

🔧

Built-in Library

Collections, strings, dates, math, encoding, crypto digests, file operations.

💻

CLI

eval, run, render, check, ast, compat-report, serve, and fpm commands.

Quick Start

Build

cd lasso-rust
cargo build
cargo test

Evaluate an expression

cargo run -- eval "local(name) = 'LaiRu'; #name + ' 0.1'"

Run a script

cargo run -- run examples/core.lasso

Render a template

cargo run -- render examples/index.lasso

Start the HTTP service

cargo run -- serve --addr 127.0.0.1:9010 --docroot /var/www/html

The service renders files ending in .lasso, .lasso9, or .lp, and serves everything else as static assets. See the Service page for nginx, Apache, and FastCGI integration.

A Simple Template

A Lasso template rendered by LaiRu looks like ordinary HTML with bracketed expressions:

<!doctype html>
<html lang="en">
<body>

  <h1>[local(name) = 'Ada']Hello, [#name]!</h1>

  [define square(n) => #n * #n]
  <p>7 squared is [square(7)].</p>

  <ul>
  [with item in array('Lasso', 'in', 'Rust')
   select '<li>' + #item + '</li>']
  </ul>

</body>
</html>