BeamNG.Earth
BeamNG.drive용 1:1 비율 실시간 지구, 실제 고도·위성 이미지·부동 원점·보조 서버에서 LOD 스트리밍
Loft는 정적 타입 언어로 브라우저 게임을 만들고 링크 공유로 누구나 플레이하게 함, 네 가지 실행 모드와 인덱스 기록 지원
Loft is a statically typed language for small browser-playable games: write it, share a link, anyone plays. Four execution modes, records with indexes in the language, and a complete arcade game in on
게임Rust · CGitHub @loft-lang온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
A statically-typed scripting language inspired by Rust
저장소 README에서 가져옴
README 전체를 불러오는 중입니다. 아래는 저장된 발췌입니다.
loft — a language that reads like Python, ships like a distribution
▶ Try it in the browser · 📘 Docs · 🎮 Play Brick Buster · 🖼 GalleryREADME 전문 보기 ↗▶ Try it in the browser · 📘 Docs · 🎮 Play Brick Buster · 🖼 Gallery · ✍ Blog
loft is a statically typed language with almost no type annotations. The same source compiles to a native binary through rustc, to WebAssembly for the browser, or runs on a tree-walking interpreter for instant startup. It ships as a distribution: the compiler, a standard library, and 42 libraries in a registry — graphics and 3D, an HTTP server and client, cryptography, text engines, geometry — each one itself written in loft, so they read, debug and ship like your own code.
struct Point { x: float, y: float }
fn distance(a: Point, b: Point) -> float {
dx = a.x - b.x;
dy = a.y - b.y;
sqrt(dx * dx + dy * dy) ?? 0.0
}
fn main() {
p1 = Point { x: 0.0, y: 0.0 };
p2 = Point { x: 3.0, y: 4.0 };
println("distance: {distance(p1, p2)}")
}
$ loft hello.loft
distance: 5
vector<T>, sorted<T>, index<T> and hash<T> collections; bounded generics and
interfaces; par(...) for parallel loops; yield for generators; match for pattern
matching; ?? default for null safety; format strings like Rust's. Types are inferred, and
mistakes are caught at compile time.
Every download is a self-contained bundle: the loft binary, the standard library it
loads at runtime, the examples, the reference PDF, and a SHA256SUMS of every file. Unzip
it and run it; nothing else is required.
| what it is | where | |
|---|---|---|
| Stable | the monthly release, through the full release checklist | Releases — pick the .zip for your platform |
| Daily build | the newest code, built for every pull request and every push to main | the Daily build workflow → open the newest green run → Artifacts |
Four platforms are built each time: x86_64-pc-windows-msvc, x86_64-apple-darwin,
aarch64-apple-darwin (Apple Silicon), and x86_64-unknown-linux-gnu (runs on any Linux
with glibc 2.28 or newer: RHEL 8, Debian 10, Ubuntu 20.04 and later; on a musl system such
as Alpine, build from source).
The fastest way to the daily build is the gh CLI, which skips
the web UI entirely — replace the target with your own:
# the newest daily build of your platform, from any branch or PR
gh run download -R loft-lang/loft -n loft-daily-x86_64-pc-windows-msvc
# or pin it to main, ignoring pull requests
id=$(gh run list -R loft-lang/loft --workflow daily-build.yml --branch main \
--status success --limit 1 --json databaseId --jq '.[0].databaseId')
gh run download -R loft-lang/loft "$id" -n loft-daily-x86_64-unknown-linux-gnu
unzip loft-*.zip && cd loft-*/ # then run it in place:
bin/loft --interpret examples/hello.loft # bin\loft.exe on Windows
A downloaded bundle runs your program on the interpreter. loft's default mode compiles
through rustc when it can, and a bundle deliberately carries no native runtime, so it
interprets instead — that is normal, not a fault to fix. --interpret asks for the
interpreter directly and needs nothing but the bundle. --native-c compiles through C with
the C compiler already on your machine and no Rust — the C runtime is inside the binary (on
Debian/Ubuntu build-essential; for --native-wasm add clang lld wasi-libc libclang-rt-dev-wasm32). Keep bin/ and default/ together:
the binary loads the standard library from <binary-dir>/../default.
Two things worth knowing about daily builds. GitHub requires you to be signed in to
download a workflow artifact — they are not anonymous links, which is the one way they
differ from the Releases page. And each bundle carries a DAILY-BUILD-INFO.txt naming the
commit, the PR and the build time, because "which code is this?" is the question a daily
build gets asked most. They are kept for 30 days, and they have not been through the
release checklist — for anything you depend on, use a release.
# requires a Rust toolchain (1.96 or later)
git clone https://github.com/loft-lang/loft
cd loft
cargo build --release # binary at target/release/loft
./target/release/loft examples/hello.loft
make install-user installs to ~/.local/bin and ~/.local/share/loft without root, and
tells you if ~/.local/bin is not on your PATH. make install (system-wide
/usr/local) elevates only when the prefix is not writable. These are the way onto your
PATH; a copied binary runs too — it uses default/ beside a checkout or share/loft/
beside an installed bin/ when one is there, and otherwise the standard library built
into it.
⚠ Building loft optimised hands one rustc a large crate (codegen-units=1), which can
exhaust memory on a small machine. If a build is killed, use CARGO_BUILD_JOBS=1 — each
concurrent rustc holds its own peak — or take a daily build above and skip compiling
altogether.
Then:
examples/ — seven self-contained programs: hello-world, fibonacci,
fizzbuzz, structs, collections, pattern matching, file I/O.loft prog.loft # compile to a native binary and run it
loft --interpret prog.loft # skip the compile, start now
loft --html prog.loft # one self-contained page you can host
loft repl # an interactive session
loft test # run a package's tests
loft debug prog.loft:12 # stop at line 12, read and edit the live frame
loft install <name> pulls a library from the registry into ~/.loft/registry/. Every one
of them is written in loft — a few add a small Rust bridge for a window, audio, sockets or
cryptography — so they read, debug and ship like your own
code. Each is tested to produce identical results on the interpreter and the native backend,
and is cross-built for WebAssembly unless it needs a device the browser does not have — in
which case it says so, and CI prints the reason.
| area | libraries |
|---|---|
| graphics & 3D | graphics · stage · imaging · mesh3d · glb · text2d · drawing · gridmesh · lavition_ui |
| games | input · fixstep · tween · assets · game_protocol |
| geometry | shapes · hex_field · hex_shape · hex_form · hex_body · hex_edge · and nine more hex_* |
| networking | server (HTTP + WebSocket) · web (client) · ssh |
| text | regex · markdown · html · zttext |
| data & crypto | crypto · cbor · arguments · random · time |
loft api --registry # the whole installable catalogue, with descriptions
loft api graphics # one library's public API, with its documentation
loft doc graphics # render that library's docs as HTML
loft install graphics # …then `use graphics;` in your program
Bounded generics and interfaces keep the libraries type-safe without ceremony, and loft test
runs any package's suite.
A complete arcade game — paddle, ball, coloured bricks, seven powerups, chiptune music, hand-designed levels, pause, game-over, an animated paddle explosion — running in your browser. Click, press Space, play. No install, no sign-up, no download.
It is one file — read all 1,807 lines. No engine and no framework — that file is the game. Its sprite sheet is art, not code, drawn once by a build step into a content pack the game reads and the browser page carries inside itself.
The playground runs loft in your browser with nothing installed, and the gallery is the graphics stack rendering live.
loft uses calendar versions (YYYY.M.N) and is stabilising toward contract 1 — the point
at which compatibility becomes absolute and no working program ever breaks again. Until then
the rule is narrower and written down: what a released version promises is kept, and a
breaking change needs a documented reason and a migration
(COMPATIBILITY.md).
What that means in practice today:
main.Open issues are tracked publicly, and every fix records whether it strained the contract or merely honoured it.
Full reference, tutorial, feature catalogue and a printable PDF at https://loft-lang.org/loft/.
loft doc <package> — render any installed library's guide and API reference as HTML.Build the site locally with make wasm (playground + gallery) then cargo run --bin gendoc,
and open doc/index.html.
loft is developed almost entirely by AI coding agents, steered by one person who put
documentation and tooling above writing code. So everything needed to work on loft is in
this public repository: the full source, over 350,000 lines of documentation, and twelve
executable skills that teach an agent how to fix a bug, change code generation, or ship
a library. Point any capable coding agent at the repo, let it load the skills, and it can
continue the work — investigate, fix, verify on both backends, and land through make ci.
The project's knowledge lives in the repository, not in a founder, so its bus factor is
effectively zero:
How loft develops itself, and how to prove it yourself.
Highest-impact areas today:
DEVELOPMENT.md has the workflow; ROADMAP.md lists the work ahead.
LGPL-3.0-or-later — see LICENSE.