Top level
| Table | Contents | Description |
|---|---|---|
[[index]] | index[] | Package indexes for every project, searched after the project's own |
[[toolchain]] | toolchain_decl[] | Toolchains for every project. A project's toolchain of the same name wins |
[net] | net | |
[cache] | cache |
index
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
url | string | A Git repository of releases | |
path | string | A directory of <name>/spn.toml packages, relative to the file that declares the index | |
protocol | git | http | dir | Defaults to dir when path is set, and git otherwise | |
rev | string | A commit to hold a Git index at. A pinned index is never refreshed, and can't be published to | |
publish_url | string | Where spn publish pushes, when it isn't url |
toolchain_decl
| Field | Type | Description |
|---|---|---|
name | string | Required. A built in toolchain of the same name is replaced |
version | string | |
compiler | string | Required. The C compiler |
linker | gnu | lld | ld64 | msvc | |
link_args | string[] | Arguments added to every link |
archiver | string | Required |
driver | gcc | clang | msvc | zig | Required. The command line the compiler speaks |
cxx | string | The C++ compiler |
detect | msvc | Find the toolchain through a Visual Studio installation. Excludes host |
host | map of artifact | The hosts the toolchain runs on, keyed like x86_64-linux |
mirrors | string | URL of a list of mirrors to download from |
mirror_snapshot | string | The mirror list to use when mirrors can't be fetched |
target | (toolchain_target | string)[] | What the toolchain can build for. Without it, only the host |
net
| Field | Type | Default | Description |
|---|---|---|---|
timeout | integer | 30 | Seconds to wait to connect to a server, and for a stalled transfer to make progress, before giving up. It must be at least 1; values above 65535 are treated as 65535 |
ca_bundle | string | Path to a PEM file of trusted root certificates | |
system_git | bool | false | Clone and fetch every index and Git dependency with the git on your PATH, not only the ones that need your credentials |
cache
| Field | Type | Default | Description |
|---|---|---|---|
max_size | integer | 10 | Size in GiB the build cache may reach before spn evicts from it. 0 means no limit, and nothing is evicted automatically |
min_age | integer | 3600 | Seconds an entry is kept after its last use, whatever the size of the cache. Values below 600 are treated as 600 |
sweep_interval | integer | 600 | Seconds between checks of the size of the cache |
artifact
| Field | Type | Description |
|---|---|---|
url | string | An archive of the toolchain for spn to download |
sha256 | string | Required with url |
toolchain_target
| Field | Type | Description |
|---|---|---|
kind | string | host is the only kind: the machine the toolchain runs on. It takes no other fields |
arch | x86_64 | aarch64 | wasm32 | |
os | windows | linux | macos | wasi | freestanding | |
abi | gnu | musl | msvc | apple | none | elf | |
sdk | string | Path to the SDK or sysroot for this target |
spelling | string | The triple to pass to the compiler, when it isn't spn's spelling |
exceptions | toolchain_exceptions | Flags that turn C++ exceptions on, for a target that has them off by default |
runtime | toolchain_runtime | |
sanitizers | toolchain_sanitizers | The sanitizers the toolchain has for this target |
toolchain_exceptions
| Field | Type |
|---|---|
flags | string[] |
link_flags | string[] |
toolchain_runtime
| Field | Type |
|---|---|
supported | (static | shared)[] |
c | string[] |
cxx | string[] |
toolchain_sanitizers
| Field | Type |
|---|---|
supported | (address | thread | undefined | memory | leak)[] |
address | string[] |
thread | string[] |
undefined | string[] |
memory | string[] |
leak | string[] |