Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
L

lily

> 编程语言
Open source

Interpreted language focused on expressiveness and type safety.

1.1K stars0 likes0 views
WebsiteGitHub

About

Interpreted language focused on expressiveness and type safety.

Lily

Lily is a programming language focused on expressiveness and type safety.

Sample

enum Color { Black, Blue, Cyan, Green, Magenta, Red, White, Yellow }

class Terminal(public var @foreground: Color, width_str: String)
{
    public var @width = width_str.parse_i().unwrap_or(80)

    public define set_fg(new_color: Color) {
        @foreground = new_color
    }
}

var terms = [Terminal(Color.White, "A"), Terminal(.Red, "40")]

terms.each(|e| e.width += 20 )
     |> print

Features

Embeddable

Lily may be a statically-typed language, but the reference implementation is an interpreter. The interpreter as well as its API have been carefully designed with sandboxing in mind. As a result, it's possible to have multiple interpreters exist alongside each other.

Shorter edit cycle

Another benefit from having the reference implementation as an interpreter is a shorter turn around time. The interpreter's parser is comparable in speed to that of languages using an interpreter as their reference.

Building

You need a C compiler (C11+) and CMake (3.10+). There are no external dependencies.

To build Lily, execute the following in a terminal:

cmake .
cmake --build .

Note: Windows users may need to add -G"Unix Makefiles" to the end of the cmake invocation.

The above will build the lily executable, as well as a liblily that you can use with your program. It also builds pre-commit-tests.

Running tests

The centerpiece of Lily's testing is test_main.lily in the test directory. That file imports and invokes a large number of tests that cover a lot of Lily.

The make command also builds covlib and pre-commit-tests. No additional commands are necessary. covlib is a library that tests some parts of Lily that native code can't test. pre-commit-tests is a special runner that executes test_main.lily.

To run Lily's tests, execute pre-commit-tests from the directory it's in after building Lily.

Resources

  • Documentation

  • Builtin module reference

  • Try it in your browser

Packaging

The lily-garden repository contains a package manager (Garden) that simplifies the install of Lily packages.

License

MIT

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Cembeddableinterpreterlanguagelily

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言