Project
Source layout
src/main.rs CLI: run, app, new, check, fix, docs, build, fcgi, repl, lsp, dap, versionsrc/new.rs quillo new: a program to start fromsrc/lib.rs the crate: what the binary and the tests usebuild.rs stamps the commit into `quillo --version`The languagesrc/lexer.rs tokens; newline handlingsrc/parser.rs recursive descent: statements, expressions, patterns, HTML, routes, componentssrc/ast.rs the syntax tree, types, effectssrc/interp.rs evaluator, pattern matching, HTML and component rendering, effectssrc/jit.rs numeric functions compiled to machine code (Cranelift)src/value.rs values, maps, scopessrc/error.rs errors with a file and linesrc/record.rs records: type User = { ... }, made, checked, in patternssrc/check.rs the static checker (quillo check, quillo run, the language server)src/modules.rs what each file of a program sees and takes, and `quillo fix`src/script.rs run_script: code a program's users write, sandboxedsrc/native.rs Rust in a program: .qwer files read, built, loaded and called; .quillo/plugins.lock and --no-buildsrc/policy.rs the policy: what whoever runs Quillo lets a program doThe standard librarysrc/builtins.rs the builtins every program can callsrc/numeric.rs math, stats and vec: Python's math and statistics, numpy's operationssrc/decimal.rs dec: exact decimals, for moneysrc/money.rs money: amounts in a currency, its minor units and formatssrc/dates.rs date: calendar dates, date-times, time zonessrc/re.rs re: regular expressions, the same on the server and in the browsersrc/par.rs a pool of threads for long lists, in chunks of a fixed sizesrc/crypto.rs crypto: hashes, signatures, tokens, passwordssrc/imaging.rs image: what an image file is, and new files made from itsrc/highlight.rs highlight(code, lang): source code as HTMLsrc/i18n.rs translationssrc/fetch.rs http: the HTTP client, its cache, and http.streamDatabasessrc/db.rs db: SQLite, connections, tenants, transactions, and the shared APIsrc/pg.rs PostgreSQL (pool, pipelining, placeholders, types)src/my.rs MySQL and MariaDB (the mysql feature)src/migrate.rs db.migrate: schema files applied once eachsrc/txn.rs db.transaction's isolation levels, and trying again after a conflictsrc/sqlinfo.rs which tables a statement reads and writes, for live updatesServingsrc/httpd.rs the event loop: connections, requests as coroutines, waiting off the loopsrc/server.rs request matching, server fns, responses, --watchsrc/stream.rs answers sent as they are made: stream, events, sendsrc/fcgi.rs quillo fcgi: FastCGI requests made HTTP requests for the serversrc/service.rs services: in this process or elsewhere, signed calls, retries and circuits, calls made later, --split, --scale, --joinsrc/ready.rs GET /_quillo/ready: what a program needssrc/describe.rs quillo docs and --describe: the API as OpenAPIsrc/dotenv.rs .env filessrc/livecache.rs live data: runs shared between pages, and patchessrc/session.rs cookies and sessionssrc/idempotency.rs idempotent(f): requests with an Idempotency-Key run oncesrc/upload.rs files sent with a formsrc/statics.rs files served with file()src/site.rs what a program sets about its site: tenants, cross-site posts, site_headerssrc/sites.rs site name = URL: calling another Quillo site's server fnssrc/jobs.rs jobs run on a schedulesrc/viewcache.rs reusing views' HTML while their inputs are unchangedsrc/ws.rs WebSockets, for live updates, --watch reloads and channelssrc/udp.rs UDP: udp.listen, udp.send, udp.replysrc/wt.rs channels between the server and its pages, over WebTransport (the realtime feature) or a WebSocketsrc/media.rs RTP from cameras and encoders, and pages' own cameras, passed on to <quillo-media>src/cluster.rs several servers behind limer: --register, broadcastssrc/metrics.rs what GET /_quillo/metrics reports, and the request log's shapesrc/shared.rs the interpreter lock and other state shared between threadssrc/alloc.rs the memory allocator: mimalloc on event loops and waiting threads, the system's elsewheresrc/stack.rs room on the stack for deep recursionsrc/desktop.rs quillo app: the program in a native window (the app feature)src/mobile.rs a program inside a phone app: copied into the app, served to its web viewsrc/platform.rs platform(): where the program runsThe browser and editorssrc/client.rs compiles components to JavaScriptsrc/client/runtime.js the browser runtime: values, standard library, signals and markupsrc/island.rs when a page loads its components' codesrc/styles.rs components' and views' own CSS, scopedsrc/lsp.rs the language serversrc/debug.rs quillo dap: the debuggerapp/ a sample app to start from (main.qwe, lib/, ui/, migrations/, public/)tests/ one file per part: the language, routes, records, effects, the checker, numbers, decimals, money, dates, crypto, images, Markdown, translations, migrations, scripts, streams, UDP, Rust (.qwer), services, sessions, uploads, tenants, idempotency, isolation, static files, cached views, compiled numbers, security, several databases, the debugger and the language server; tests/programs/ holds the programs they run, tests/browser/ the pages and Node scripts, tests/support/ free ports and throwaway database serversscripts/ doctor.sh and doctor.ps1: what a machine needs, checkeddeny.toml cargo-deny's rules for dependencies (run in CI)What cargo test needs: Rust and a C compiler; Node (22 or later; 24 for the money
tests, which compare with its CLDR data) for the compiler's tests; Chrome or Chromium
(QUILLO_CHROME) for the browser's; PostgreSQL's initdb and pg_ctl
(QUILLO_TEST_PG_BIN) and MariaDB's mariadbd (QUILLO_TEST_MYSQL_BIN), which it runs
as throwaway servers; a limer binary (LIMER, or ../limer/limer) for the several
servers tests; and the network, for the Rust tests' first build of a crate. A test whose
tool is missing says so and is skipped, except the Rust ones. QUILLO_TEST_LOG=1 shows
the test servers' output.
quillo is also a library crate (quillo::eval_str, the interpreter, the server, the
checker), used by the binary and the tests; it is not published to crates.io, and its
Rust API makes no promise of staying the same.
Thread 0 posts
On Source layout: questions, tips, corrections, and code that uses it.
No posts yet. The first one opens the thread.
Edit this page on GitHub · made from the user guide · questions on Discord or r/quillo