Using LaiRu

A practical guide to command-line Lasso, templates, projects, configuration, and web deployment.

Choose an execution mode

lairu run file.lasso
Runs a Lasso source file as a script.
lairu render page.lasso
Renders a mixed HTML/Lasso template.
lairu check file.lasso
Parses and validates source without running it.
lairu serve
Starts the built-in HTTP server for local development.
lairu-fpm
Runs persistent FastCGI workers behind nginx or Apache.

Suggested project layout

1my-site/2  _init.inc3  index.lasso4  app/5    methods.lasso6  assets/7    site.css8  config/9    lairu.ini

Use _init.inc for definition-only bootstrap code. Keep page output in .lasso, .lasso9, or .lp templates. Includes resolve inside the configured document root.

Template forms

1[local(title) = 'Lasso on Debian']2<!doctype html>3<title>[#title]</title>4<?lasso5  local(items) = array('CLI', 'Templates', 'FastCGI')6?>7<ul>[with item in #items do => { '<li>' + #item + '</li>' }]</ul>

Configuration

For a single development command, flags are enough. For repeatable service deployments, put paths, process-pool limits, runtime limits, session storage, and module choices in an ini file.

1[paths]2document_root=/srv/my-lasso-site3session_dir=/var/lib/lairu/my-site/sessions4socket_dir=/run/lairu56[lairu-fpm]7unix_socket=/run/lairu/my-site.sock8max_children=49max_inflight_requests=3210worker_stack_bytes=167772161112[interpreter]13template_cache=true14parse_cache=true15max_execution_millis=300001617[sessions]18store=file19dir=/var/lib/lairu/my-site/sessions

Development workflow

  1. Run lairu check before executing unfamiliar legacy files.
  2. Compare important pages with the original Lasso runtime and add small regression fixtures for differences.
  3. Use the built-in server locally; use FPM behind a web server for persistent workers.
  4. Keep secrets outside the document root and run LaiRu as an unprivileged service account.
  5. Review the published compatibility map after each interpreter update.

Current limits

LaiRu has broad language and library coverage but remains pre-alpha. Production isolation, lifecycle behavior, full compatibility, performance, and operational recovery still need work. The release has only been built and tested on Debian 13 x86-64.