# The alice.toml manifest

> Configure package metadata, dependencies, generated projects, and native publishing.

Canonical: https://alice-lang.org/documentation/tools/manifest/

[Documentation index](https://alice-lang.org/documentation/llms.txt) · [Complete book](https://alice-lang.org/llms-full.txt)

## One project source of truth

`alice.toml` describes a package. Alice rewrites its generated `.alice/<name>.alproj` from the manifest on commands that synchronize the project. Do not edit or commit generated projects.

```toml
[package]
name = "tea-shop"
version = "0.1.0"
kind = "exe"
target = "net10.0"

[dependencies]
"Newtonsoft.Json" = "13.*"
Geometry = { path = "../Geometry" }
Legacy = { path = "../Legacy/Legacy.csproj" }
Shared = { workspace = true }

[build]
native = false
```

## Package fields

| Field     | Meaning                                                                       |
| --------- | ----------------------------------------------------------------------------- |
| `name`    | Package name used for the generated project                                   |
| `version` | Package version                                                               |
| `kind`    | `exe`, `lib`, `game`, or `tool`                                               |
| `target`  | Target framework; current default is `net10.0`                                |
| `command` | For `kind = "tool"`: the command a .NET tool installs; default `name`         |
| `naming`  | `"alice"` (default) or `"dotnet"`: the public API names a library compiles to |

`game` adds the MonoGame DesktopGL dependency. `alice new` writes a suitable initial manifest and ignore file.

### Publishing fields

Packages built with `alice pack` or `alice publish` take NuGet metadata:

```toml
[package]
name = "wand"
id = "Acme.Wand"             # NuGet id, default: name
version = "1.0.0"
kind = "tool"                # lib: a library; tool: a .NET tool (dotnet tool install -g Acme.Wand)
command = "wand"             # tool command, default: name
description = "Scaffolding for Acme apps"
authors = ["Ada"]
license = "Apache-2.0"       # SPDX expression
repository = "https://github.com/acme/wand"
tags = ["cli"]               # "alice" is always added
naming = "dotnet"            # .NET-style public API for C# and F# callers (TotalArea, IsEmpty)
```

| Field                                            | Meaning                                                    |
| ------------------------------------------------ | ---------------------------------------------------------- |
| `id`                                             | NuGet package id; bad ids fail before `dotnet pack`        |
| `description`, `authors`, `license`, `copyright` | NuGet metadata; `license` is an SPDX expression            |
| `repository`, `homepage`, `tags`                 | Links and search tags; `alice` is always added to the tags |
| `icon`, `readme`                                 | Package icon, and readme (default `README.md`)             |

A library package carries `Alice.Runtime.dll`, so C# consumers need nothing else. See [publishing](https://alice-lang.org/documentation/guides/publishing.md)
for the commands.

## Runtime settings

```toml
[runtime]
gc = "auto"                  # auto (default), workstation, server, or low-memory
globalization = "invariant"  # optional: no ICU at run time, strings sort ordinally
```

`gc = "auto"` selects server GC when the compiled program forks or runs parallel loops, and workstation GC otherwise.
`globalization = "invariant"` saves 2 to 4 MB per program measured, and makes string sorting ordinal (the Ruby order).
The default is `culture`.

## Source layout

`src/**/*.al` contains Alice source; `src/**/*.cs` can participate in a mixed project. `test/` and `spec/` are for the test runner. Outputs remain in the package's `bin/` and `obj/`, even though the generated project is under `.alice/`.

Keep these generated paths ignored:

```text
bin/
obj/
.alice/
```

## Dependencies

A string value is a NuGet version expression. A path can point to an Alice package directory or a C# project. An Alice path dependency synchronizes recursively. A directory without `alice.toml` can resolve its existing project file.

`{ workspace = true }` resolves a package by workspace member name; it is an error if that member cannot be found. Use [workspaces](https://alice-lang.org/documentation/tools/workspaces.md) to describe related packages.

After editing dependencies, run `alice install` or build. `using` imports a namespace but does not add a dependency.

## Lock file

`alice.lock` records exact versions from the last NuGet restore, read from `obj/project.assets.json`. It lives at the workspace root or beside a standalone package. Subsequent builds pin recorded versions. Commit it so collaborators restore the same dependency versions.

`alice update` intentionally refreshes those resolutions. Review the resulting lock changes together with behavior checks.

## Build settings

`[build] native = true` opts into NativeAOT. Additional MSBuild settings and framework references can live in `Directory.Build.props` or `Directory.Build.targets`; they should not be patched into generated `.alproj` files. The [SDK chapter](https://alice-lang.org/documentation/tools/sdk.md) describes how these layers work.

## Continue reading

- Previous: [CLI command reference](https://alice-lang.org/documentation/tools/cli.md)
- Next: [Workspaces and package graphs](https://alice-lang.org/documentation/tools/workspaces.md)
