Limits and defaults¶
Defaults¶
| Constant | Value | Note |
|---|---|---|
Artefact |
onnxruntime |
The name in the channel |
DefaultVersion |
1.29.0 |
Pinned; must expose C API 23 or above |
Cache location¶
On Linux that is ~/.cache/phpboyscout/onnxruntime/1.29.0/linux-amd64/; on
macOS, ~/Library/Caches/phpboyscout/....
The path is deliberately vendor-neutral: named for the estate, not for whichever tool happened to populate it. An earlier implementation cached under a directory named for one tool, and a second tool's install then wrote into a directory named after the first. Nobody notices until they go looking for disk usage.
WithCacheDir replaces the root, <os.UserCacheDir()>/phpboyscout/onnxruntime,
and keeps the <version>/<goos>-<goarch>/ beneath it. Two versions or two
platforms sharing one directory therefore each get their own library. When it is
supplied, the OS cache directory is never consulted, so a container with no
HOME works, which is exactly where an explicit directory gets passed.
Permissions¶
| Thing | Mode |
|---|---|
| Cache directories | 0755 |
| The extracted library | 0600 |
Owner-read is enough: dlopen maps the file PROT_EXEC without needing the
file's own execute bit. A library nothing else can read is one nothing else can
swap.
Bounds¶
| Bound | Value |
|---|---|
| Decompressed library | 512 MiB |
The archive's digest and length are verified before it reaches disk, so this is not a defence against a hostile channel. It bounds the decompressed stream, which is a different quantity from the compressed one and worth keeping finite regardless.
Exceeding it raises ErrOversizeLibrary, and the message carries both the size
and the bound. "Too big" alone does not tell a publisher which to change.
Writes are atomic¶
The library is written to a temporary file in the destination directory and renamed into place. A concurrent reader sees either no library or a complete one, never a truncated one. A failed extraction removes its temporary file.