Skip to main content

Module app_layout

Module app_layout 

Source
Expand description

Where an app keeps its code: lumen.toml at the root, everything the compiler front-end reads under src/. Where an app keeps its code.

An app is lumen.toml at its root and every code file - the markup, the stylesheet and the scripts - under src/, the same split a Cargo package uses. Assets, locale/, build outputs and anything a [[hooks]] command reads or writes stay at the root; src/ is only what the compiler front-end opens. One root directory has a meaning of its own: lib/, where a script’s dylib import finds its shared library.

[AppLayout::resolve] is the one place that turns an app directory plus its lumen.toml into the paths the rest of the runtime reads, and the one place that rejects an app whose code is still at its root.

Structs§

AppLayout
The code paths of one app directory.
FlatLayout
The app’s code sits at its root instead of under src/.

Constants§

LIB
Directory name an app keeps its native shared libraries in.
SRC
Directory name an app keeps its code in.

Functions§

src_dir
The directory dir’s code lives in.