Config

Top level

TableContentsDescription
[[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

FieldTypeRequiredDescription
namestringyes
urlstringA Git repository of releases
pathstringA directory of <name>/spn.toml packages, relative to the file that declares the index
protocolgit | http | dirDefaults to dir when path is set, and git otherwise
revstringA commit to hold a Git index at. A pinned index is never refreshed, and can't be published to
publish_urlstringWhere spn publish pushes, when it isn't url

toolchain_decl

FieldTypeDescription
namestringRequired. A built in toolchain of the same name is replaced
versionstring
compilerstringRequired. The C compiler
linkergnu | lld | ld64 | msvc
link_argsstring[]Arguments added to every link
archiverstringRequired
drivergcc | clang | msvc | zigRequired. The command line the compiler speaks
cxxstringThe C++ compiler
detectmsvcFind the toolchain through a Visual Studio installation. Excludes host
hostmap of artifactThe hosts the toolchain runs on, keyed like x86_64-linux
mirrorsstringURL of a list of mirrors to download from
mirror_snapshotstringThe 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

FieldTypeDefaultDescription
timeoutinteger30Seconds 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_bundlestringPath to a PEM file of trusted root certificates
system_gitboolfalseClone and fetch every index and Git dependency with the git on your PATH, not only the ones that need your credentials

cache

FieldTypeDefaultDescription
max_sizeinteger10Size in GiB the build cache may reach before spn evicts from it. 0 means no limit, and nothing is evicted automatically
min_ageinteger3600Seconds an entry is kept after its last use, whatever the size of the cache. Values below 600 are treated as 600
sweep_intervalinteger600Seconds between checks of the size of the cache

artifact

FieldTypeDescription
urlstringAn archive of the toolchain for spn to download
sha256stringRequired with url

toolchain_target

FieldTypeDescription
kindstringhost is the only kind: the machine the toolchain runs on. It takes no other fields
archx86_64 | aarch64 | wasm32
oswindows | linux | macos | wasi | freestanding
abignu | musl | msvc | apple | none | elf
sdkstringPath to the SDK or sysroot for this target
spellingstringThe triple to pass to the compiler, when it isn't spn's spelling
exceptionstoolchain_exceptionsFlags that turn C++ exceptions on, for a target that has them off by default
runtimetoolchain_runtime
sanitizerstoolchain_sanitizersThe sanitizers the toolchain has for this target

toolchain_exceptions

FieldType
flagsstring[]
link_flagsstring[]

toolchain_runtime

FieldType
supported(static | shared)[]
cstring[]
cxxstring[]

toolchain_sanitizers

FieldType
supported(address | thread | undefined | memory | leak)[]
addressstring[]
threadstring[]
undefinedstring[]
memorystring[]
leakstring[]