---
title: "Projects"
description: "Configure module roots, dependencies, and source discovery with atoll.toml."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.atoll.workreef.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Projects

A project is a source tree rooted by `atoll.toml`. The manifest names the module
root; the directory layout does the rest.

```text
ledger/
  atoll.toml            module = "example.dev/ledger"
  main.at               module  example.dev/ledger
  money/
    amount.at           module  example.dev/ledger/money
    tax.at              module  example.dev/ledger/money
  report/
    format.at           module  example.dev/ledger/report
  audit/
    format.at           module  example.dev/ledger/audit
```

```toml
# ledger/atoll.toml
module = "example.dev/ledger"
name = "ledger"
version = "0.1.0"
```

`module` is the only required field, and it is the import prefix for every file
in the tree. A file's module path is `module` plus its directory relative to the
package's source root — `src/` when the package has one, and the manifest's own
directory when it does not — so `money/amount.at` is in `example.dev/ledger/money`
and `main.at` is in `example.dev/ledger` itself.

| Field | Purpose |
| --- | --- |
| `module` | Required canonical import root |
| `name` | Human-readable project name |
| `description` | Project description |
| `version` | Validated semantic version |

Omitting `module` is a load error, not a default:

```toml project=ledger file=atoll.toml fail
name = "ledger"
version = "0.1.0"
```

```text output
$ atoll check ledger
atoll check: atoll.toml: missing required `module` field
```

and `version` must be a full semantic version:

```toml project=ledger file=atoll.toml fail
module = "example.dev/ledger"
version = "1.0"
```

```text output
$ atoll check ledger
atoll check: atoll.toml: `version = "1.0"` is not valid semver: unexpected end of input while parsing minor version number
```

A `module` of `std`, or a path under it, is refused at its value (`ATOLL1082`),
as Cargo refuses a package named `std`: that path is the stdlib's. Today's
compiler takes such a package.

TOML is the supported format; historical YAML manifests are not part of the
current toolchain.

`atoll new demo` makes a project whose source is under `src/`, with a test beside
it, and the result checks and tests clean:

```text output project=one-file
$ atoll new demo
Created binary project `demo` at demo
$ atoll check demo
OK (0 diagnostics)
$ cd demo
$ atoll test
    PASS [   0.001s] src/main_test.at: greets
------------
 Summary [   0.015s] 1 test run: 1 passed, 0 failed
 Slowest: 0.001s src/main_test.at: greets
```

## Entry points and units

An entry point is `fn main` or any `fn entry_*`, and a program may declare
several. A build is one wasm module that exports each of them, with what they
call:

```atoll project=units file=main.at
fn tax_cents(cents int) int {
    return cents * 825 / 10000
}

fn main() int {
    due := 1999 + tax_cents(1999)
    println("due cents: ${due}")
    return due
}

fn entry_audit() int {
    tax := tax_cents(1999)
    println("tax cents: ${tax}")
    return tax
}
```

```text output
$ atoll build main.at -o out
Wrote out/main.wasm
  entry points: main, entry_audit
$ atoll run main.at --unit entry_audit
tax cents: 164
atoll run: `entry_audit` returned 164
```

`tax_cents` is reachable from both entries, and is in the module once. `atoll
run` starts at `main` unless `--unit` names another.

### Only reachable code is lowered

The consequence people trip over: a function no entry point reaches is
type-checked but never lowered to wasm. Here `probe` calls a `@host` function
this module declares and nothing implements — and because nothing calls `probe`,
the import never even lands in the built module, so the program runs:

```atoll
@host
fn ping() int

fn probe() int {
    return ping()
}

fn main() int {
    println("probe is never called, so it is never lowered")
    return 0
}
```

Call it from `main` and the same program type-checks and builds — the import is
now declared in the module — and the run refuses the moment the module binds to
a host that does not implement it:

```atoll project=probe file=main.at
@host
fn ping() int

fn probe() int {
    return ping()
}

fn main() int {
    return probe()
}
```

```text output
$ atoll check main.at
OK (0 diagnostics)

$ atoll run main.at
atoll run: `main` failed: the host does not implement what the module declares:
  `main.ping` is declared `@host` and nothing implements it
```

`atoll check` passing is not the same as the program running. Exercise every
entry point against the runtime you intend to ship on.

## Build, check, run

```text output project=ledger
$ atoll check ledger
OK (0 diagnostics)

$ atoll run ledger/main.at
amount due: $156
atoll run: `main` returned 156

$ atoll run ledger/main.at --unit entry_audit
ada changed invoice to $21
atoll run: `entry_audit` returned 21

$ atoll build ledger -o out
Wrote out/ledger.wasm
  entry points: main, entry_audit
```

`atoll check`, `atoll build` and `atoll run` all take the project directory or a
file of it. Run from a directory, `atoll run` starts at the project's `main`;
named by a file, at that file's module's, which is what tells apart two modules
that each declare one.

## Depending on another project

Everything in this section is one worked example. A library project:

```text
common/
  atoll.toml          module = "example.dev/common", edition = "2026"
  money.at
```

What it offers another package is what it marks `pub` — the type, the field a
consumer builds it with, and the function; the rest is the library's own:

```atoll project=common file=money.at
pub struct Money {
    pub cents int
}

pub fn dollars(m Money) int {
    return m.cents / 100
}
```

An application that depends on it by path:

```toml project=app file=atoll.toml
# app/atoll.toml
module = "example.dev/app"
name = "app"
version = "0.1.0"
edition = "2026"

[dependencies]
"example.dev/common" = { path = "../common" }
```

```atoll project=app file=main.at
import example.dev/common.{Money, dollars}

fn main() int {
    m := Money { cents: 12345 }
    println("dollars: ${dollars(m)}")
    return dollars(m)
}
```

`atoll` walks both trees, resolves the import, and builds one module:

```text output
$ atoll check app
OK (0 diagnostics)

$ atoll run app/main.at
dollars: 123
atoll run: `main` returned 123

$ atoll build app/main.at -o out
Wrote out/app.wasm
  entry points: main
```

Note the dependency key: it is the dependency's **module path**, not its
directory name, and it must match the `module` value in that project's own
manifest.

### Dependency forms

```toml
[dependencies]
"example.dev/common" = { path = "../common" }
"github.com/acme/forms" = "^1.2"
"example.dev/http" = { git = "https://example.com/http.git", version = "^2" }
"example.dev/pinned" = { git = "https://example.com/pinned.git", rev = "7a6c7f0" }
"github.com/acme/json" = { version = "^1", optional = true, features = ["pretty"] }
```

| Form | What it does |
| --- | --- |
| `{ path = "…" }` | Walked locally and compiled with the project |
| a version requirement | Its versions are its repository's `vX.Y.Z` tags, and the module path is where the repository is — `github.com/acme/forms` is `https://github.com/acme/forms`. One version of each module for the whole build, the highest every requirement allows |
| `{ git = "…", version = "…" }` | The same, from the repository named: for a module whose path is not where it lives |
| `{ git = "…", rev = "…" }` | Fetched at exactly `rev` — a commit, a tag or a branch — and walked locally |
| `{ layer = "^1" }` | A dependency taken as a checked layer only, with no source |

**There is nothing to publish to.** A version is a tag —
[Publishing a package](https://docs.atoll.workreef.dev/language/modules/publishing/) walks through it:

```sh
atoll api diff v1.2.0     # what changed since the last tag, and whether 1.3.0 is the right bump
git tag v1.3.0 && git push --tags
```

and `atoll add github.com/acme/forms` writes `"^1.3"` — the newest tag, as a
requirement — after checking the repository is there and has one. A major
version is its own module, `github.com/acme/forms/v2`: the same repository, its
`v2.x.y` tags, and the package in the repository's `v2/` directory while the
root is still 1.x. The manifest at a tag has to state the version the tag does,
or none. Private repositories need nothing from Atoll: git's own credentials —
an SSH key, a credential helper — reach them, and git's `url.<base>.insteadOf`
points a module path at a mirror.

Every form is recorded in `atoll.lock`: the version chosen and the commit its
tag named, the commit a git `rev` resolved to, and a digest of the source.
Every build checks the lock, so a version moves only under `atoll update` — and
a tag that was moved to other code since is refused, not followed. A
dependency entry can also turn on the dependency's features or make it
optional — see
[Features](https://docs.atoll.workreef.dev/language/modules/features/) — and give it a local name with
`as = "…"`.

A dependency carrying its own `atoll.toml` uses that manifest's `module` as its
root; a bare local directory uses the dependency key as its root. Path entries
are relative to the owning project unless absolute, and a missing directory is a
load error.

Contexts that cannot fetch, such as the editor and some test harnesses, read a
git dependency or a version from the cache a build filled, and say so when it is
not there. Once fetched, a checkout is walked exactly like a path dependency.
Offline, a version is resolved against the tags this machine last read.

### A dependency's own decorators

A dependency's decorators run when its layer is sealed, so what they generate is
part of the layer every project that depends on it links. The dependency is
compiled as a program of its own, over its own dependencies, and the files its
decorators generate are sealed with its source. A dependency that applies no
decorator pays nothing for this.

What that code may do is narrower than what the project's own may. A dependency
reads its own tree through the files its own `atoll.toml` lists under
`[comptime] files`, and nothing else of it; it reads nothing of the project that
imports it. Anything beyond that, such as the history of the repository
(`std/git`), is the importing project's to give, by name:

```toml
[comptime.deps."example.dev/lib"]
allow = ["std/git"]
```

The dependency's own `[comptime] allow` is not read, so adding a dependency
gives its decorators nothing of the build machine. A decorator that reaches
what the project did not grant is `ATOLL8006` at the application, naming the
entry to write. The layer is keyed by the decorator's source, the files it may
read and the grant, so a change to any of them seals it again.

A dependency's generators never run in a project that imports it. Their output
is the `.gen.at` file the dependency checked in, which is source like any other.

## Workspaces

A workspace builds several projects as one: one resolution across all of them, so
two members that depend on one module get one version of it, and one
`atoll.lock`, at the root. Its root names the members, and may state a dependency
once for them all:

```toml project=ws file=atoll.toml
[workspace]
members = ["lib", "cli"]

[workspace.dependencies]
"example.dev/common" = { path = "../common" }
```

A member takes a workspace dependency with `{ workspace = true }`:

```toml project=ws file=lib/atoll.toml
module = "example.dev/ws/lib"

[dependencies]
"example.dev/common" = { workspace = true }
```

`cli` is a program over `lib`. At the root, `check`, `build`, `test`, `tree` and
`api` visit each member, a member's dependencies first; `run` runs the one
member that declares a program:

```text output
$ atoll check ws
atoll check: lib
OK (0 diagnostics)
atoll check: cli
OK (0 diagnostics)
$ atoll run ws
price: 42
atoll run: `main` returned 42
$ cd ws
$ atoll tree
atoll tree: lib
example.dev/ws/lib
└── example.dev/common (../../common)
atoll tree: cli
example.dev/ws/cli
└── example.dev/ws/lib (../lib)
    └── example.dev/common (../../common)
```

`atoll lock` at the root locks every member's graph, and names no one member, so
whichever member's build writes the lock writes the same file. `atoll why` there
answers for the workspace: a feature is on when any member's build turns it on.

## Extra source roots

`[libs]` adds directories whose contents join the *current* project's module
namespace — no dependency entry, no separate manifest:

```toml project=libs file=atoll.toml
# libs/atoll.toml
module = "example.dev/libs"
name = "libs"

[libs]
paths = ["lib", "../shared"]
```

Each library path is resolved relative to the project root, and its own
subdirectories are appended to the configured module root. With the manifest
above, `lib/util/clamp.at` lands in `example.dev/libs/util` — the `lib/` segment
itself disappears:

```atoll project=libs file=lib/util/clamp.at
fn clamp(v int, lo int, hi int) int {
    if v < lo { return lo }
    if v > hi { return hi }
    return v
}
```

```atoll project=libs file=main.at
import example.dev/libs/util.{clamp}

fn main() int {
    v := clamp(12, 0, 10)
    println("clamped: ${v}")
    return v
}
```

```text output
$ atoll run libs/main.at
clamped: 10
atoll run: `main` returned 10
```

Because those files share one namespace with the main root, duplicate
declarations across the two roots collide. Use `[libs]` for vendored source you
own; use `[dependencies]` when the other tree has its own module identity.

## Source discovery

The loader recursively collects `.at` files under every root, skipping
dot-prefixed directories, `target`, `node_modules`, and `build`. Files are
sorted before loading so project input and diagnostics are deterministic; other
extensions do not participate in module scope.

`atoll check path/to/tree` also works on a directory with no manifest. The
directory name becomes a synthetic root module and the same exclusions apply,
but there are no dependencies, datasources, or host allow-list. A lone `.at`
file compiles as a one-shot target when no project contains it. Create
`atoll.toml` as soon as module identity or reproducible behavior matters.

## Where code runs

Which functions and types run where is inferred from what they reach, as
effects are. Nothing in a program says native, wasm or web, except the
declarations at the leaves. The language knows four hosts:
- `runtime`, Atoll's own runtime, native or wasm under wasmtime: `atoll run`,
  servers, build-time code and tests;
- `web`, a browser page, as wasm beside the JS host;
- `node`, the node JS host;
- `pdf`, a render with no events.

The platform (`linux`, `macos`, `ios`, `android`, `windows`) is a second axis,
as `--target` is.

A host module states once which hosts provide it: `js` the web and node,
`web/*` the web, `fs`, `process` and `tcp` the runtime, and a module with no
host functions all of them. A host package states its own in its manifest. A
function is available on a host when everything it reaches is provided there,
and a type follows its module. Each root is checked against the host it runs
on, and a reach the host cannot provide is refused at the use (`ATOLL1132`),
naming the module, the host and the chain (`App → Header → dom.window`).

A module may have a body per host or platform, picked by file name:
`clipboard.at` is the default, and `clipboard.web.at` or `clipboard.macos.at`
beside it is that host's or that platform's body, chosen by the build with no
branching at run time. Every variant exports the same interface, and `atoll
check` checks every one whatever the target, so a portable module is proven
portable on every host at once.

A library has no roots, so its manifest says what its own build checks it
against:

```toml
[package]
hosts = ["runtime", "web"]
```

An optional feature of a host, such as a web API only a secure context has,
answers `T?`, so its absence is a value to test rather than a surprise at run
time.

The inference is the new compiler's, and it is not built yet. Today's compiler
refuses a browser build that reaches a runtime-only module (`ATOLL1132`, as
[PDF](https://docs.atoll.workreef.dev/language/standard-library/pdf/) shows), and reads no file-name variants
and no `[package] hosts`.

## Host capabilities

`[host] allow` says which host operations the project may call. An entry is
either a module, which grants every host operation the module declares, or one
operation in it: the module, a dot, and the operation's own name, `Type.method`
for a method.

| Configuration | Behavior |
| --- | --- |
| No `[host]` section | Allow every host operation |
| `allow = []` | Deny every host operation |
| Non-empty `allow` | Permit exactly the listed operations, and every operation of the listed modules |

A capability guards an effect, not arithmetic: an operation that touches nothing
outside the program — float math, number parsing, a string search, a digest —
needs no grant under any list.

Denial is a compile-time diagnostic, not a runtime surprise. This program is
ordinary Atoll:

```atoll
fn main() int {
    println("hello")
    return 0
}
```

`println` is a host operation of the standard library's core, `std`, so its
key is `std.println`. Granting it, and the `eprintln` beside it, by name:

```toml project=hello file=atoll.toml
module = "example.dev/hello"

[host]
allow = ["std.println", "std.eprintln"]
```

The program checks and runs. So does it under `allow = ["std"]`, which grants
every host operation in the core. A module's operations are granted the same
way: `"std/fs"` grants all of the file system, and `"std/fs.File.write"`
grants writing a file and nothing else. With `allow = []`:

```toml project=hello file=atoll.toml fail
module = "example.dev/hello"

[host]
allow = []
```

it is rejected before anything is emitted, at the call:

```text output
$ atoll check hello
error[ATOLL4001]: host call `println` requires `std.println`, which this project does not grant at hello/main.at:2:5
  help: the `[host] allow` list is empty, so no host operation is granted; add `"std.println"` to grant this operation alone, or `"std"` for every host operation in `std`
1 error(s) found
```

The help names the narrowest grant first, the operation itself, and its module
second. A call into a library function that reaches host operations names
every one it reaches.

An entry that grants nothing is refused rather than ignored, so a misspelled
one cannot leave the program without the operation it was meant to grant:

```toml project=hello file=atoll.toml fail
module = "example.dev/hello"

[host]
allow = ["std.printn"]
```

```text output
$ atoll check hello
error[ATOLL4002]: `[host] allow` names `std.printn`, which is neither a module with host operations nor one of their operations, so it grants nothing at hello/atoll.toml:4:10
  help: did you mean `"std.println"`?
…
```

A namespace from an older manifest, such as `atoll_runtime::io`, is refused
when the manifest is read, with the entries that grant what it did.

### Implementing a module's host operations

`allow` says which host operations a project may *call*. `implementation` says
which Rust crate *answers* the ones it declares itself:

```toml
[host]
implementation = { crate = "acme-imaging", path = "host" }
```

Exactly one of `path`, `version`, or `git` names the crate. `atoll bindings
--mode crate -o host .` writes the crate: the wasm imports are generated from
the declarations, and the bodies in `src/hosts.rs` are yours. See
[Host functions in a module](https://docs.atoll.workreef.dev/language/modules/host-functions/) for the whole
loop, including using a module that ships one.

A program calling declarations the shipped `atoll` does not implement cannot run
on it — binding refuses an unimplemented declaration by name, at startup. So
`atoll run` builds an `atoll` that carries the crate and proxies to it. The
build is cached per `(atoll source, rustc, target, profile, implementations)`,
not per project and not per edit: the first run of a given set costs a cargo
build, and later ones cost nothing. A project that declares no implementation
never reaches any of this.

A dependency may declare one too, and then it is linked as well — which is why
the lockfile records both.

The standard library's own host operations are answered the same way, by Rust
compiled into `atoll`, one cargo feature per module: `fs` (the `files`
feature), `http`, `tcp`, `udp`, `dns`, `process`, `s3`, `crypto`, `sql` and
`arrow`, every one but `arrow` on in the default build. `arrow` is opt-in for
now: `cargo build -p atoll-cli --features arrow` builds an `atoll` that answers
it. An `atoll` built with a module left out refuses a program that reaches it
when the program is checked or built — an `import` of the module, in the
program or in a dependency, and for `sql` and `arrow` a query or an `AS FRAME`
— with `ATOLL4003` naming the module and the feature, rather than failing when
the program starts.

Note that `println` needs `std.println` — an empty allow-list really does
deny everything, including printing. Write an explicit allow-list for anything
you deploy; omitting the section is convenient but expresses no least privilege.

## Datasources

Each `[datasources.NAME]` entry requires `schema`, `engine`, and `url`:

```toml project=ledger file=atoll.toml
module = "example.dev/ledger"

[datasources.PRIMARY]
schema = "ledger"
engine = "PostgreSQL"
url = "${DATABASE_URL}"
readOnly = false
pool = { min = 2, max = 16 }
```

`${VAR}` references in a datasource URL are kept as written, and substituted
where a connection is opened. Only `atoll migrate` opens one, so `atoll check`,
`build`, `run`, `test` and the editor never need the variable set. `atoll
migrate` reports an unset variable by name before it connects:

```text output
$ atoll check ledger
OK (0 diagnostics)
$ cd ledger
$ atoll migrate status
atoll migrate: atoll.toml: environment variable `${DATABASE_URL}` referenced by `datasources.PRIMARY.url` is not set
```

Engine names are case-sensitive, and a typo fails the manifest load with the
full set spelled out:

```toml project=ledger file=atoll.toml fail
module = "example.dev/ledger"

[datasources.PRIMARY]
schema = "ledger"
engine = "Postgres"
url = "${DATABASE_URL}"
```

```text output
$ atoll check ledger
atoll check: atoll.toml [datasources.PRIMARY]: unknown engine `Postgres` (expected one of: PostgreSQL, MySQL, SQLite, Turso, DataFusion, DuckDB)
```

A reference written wrong, such as an unclosed `${`, is a mistake in the manifest
whatever the environment holds, so every command reports it when it reads the
manifest.

Datasource names label configuration entries; query routing is driven by the
declared logical `schema`. `readOnly = true` rejects compiled writes routed to
that datasource. See [Datasources](https://docs.atoll.workreef.dev/language/sql/datasources/).

## Locking

`atoll.lock` records the resolved graph: for each dependency, the version or
commit it resolved to and a SHA-256 digest of its source tree, and for each
`[host] implementation` — the project's own and its dependencies' — a digest
of its Rust tree. Commit it.

```text
# atoll.lock — generated by `atoll lock`. Commit this file.
# Records resolved dependencies for reproducible builds.

version = "2"
project = "example.dev/app"
locked_at_unix = 1791135271
compiler = "0.1.0"

[deps."example.dev/common"]
kind = "local"
source = "../common"
content_hash = "25eb93907eff59cb824cd3ec632050a2a69edba29e90250d1577edab603af93a"
```

**Every build reads the lock.** It takes the locked version of each module when
the manifests still allow it, and checks the source of every git and version
dependency against its digest, refusing one that does not match: those are bytes
from elsewhere, and a different tree under the same pin is a different program.
A `path` dependency is your own working tree and is meant to change, so a build
does not refuse an edited one; `atoll lock --check` reports it. When the manifests ask for
something the lock does not describe — a dependency added, removed, or given a
requirement its locked version fails — `check`, `build`, `run` and `test` solve
past the lock and write it back. `--locked` (or `ATOLL_LOCK_POLICY=require`)
refuses to depart from it instead, which is the CI setting. The editor never
writes it.

A host implementation is native code compiled into the binary that runs the
program, so it is locked for the same reason a dependency is. Three things count
as drift: the crate's Rust sources or `Cargo.toml` changed, the declared source
changed (a `path` repointed, a `git` revision moved), or the declaration is
gone.

`atoll lock --check` reports drift without changing anything. The `app` above,
with its lock committed:

```text output project=app
$ cd app
$ atoll lock --check
atoll.lock is up to date
```

and after an edit to `common/money.at`:

```atoll project=common file=money.at
pub struct Money {
    pub cents int
}

pub fn dollars(m Money) int {
    return m.cents / 100
}

pub fn cents(m Money) int {
    return m.cents
}
```

```text output
$ cd app
$ atoll lock --check
atoll lock: atoll.lock is out of date for: example.dev/common (changed) (run `atoll lock`)
```

The lock covers dependency source and nothing else:

| Input | Lock coverage |
| --- | --- |
| Project `.at` files | not locked — use your VCS revision |
| Path dependency source | source-tree digest |
| Git dependency | the commit `rev` resolved to, and source-tree digest |
| Version dependency | the version chosen, the commit its tag named, and source-tree digest |
| Host implementation (`path`) | package name and Rust-tree digest |
| Host implementation (`version`, `git`) | package name and pin |
| Datasource engine, schema, URL | not locked |
| Host allow-list | not locked |

A digest says the bytes are the ones that were locked. It does not say they are
safe to compile and run: anyone who could edit the dependency before it was
locked chose those bytes. Read what you link.

## Other sections

`[fmt]` sets how `atoll fmt` lays out this project's source: `indent` (spaces),
`tabs = true`, and `width`. No other command reads it, but none of them report it
as an unknown section either.

```toml
[fmt]
indent = 2
width = 100
```

`[build]` holds what a build of this project is, beyond its level:
`preempt = false` compiles it without preemption poll sites, as `--no-preempt`
does. Only the root project's applies, since whether a program can be stopped
mid-loop is a property of the whole program.

```toml
[build]
preempt = false
```

`resident = true` has a `build` or a `check` of this project start a resident
worker where none is running: a process of the compiler that stays, holding
what it compiled, and answers the same command again after each edit (see
[Rebuilding after an edit](https://docs.atoll.workreef.dev/language/tooling/#rebuilding-after-an-edit)).
Without it a command uses a worker that is already running and starts none.
Only the root project's applies.

```toml
[build]
resident = true
```

`[trace] max` is the most verbose level whose
[tracing](https://docs.atoll.workreef.dev/language/standard-library/tracing/) callsites are compiled, as
`--trace-max` says: `"off"`, `"error"`, `"warn"`, `"info"`, `"debug"` or
`"trace"`. A callsite above it compiles to nothing and is still checked. Only
the root project's applies, as `preempt`'s does.

```toml
[trace]
max = "info"
```

`[api] package` is the directory the build writes this project's API to, as a
package of its own: each [service](https://docs.atoll.workreef.dev/language/services/) it serves as another
program calls it (its operations' signatures, no fields, no bodies), the types
those cross the wire as, and the protobuf numbers it keeps for them. A client
depends on that package and never on the server. `check`, `build`, `run` and
`test` write it where it changes, as they do `wire.schema`, and refuse to
under `--locked`.

```toml
[api]
package = "api"
```

`[test]` sets how `atoll test` runs this project's tests: `test-threads`,
`slow-timeout`, `terminate-after`, `fail-fast` and `default-filter`, which
[Testing](https://docs.atoll.workreef.dev/language/tooling/testing/) describes. A flag on the command line beats it, and a key it does not hold is
refused.

`[identity]`, `[embed]`, `[messages]`, `[dev]` and `package` are not read. The
first four configured the application framework of the earlier compiler, which
read them from `atoll.yaml`. `package` named the JVM package for the Java and
Kotlin code it generated. A manifest that still has one builds, and is told that
the lines can go:

```toml project=ledger file=atoll.toml
module = "example.dev/ledger"

[identity]
model = "User"
```

```text output
$ atoll check ledger
atoll: atoll.toml: `[identity]` configured the application framework the earlier compiler read from `atoll.yaml`, and nothing in atoll reads it, so it is ignored — delete it
OK (0 diagnostics)
```

## Keeping failures distinct

| Boundary | Example failure |
| --- | --- |
| Manifest parsing | invalid engine name or pool range |
| Environment substitution, at `atoll migrate` | missing `${DATABASE_URL}` |
| Type checking | denied host namespace; unresolved import |
| Lowering | reachable call the backend cannot lower (`did not lower: [...]`) |
| Runtime startup | database host unreachable |
| Runtime operation | credentials lack table permission |

Inlining a secret into `atoll.toml` removes a substitution error and creates a
source-control exposure. It is not a fix for deployment configuration.

For CI: choose a stable `module`, pin every git dependency, run `atoll lock`
after intentional dependency changes, run `atoll lock --check` in verification
jobs, gate on `atoll build` rather than `atoll check`, and declare host
namespaces and datasource variables explicitly.

Source: https://docs.atoll.workreef.dev/language/modules/projects/index.mdx
