Skip to content
LogoLogo

Project configuration

The build commands, lithe fmt, lithe lint, and the language server read settings from a lithe.toml. For each source file they use the nearest one: in the file's own directory, or the first directory above it that has one. lithe fmt - looks from the current directory. Without a lithe.toml, every setting has its default.

# lithe.toml
[build]
evm-version = "prague"
 
[fmt]
width = 100
 
[lint]
allow = ["reentry", "stale-capture"]

[build]

The build flags, for every command that builds: compile, abi, facets, footprint, abi-tree, upgrade, and upgrade-check, a directory build, and the language server's diagnostics. A flag on the command line overrides the file.

KeyDefaultMeaning
evm-version"osaka"the fork the code runs on, "osaka" or "prague". See Target fork
size-limit24576the most runtime code the contract or any facet should have, a number. Code over it still builds, with a warning
create2-deployer"0x4e59b44847b379578588920cA78FbF26c0B4956C"the CREATE2 factory facets are deployed through

[fmt]

KeyDefaultMeaning
width120the column lithe fmt wraps long lines at

Only width is configurable; everything else about the style is fixed. See Formatting.

[lint]

KeyDefaultMeaning
allow[]rules that are silenced everywhere, for lithe lint and for the warnings lithe compile prints

To silence a rule at a single place instead, write a lithe-ignore comment there. See Silencing a rule and the list of rules.

Errors

The file is read strictly. An unknown table, key, or rule name, or a value of the wrong kind, is an error that names the file and line:

lithe.toml:6: unknown rule `reentrancy`

Each table holds one-line key = value settings, and # starts a comment.