An extremely fast build system
spn turns familiar TOML package manifests into a build graph that it schedules and runs in parallel.
It never wraps another build system; it runs every compile and link in your build, including those of your dependencies.
Even better, it comes with a sophisticated, CI-friendly build cache out of the box. Switching branches, worktrees, or even cross compilation targets no longer means a rebuild!
[package]
name = "hello"
version = "0.1.0"
[[bin]]
name = "hello"
source = ["main.c", "util/*.c"]
[deps.package]
sqlite = "3.51.0"Zero dependency, single file binary
spn is a single file static executable. It runs on Linux, macOS, and Windows, and has zero dependencies.
It bundles the Zig toolchain, which means that it can cross compile from any host to nearly any other host, even when no compiler is installed.
It has first class support for nearly every common toolchain, including MSVC, GCC, Clang, Xcode, mingw64, wasi-sdk, ARM GCC, w64devkit, and more!
# From any host
spn build --target x86_64-windows-gnu
spn build --target aarch64-macos
spn build --target aarch64-linux-musl
# On Windows, from any shell
spn build --toolchain msvcReproducible, sandboxed builds
Build scripts are plain C, not a DSL, and use the same packages your project already uses. spn compiles them to WebAssembly and runs them in a sandbox inside your build.
The sandbox sees every file a script reads, so build scripts are cached just like compiles. And when you just need to run a Python script so you can build your damn code, it helps with that, too!
SPN_EXPORT spn_err_t generate_config(spn_t* spn) {
const char* path = "/source/config.json";
yyjson_doc* doc = yyjson_read_file(path, 0, NULL, NULL);
yyjson_val* root = yyjson_doc_get_root(doc);
yyjson_val* foo = yyjson_obj_get(root, "foo");
FILE* header = fopen("/work/config.h", "w");
fprintf(header, "#define FOO %d\n", yyjson_get_int(foo));
fclose(header);
return SPN_OK;
}A package manager built for C and C++
C does not have a package culture. Instead of forcing a central registry, spn provides simple primitives you can use to publish and consume code.
A package index is just a Git repository of manifests. Use the one we maintain, host your own, or skip the index and point a manifest at a commit.
Dependencies are built from source with the options you choose, pinned in a lockfile, and patched without forking.
[deps.package.imgui]
version = "1.92.8"
options = { sdl3 = true, sdlgpu3 = true }
[patch.imgui]
files = ["patches/frobnicate.patch"]
[deps.build]
yyjson = "0.14.0"Try out the libraries you already use
See what it's like to package and use real libraries!
[package]
name = "window"
version = "0.1.0"
[[bin]]
name = "main"
source = ["main.c"]
[deps.package]
sdl3 = "3.4.14"
[config.sdl3]
options = { x11 = true } [package]
name = "sdl3"
version = "3.4.14"
system_deps = [
{ lib = "m", when = { os = "linux" } },
{ lib = "dl", when = { os = "linux" } },
{ lib = "pthread", when = { os = "linux" } },
{ lib = "user32", when = { os = "windows" } },
{ lib = "gdi32", when = { os = "windows" } },
{ lib = "winmm", when = { os = "windows" } },
{ lib = "imm32", when = { os = "windows" } },
{ lib = "ole32", when = { os = "windows" } },
{ lib = "oleaut32", when = { os = "windows" } },
{ lib = "version", when = { os = "windows" } },
{ lib = "uuid", when = { os = "windows" } },
{ lib = "advapi32", when = { os = "windows" } },
{ lib = "setupapi", when = { os = "windows" } },
{ lib = "shell32", when = { os = "windows" } },
{ lib = "dinput8", when = { os = "windows" } },
]
[package.upstream]
url = "https://github.com/libsdl-org/SDL.git"
commit = "147a8ee32dbf9ac02f3794964490687b6bbda1bc"
[deps.package]
xorgproto = { version = "2025.1.0", when = { os = "linux", x11 = true } }
libx11 = { version = "1.8.13", when = { os = "linux", x11 = true } }
libxext = { version = "1.3.7", when = { os = "linux", x11 = true } }
libxcursor = { version = "1.2.3", when = { os = "linux", x11 = true } }
libxfixes = { version = "6.0.2", when = { os = "linux", x11 = true } }
libxi = { version = "1.8.3", when = { os = "linux", x11 = true } }
libxrandr = { version = "1.5.5", when = { os = "linux", x11 = true } }
libxrender = { version = "0.9.12", when = { os = "linux", x11 = true } }
libxscrnsaver = { version = "1.2.5", when = { os = "linux", x11 = true } }
libxtst = { version = "1.2.5", when = { os = "linux", x11 = true } }
libglvnd = { version = "1.7.0", when = { os = "linux", x11 = true } }
libxcb = { version = "1.17.0", when = { os = "linux", x11 = true } }
alsa-lib = { version = "1.2.15", when = { os = "linux", alsa = true } }
pulseaudio = { version = "17.0.0", when = { os = "linux", pulseaudio = true } }
pipewire = { version = "1.6.8", when = { os = "linux", pipewire = true } }
dbus = { version = "1.16.99", when = { os = "linux", dbus = true } }
systemd = { version = "261.3.0", when = { os = "linux", udev = true } }
[options.x11]
type = "bool"
default = false
public = true
define = "SPN_SDL3_X11"
[options.alsa]
type = "bool"
default = false
public = true
define = "SPN_SDL3_ALSA"
[options.pulseaudio]
type = "bool"
default = false
public = true
define = "SPN_SDL3_PULSEAUDIO"
[options.pipewire]
type = "bool"
default = false
public = true
define = "SPN_SDL3_PIPEWIRE"
[options.oss]
type = "bool"
default = false
public = true
define = "SPN_SDL3_OSS"
[options.dbus]
type = "bool"
default = false
public = true
define = "SPN_SDL3_DBUS"
[options.udev]
type = "bool"
default = false
public = true
define = "SPN_SDL3_UDEV"
[[lib]]
name = "SDL3"
kinds = ["static"]
include = [
{ path = "config", tree = "manifest" },
"include/build_config",
"include",
"src",
"src/video/khronos",
]
source = [
"src/*.c",
"src/atomic/*.c",
"src/audio/*.c",
"src/audio/disk/*.c",
"src/audio/dummy/*.c",
"src/camera/*.c",
"src/camera/dummy/*.c",
"src/core/*.c",
"src/cpuinfo/*.c",
"src/dialog/*.c",
"src/dynapi/*.c",
"src/events/*.c",
"src/filesystem/*.c",
"src/gpu/*.c",
"src/haptic/*.c",
"src/haptic/hidapi/*.c",
"src/hidapi/*.c",
"src/io/*.c",
"src/io/generic/*.c",
"src/joystick/*.c",
"src/joystick/hidapi/*.c",
"src/joystick/virtual/*.c",
"src/libm/*.c",
"src/locale/*.c",
"src/main/*.c",
"src/main/generic/*.c",
"src/misc/*.c",
"src/power/*.c",
"src/process/*.c",
"src/render/*.c",
"src/render/gpu/*.c",
"src/render/opengl/*.c",
"src/render/opengles2/*.c",
"src/render/software/*.c",
"src/render/vulkan/*.c",
"src/sensor/*.c",
"src/sensor/dummy/*.c",
"src/stdlib/*.c",
"src/storage/*.c",
"src/storage/generic/*.c",
"src/storage/steam/*.c",
"src/thread/*.c",
"src/time/*.c",
"src/timer/*.c",
"src/tray/*.c",
"src/video/*.c",
"src/video/dummy/*.c",
"src/video/offscreen/*.c",
"src/video/yuv2rgb/*.c",
"src/gpu/vulkan/*.c",
{ path = "src/camera/v4l2/*.c", when = { os = "linux" } },
{ path = "src/core/unix/*.c", when = { os = "linux" } },
{ path = "src/core/linux/SDL_evdev.c", when = { os = "linux" } },
{ path = "src/core/linux/SDL_evdev_capabilities.c", when = { os = "linux" } },
{ path = "src/core/linux/SDL_evdev_kbd.c", when = { os = "linux" } },
{ path = "src/core/linux/SDL_threadprio.c", when = { os = "linux" } },
{ path = "src/dialog/unix/*.c", when = { os = "linux" } },
{ path = "src/filesystem/posix/*.c", when = { os = "linux" } },
{ path = "src/filesystem/unix/*.c", when = { os = "linux" } },
{ path = "src/haptic/linux/*.c", when = { os = "linux" } },
{ path = "src/io/io_uring/*.c", when = { os = "linux" } },
{ path = "src/joystick/linux/*.c", when = { os = "linux" } },
{ path = "src/loadso/dlopen/*.c", when = { os = "linux" } },
{ path = "src/locale/unix/*.c", when = { os = "linux" } },
{ path = "src/misc/unix/*.c", when = { os = "linux" } },
{ path = "src/power/linux/*.c", when = { os = "linux" } },
{ path = "src/process/posix/*.c", when = { os = "linux" } },
{ path = "src/thread/pthread/*.c", when = { os = "linux" } },
{ path = "src/time/unix/*.c", when = { os = "linux" } },
{ path = "src/timer/unix/*.c", when = { os = "linux" } },
{ path = "src/tray/unix/*.c", when = { os = "linux" } },
{ path = "src/video/x11/*.c", when = { os = "linux", x11 = true } },
{ path = "src/audio/alsa/*.c", when = { os = "linux", alsa = true } },
{ path = "src/audio/pulseaudio/*.c", when = { os = "linux", pulseaudio = true } },
{ path = "src/audio/pipewire/*.c", when = { os = "linux", pipewire = true } },
{ path = "src/audio/dsp/*.c", when = { os = "linux", oss = true } },
{ path = "src/core/linux/SDL_dbus.c", when = { os = "linux", dbus = true } },
{ path = "src/core/linux/SDL_fcitx.c", when = { os = "linux", dbus = true } },
{ path = "src/core/linux/SDL_ime.c", when = { os = "linux", dbus = true } },
{ path = "src/core/linux/SDL_progressbar.c", when = { os = "linux", dbus = true } },
{ path = "src/core/linux/SDL_system_theme.c", when = { os = "linux", dbus = true } },
{ path = "src/core/linux/SDL_udev.c", when = { os = "linux", udev = true } },
{ path = "src/audio/directsound/*.c", when = { os = "windows" } },
{ path = "src/audio/wasapi/*.c", when = { os = "windows" } },
{ path = "src/camera/mediafoundation/*.c", when = { os = "windows" } },
{ path = "src/core/windows/*.c", when = { os = "windows" } },
{ path = "src/dialog/windows/*.c", when = { os = "windows" } },
{ path = "src/filesystem/windows/*.c", when = { os = "windows" } },
{ path = "src/gpu/d3d12/*.c", when = { os = "windows" } },
{ path = "src/haptic/windows/*.c", when = { os = "windows" } },
{ path = "src/io/windows/*.c", when = { os = "windows" } },
{ path = "src/joystick/windows/*.c", when = { os = "windows" } },
{ path = "src/loadso/windows/*.c", when = { os = "windows" } },
{ path = "src/locale/windows/*.c", when = { os = "windows" } },
{ path = "src/main/windows/*.c", when = { os = "windows" } },
{ path = "src/misc/windows/*.c", when = { os = "windows" } },
{ path = "src/power/windows/*.c", when = { os = "windows" } },
{ path = "src/process/windows/*.c", when = { os = "windows" } },
{ path = "src/render/direct3d/*.c", when = { os = "windows" } },
{ path = "src/render/direct3d11/*.c", when = { os = "windows" } },
{ path = "src/render/direct3d12/*.c", when = { os = "windows" } },
{ path = "src/sensor/windows/*.c", when = { os = "windows" } },
{ path = "src/thread/windows/*.c", when = { os = "windows" } },
{ path = "src/thread/generic/SDL_syscond.c", when = { os = "windows" } },
{ path = "src/thread/generic/SDL_sysrwlock.c", when = { os = "windows" } },
{ path = "src/time/windows/*.c", when = { os = "windows" } },
{ path = "src/timer/windows/*.c", when = { os = "windows" } },
{ path = "src/tray/windows/*.c", when = { os = "windows" } },
{ path = "src/video/windows/*.c", when = { os = "windows" } },
{ path = "src/core/windows/*.cpp", when = { os = "windows" } },
{ path = "src/video/windows/*.cpp", when = { os = "windows" } },
{ path = "src/joystick/gdk/*.cpp", when = { os = "windows" } },
{ path = "src/audio/coreaudio/*.m", when = { os = "macos" } },
{ path = "src/camera/coremedia/*.m", when = { os = "macos" } },
{ path = "src/core/unix/*.c", when = { os = "macos" } },
{ path = "src/dialog/cocoa/*.m", when = { os = "macos" } },
{ path = "src/filesystem/cocoa/*.m", when = { os = "macos" } },
{ path = "src/filesystem/posix/*.c", when = { os = "macos" } },
{ path = "src/gpu/metal/*.m", when = { os = "macos" } },
{ path = "src/haptic/darwin/*.c", when = { os = "macos" } },
{ path = "src/joystick/apple/*.m", when = { os = "macos" } },
{ path = "src/joystick/darwin/*.c", when = { os = "macos" } },
{ path = "src/loadso/dlopen/*.c", when = { os = "macos" } },
{ path = "src/locale/macos/*.m", when = { os = "macos" } },
{ path = "src/misc/macos/*.m", when = { os = "macos" } },
{ path = "src/power/macos/*.c", when = { os = "macos" } },
{ path = "src/process/posix/*.c", when = { os = "macos" } },
{ path = "src/render/metal/*.m", when = { os = "macos" } },
{ path = "src/thread/pthread/*.c", when = { os = "macos" } },
{ path = "src/time/unix/*.c", when = { os = "macos" } },
{ path = "src/timer/unix/*.c", when = { os = "macos" } },
{ path = "src/tray/cocoa/*.m", when = { os = "macos" } },
{ path = "src/video/cocoa/*.m", when = { os = "macos" } },
]
define = [
{ value = "_REENTRANT", when = { os = "linux" } },
{ value = "_THREAD_SAFE", when = { os = "macos" } },
]
flags = [
{ value = "-fno-strict-aliasing", when = { driver = { not = "msvc" } } },
{ value = "-fvisibility=hidden", when = { driver = { not = "msvc" } } },
{ value = "-msse", when = { arch = "x86_64", driver = { not = "msvc" } } },
{ value = "-msse2", when = { arch = "x86_64", driver = { not = "msvc" } } },
{ value = "-msse3", when = { arch = "x86_64", driver = { not = "msvc" } } },
{ value = "-fobjc-arc", when = { os = "macos" } },
]
system_deps = [
{ framework = "AVFoundation" },
{ framework = "AudioToolbox" },
{ framework = "Carbon" },
{ framework = "Cocoa" },
{ framework = "CoreAudio" },
{ framework = "CoreFoundation" },
{ framework = "CoreHaptics" },
{ framework = "CoreMedia" },
{ framework = "CoreVideo" },
{ framework = "ForceFeedback" },
{ framework = "GameController" },
{ framework = "IOKit" },
{ framework = "Metal" },
{ framework = "QuartzCore" },
{ framework = "UniformTypeIdentifiers" },
]
[package.publish]
include = [
{ from = "include/SDL3/*.h", to = "SDL3" },
]
[[example]]
name = "window"
source = [{ path = "example/window.c", tree = "manifest" }]
deps = ["SDL3"]
[[example]]
name = "gpu"
source = [{ path = "example/gpu.c", tree = "manifest" }]
deps = ["SDL3"]
[profile.default]
options = { x11 = true } [package]
name = "window"
version = "0.1.0"
[[bin]]
name = "main"
source = ["main.c"]
[deps.package]
raylib = "6.0.0" [package]
name = "raylib"
version = "6.0.0"
author = "raysan5"
maintainer = "tspader"
system_deps = [
{ lib = "m", when = { os = "linux" } },
{ lib = "pthread", when = { os = "linux" } },
{ lib = "dl", when = { os = "linux" } },
{ lib = "user32", when = { os = "windows" } },
{ lib = "gdi32", when = { os = "windows" } },
{ lib = "shell32", when = { os = "windows" } },
{ lib = "winmm", when = { os = "windows" } },
]
[package.upstream]
url = "https://github.com/raysan5/raylib.git"
commit = "a4680fc67734754138650138f11c54dc798ede56"
[deps.package]
xorgproto = { version = "2025.1.0", when = { os = "linux" } }
libx11 = { version = "1.8.13", when = { os = "linux" } }
libxext = { version = "1.3.7", when = { os = "linux" } }
libxcursor = { version = "1.2.3", when = { os = "linux" } }
libxfixes = { version = "6.0.2", when = { os = "linux" } }
libxi = { version = "1.8.3", when = { os = "linux" } }
libxrandr = { version = "1.5.5", when = { os = "linux" } }
libxrender = { version = "0.9.12", when = { os = "linux" } }
libxinerama = { version = "1.1.6", when = { os = "linux" } }
[[lib]]
name = "raylib"
kinds = ["static"]
source = [
"src/rcore.c",
"src/rshapes.c",
"src/rtextures.c",
"src/rtext.c",
"src/rmodels.c",
"src/raudio.c",
{ path = "src/rglfw.c", when = { os = { not = "macos" } } },
{ path = "rglfw.m", tree = "manifest", when = { os = "macos" } },
]
include = [
"src",
"src/external/glfw/include",
]
define = [
"PLATFORM_DESKTOP_GLFW",
"GRAPHICS_API_OPENGL_33",
{ value = "_GLFW_X11", when = { os = "linux" } },
{ value = "SUPPORT_CLIPBOARD_IMAGE=0", when = { os = "linux" } },
{ value = "_CRT_SECURE_NO_WARNINGS", when = { os = "windows" } },
{ value = "GL_SILENCE_DEPRECATION", when = { os = "macos" } },
]
system_deps = [
{ framework = "Cocoa" },
{ framework = "IOKit" },
{ framework = "CoreFoundation" },
{ framework = "CoreAudio" },
{ framework = "CoreVideo" },
{ framework = "OpenGL" },
]
[[example]]
name = "core_basic_window"
source = ["examples/core/core_basic_window.c"]
deps = ["raylib"]
[[example]]
name = "core_input_keys"
source = ["examples/core/core_input_keys.c"]
deps = ["raylib"]
[[example]]
name = "core_3d_camera_mode"
source = ["examples/core/core_3d_camera_mode.c"]
deps = ["raylib"]
[[example]]
name = "shapes_basic_shapes"
source = ["examples/shapes/shapes_basic_shapes.c"]
deps = ["raylib"]
[[example]]
name = "text_format_text"
source = ["examples/text/text_format_text.c"]
deps = ["raylib"]
[package.publish]
include = [
{ from = "src/raylib.h" },
{ from = "src/raymath.h" },
{ from = "src/rlgl.h" },
{ from = "src/rcamera.h" },
] [package]
name = "gui"
version = "0.1.0"
[[bin]]
name = "main"
source = ["main.cpp"]
cxx = { standard = "c++17" }
[deps.package]
imgui = "1.92.8"
sdl3 = "3.4.14"
[config.imgui]
options = { sdl3 = true, sdlgpu3 = true }
[config.sdl3]
options = { x11 = true } [package]
name = "imgui"
version = "1.92.8"
[package.upstream]
url = "https://github.com/ocornut/imgui.git"
commit = "b61e56346a92cfcaf1f43a545ca37b0b32239654"
[options.sdl2]
type = "bool"
default = false
[options.opengl3]
type = "bool"
default = false
[options.sdl3]
type = "bool"
default = false
[options.sdlgpu3]
type = "bool"
default = false
[deps.package]
sdl2 = { version = "^2.30.0", when = { sdl2 = true } }
sdl3 = { version = "3.4.14", when = { sdl3 = true }, public = true }
xorgproto = { version = "2025.1.0", when = { sdl2 = true, os = "linux" } }
libx11 = { version = "1.8.13", when = { sdl2 = true, os = "linux" } }
[[lib]]
name = "imgui"
kinds = ["static", "shared"]
source = [
"imgui.cpp",
"imgui_demo.cpp",
"imgui_draw.cpp",
"imgui_tables.cpp",
"imgui_widgets.cpp",
{ path = "backends/imgui_impl_sdl2.cpp", when = { sdl2 = true } },
{ path = "backends/imgui_impl_opengl3.cpp", when = { opengl3 = true } },
{ path = "backends/imgui_impl_sdl3.cpp", when = { sdl3 = true } },
{ path = "backends/imgui_impl_sdlgpu3.cpp", when = { sdlgpu3 = true } },
]
system_deps = [
{ lib = "dl", when = { opengl3 = true, os = "linux" } },
]
cxx = { standard = "c++17" }
[[example]]
name = "headless"
source = [{ path = "example/headless.cpp", tree = "manifest" }]
deps = ["imgui"]
cxx = { standard = "c++17" }
[profile.default]
options = { sdl3 = true, sdlgpu3 = true }
[package.publish]
include = [
{ from = "*.h" },
{ from = "backends/imgui_impl_sdl2.h" },
{ from = "backends/imgui_impl_opengl3.h" },
{ from = "backends/imgui_impl_sdl3.h" },
{ from = "backends/imgui_impl_sdlgpu3.h" },
] [package]
name = "script"
version = "0.1.0"
[[bin]]
name = "main"
source = ["main.c"]
[deps.package]
lua = "5.4.6" [package]
name = "lua"
version = "5.4.6"
system_deps = [
{ lib = "m", when = { os = "linux" } },
]
[package.upstream]
url = "https://github.com/lua/lua.git"
commit = "6443185167c77adcc8552a3fee7edab7895db1a9"
[[lib]]
name = "lua"
kinds = ["static"]
source = [
"lapi.c",
"lauxlib.c",
"lbaselib.c",
"lcode.c",
"lcorolib.c",
"lctype.c",
"ldblib.c",
"ldebug.c",
"ldo.c",
"ldump.c",
"lfunc.c",
"lgc.c",
"linit.c",
"liolib.c",
"llex.c",
"lmathlib.c",
"lmem.c",
"loadlib.c",
"lobject.c",
"lopcodes.c",
"loslib.c",
"lparser.c",
"lstate.c",
"lstring.c",
"lstrlib.c",
"ltable.c",
"ltablib.c",
"ltm.c",
"lundump.c",
"lutf8lib.c",
"lvm.c",
"lzio.c",
]
define = [
{ value = "LUA_USE_POSIX", when = { os = { not = "windows" } } },
]
[package.publish]
include = [
{ from = "lua.h" },
{ from = "luaconf.h" },
{ from = "lualib.h" },
{ from = "lauxlib.h" },
]
[[example]]
name = "embed"
source = [{ path = "example/embed.c", tree = "manifest" }]
deps = ["lua"] [package]
name = "png"
version = "0.1.0"
[[bin]]
name = "main"
source = ["main.c"]
[deps.package]
stb = "2.15.0" [package]
name = "stb"
version = "2.15.0"
author = "nothings"
maintainer = "tspader"
[package.upstream]
url = "https://github.com/nothings/stb.git"
commit = "2c980bb59875b0d32144a71867fbdebb2f77cd20"
[package.publish]
include = [
{ from = "*.h" },
] [package]
name = "unpack"
version = "0.1.0"
[[bin]]
name = "main"
source = ["main.c"]
[deps.package]
zstd = "1.6.0"
[config.zstd]
options = { compression = false } [package]
name = "zstd"
version = "1.6.0"
author = "facebook"
maintainer = "tspader"
define = [
{ value = "ZSTD_LEGACY_SUPPORT=1", when = { legacy = "v1" } },
{ value = "ZSTD_LEGACY_SUPPORT=2", when = { legacy = "v2" } },
{ value = "ZSTD_LEGACY_SUPPORT=3", when = { legacy = "v3" } },
{ value = "ZSTD_LEGACY_SUPPORT=4", when = { legacy = "v4" } },
{ value = "ZSTD_LEGACY_SUPPORT=5", when = { legacy = "v5" } },
{ value = "ZSTD_LEGACY_SUPPORT=6", when = { legacy = "v6" } },
{ value = "ZSTD_LEGACY_SUPPORT=7", when = { legacy = "v7" } },
]
system_deps = [
{ lib = "pthread", when = { os = { not = "windows" }, multithread = true } },
]
[package.upstream]
url = "https://github.com/facebook/zstd.git"
commit = "d9c0c7e2cf8a8bf9fb98d3bee546dcf8dc9ac59a"
[options.compression]
type = "bool"
default = true
[options.decompression]
type = "bool"
default = true
[options.dictbuilder]
type = "bool"
default = [{ value = false, when = { compression = false } }, { value = true }]
[options.deprecated]
type = "bool"
default = false
[options.legacy]
type = "enum"
values = ["none", "v1", "v2", "v3", "v4", "v5", "v6", "v7"]
default = "none"
[options.multithread]
type = "bool"
default = [{ value = false, when = { os = "wasi" } }, { value = true }]
define = "ZSTD_MULTITHREAD"
[options.asm]
type = "bool"
default = [{ value = false, when = { abi = "msvc" } }, { value = true }]
[options.minify]
type = "bool"
default = false
[options.bench]
type = "bool"
default = [
{ value = false, when = { compression = false } },
{ value = false, when = { decompression = false } },
{ value = true },
]
[options.trace]
type = "bool"
default = [
{ value = false, when = { compression = false } },
{ value = false, when = { decompression = false } },
{ value = true },
]
[[lib]]
name = "zstd"
kinds = ["static", "shared"]
source = [
"lib/common/*.c",
{ path = "lib/compress/*.c", when = { compression = true } },
{ path = "lib/decompress/*.c", when = { decompression = true } },
{ path = "lib/decompress/huf_decompress_amd64.S", when = { decompression = true, arch = "x86_64", asm = true } },
{ path = "lib/dictBuilder/*.c", when = { dictbuilder = true } },
{ path = "lib/deprecated/zbuff_common.c", when = { deprecated = true } },
{ path = "lib/deprecated/zbuff_compress.c", when = { deprecated = true, compression = true } },
{ path = "lib/deprecated/zbuff_decompress.c", when = { deprecated = true, decompression = true } },
{ path = "lib/legacy/*.c", when = { legacy = { not = "none" } } },
]
define = [
{ value = "ZSTD_DISABLE_ASM", when = { asm = false } },
{ value = "HUF_FORCE_DECOMPRESS_X1", when = { minify = true } },
{ value = "ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT", when = { minify = true } },
{ value = "ZSTD_NO_INLINE", when = { minify = true } },
{ value = "ZSTD_STRIP_ERROR_STRINGS", when = { minify = true } },
{ value = "DYNAMIC_BMI2=0", when = { minify = true } },
{ value = "_CRT_SECURE_NO_WARNINGS", when = { abi = "msvc" } },
]
flags = [
{ value = "-fno-stack-protector", when = { minify = true, abi = { not = "msvc" } } },
{ value = "-fomit-frame-pointer", when = { minify = true, abi = { not = "msvc" } } },
{ value = "-fno-ident", when = { minify = true, abi = { not = "msvc" } } },
]
[[bin]]
name = "zstd"
source = [
"programs/zstdcli.c",
"programs/util.c",
"programs/timefn.c",
"programs/fileio.c",
"programs/fileio_asyncio.c",
{ path = "programs/benchfn.c", when = { bench = true } },
{ path = "programs/benchzstd.c", when = { bench = true } },
{ path = "programs/datagen.c", when = { bench = true } },
{ path = "programs/lorem.c", when = { bench = true } },
{ path = "programs/zstdcli_trace.c", when = { trace = true } },
{ path = "programs/dibio.c", when = { dictbuilder = true } },
]
define = [
{ value = "ZSTD_NOCOMPRESS", when = { compression = false } },
{ value = "ZSTD_NODECOMPRESS", when = { decompression = false } },
{ value = "ZSTD_NOBENCH", when = { bench = false } },
{ value = "ZSTD_NOTRACE", when = { trace = false } },
{ value = "ZSTD_NODICT", when = { dictbuilder = false } },
]
deps = ["zstd"]
[[example]]
name = "roundtrip"
source = [{ path = "example/roundtrip.c", tree = "manifest" }]
deps = ["zstd"]
[[example]]
name = "simple_compression"
source = ["examples/simple_compression.c"]
define = [{ value = "_DEFAULT_SOURCE", when = { os = "linux" } }]
deps = ["zstd"]
[[example]]
name = "simple_decompression"
source = ["examples/simple_decompression.c"]
define = [{ value = "_DEFAULT_SOURCE", when = { os = "linux" } }]
deps = ["zstd"]
[[example]]
name = "multiple_simple_compression"
source = ["examples/multiple_simple_compression.c"]
define = [{ value = "_DEFAULT_SOURCE", when = { os = "linux" } }]
deps = ["zstd"]
[[example]]
name = "dictionary_compression"
source = ["examples/dictionary_compression.c"]
define = [{ value = "_DEFAULT_SOURCE", when = { os = "linux" } }]
deps = ["zstd"]
[[example]]
name = "dictionary_decompression"
source = ["examples/dictionary_decompression.c"]
define = [{ value = "_DEFAULT_SOURCE", when = { os = "linux" } }]
deps = ["zstd"]
[[example]]
name = "streaming_compression"
source = ["examples/streaming_compression.c"]
define = [{ value = "_DEFAULT_SOURCE", when = { os = "linux" } }]
deps = ["zstd"]
[[example]]
name = "streaming_decompression"
source = ["examples/streaming_decompression.c"]
define = [{ value = "_DEFAULT_SOURCE", when = { os = "linux" } }]
deps = ["zstd"]
[[example]]
name = "multiple_streaming_compression"
source = ["examples/multiple_streaming_compression.c"]
define = [{ value = "_DEFAULT_SOURCE", when = { os = "linux" } }]
deps = ["zstd"]
[[example]]
name = "streaming_memory_usage"
source = ["examples/streaming_memory_usage.c"]
define = [{ value = "_DEFAULT_SOURCE", when = { os = "linux" } }]
deps = ["zstd"]
[package.publish]
include = [
{ from = "lib/zstd.h" },
{ from = "lib/zdict.h" },
{ from = "lib/zstd_errors.h" },
{ from = "lib/deprecated/zbuff.h", to = "deprecated" },
] [package]
name = "fetch"
version = "0.1.0"
[[bin]]
name = "main"
source = ["main.c"]
[deps.package]
curl = "8.19.0" [package]
name = "curl"
version = "8.19.0"
author = "curl"
maintainer = "tspader"
include = ["include"]
define = [
"USE_IPV6",
"CURL_DISABLE_LDAP",
"CURL_DISABLE_LDAPS",
{ value = "USE_UNIX_SOCKETS", when = { os = { not = "windows" } } },
{ value = "USE_THREADS_POSIX", when = { os = { not = "windows" } } },
{ value = "USE_WINDOWS_SSPI", when = { os = "windows" } },
{ value = "USE_SCHANNEL", when = { os = "windows", tls = true } },
{ value = "USE_MBEDTLS", when = { os = { not = "windows" }, tls = true } },
{ value = "HAVE_MBEDTLS_DES_CRYPT_ECB", when = { os = { not = "windows" }, tls = true } },
{ value = "USE_WIN32_IDN", when = { os = "windows", idn = true } },
{ value = "USE_APPLE_IDN", when = { os = "macos", idn = true } },
{ value = "CURL_DISABLE_FTP", when = { ftp = false } },
{ value = "CURL_DISABLE_FILE", when = { file = false } },
{ value = "CURL_DISABLE_DICT", when = { dict = false } },
{ value = "CURL_DISABLE_GOPHER", when = { gopher = false } },
{ value = "CURL_DISABLE_IMAP", when = { imap = false } },
{ value = "CURL_DISABLE_POP3", when = { pop3 = false } },
{ value = "CURL_DISABLE_SMTP", when = { smtp = false } },
{ value = "CURL_DISABLE_TELNET", when = { telnet = false } },
{ value = "CURL_DISABLE_TFTP", when = { tftp = false } },
{ value = "CURL_DISABLE_MQTT", when = { mqtt = false } },
{ value = "CURL_DISABLE_RTSP", when = { rtsp = false } },
{ value = "CURL_DISABLE_SMB", when = { smb = false } },
{ value = "CURL_DISABLE_IPFS", when = { ipfs = false } },
{ value = "CURL_DISABLE_WEBSOCKETS", when = { websockets = false } },
{ value = "CURL_DISABLE_PROXY", when = { proxy = false } },
{ value = "CURL_DISABLE_COOKIES", when = { cookies = false } },
{ value = "CURL_DISABLE_DOH", when = { doh = false } },
{ value = "CURL_DISABLE_HSTS", when = { hsts = false } },
{ value = "CURL_DISABLE_HSTS", when = { hsts = true, tls = false } },
{ value = "CURL_DISABLE_ALTSVC", when = { altsvc = false } },
{ value = "CURL_DISABLE_NETRC", when = { netrc = false } },
{ value = "CURL_DISABLE_MIME", when = { mime = false } },
{ value = "CURL_DISABLE_FORM_API", when = { mime = false } },
{ value = "CURL_DISABLE_VERBOSE_STRINGS", when = { verbose_strings = false } },
]
system_deps = [
{ lib = "pthread", when = { os = "linux" } },
{ lib = "ws2_32", when = { os = "windows" } },
{ lib = "iphlpapi", when = { os = "windows" } },
{ lib = "bcrypt", when = { os = "windows" } },
{ lib = "advapi32", when = { os = "windows" } },
{ lib = "crypt32", when = { os = "windows" } },
{ lib = "secur32", when = { os = "windows" } },
{ lib = "normaliz", when = { os = "windows", idn = true } },
{ lib = "icucore", when = { os = "macos", idn = true } },
{ lib = "iconv", when = { os = "macos", idn = true } },
]
[package.upstream]
url = "https://github.com/curl/curl.git"
commit = "8c908d2d0a6d32abdedda2c52e90bd56ec76c24d"
[package.publish]
include = [
{ from = "include/curl/*.h", to = "curl" },
]
define = ["CURL_STATICLIB"]
[deps.package]
mbedtls = { version = "3.6.7", when = { tls = true, os = { not = "windows" } } }
[options.tls]
type = "bool"
default = true
[options.idn]
type = "bool"
default = false
[options.ftp]
type = "bool"
default = true
[options.file]
type = "bool"
default = true
[options.dict]
type = "bool"
default = true
[options.gopher]
type = "bool"
default = true
[options.imap]
type = "bool"
default = true
[options.pop3]
type = "bool"
default = true
[options.smtp]
type = "bool"
default = true
[options.telnet]
type = "bool"
default = true
[options.tftp]
type = "bool"
default = true
[options.mqtt]
type = "bool"
default = true
[options.rtsp]
type = "bool"
default = true
[options.smb]
type = "bool"
default = true
[options.ipfs]
type = "bool"
default = true
[options.websockets]
type = "bool"
default = true
[options.proxy]
type = "bool"
default = true
[options.cookies]
type = "bool"
default = true
[options.doh]
type = "bool"
default = true
[options.hsts]
type = "bool"
default = true
[options.altsvc]
type = "bool"
default = true
[options.netrc]
type = "bool"
default = true
[options.mime]
type = "bool"
default = true
[options.verbose_strings]
type = "bool"
default = true
[[lib]]
name = "curl"
kinds = ["static"]
include = ["lib", { path = "config", tree = "manifest" }]
define = [
"BUILDING_LIBCURL",
"HAVE_CONFIG_H",
{ value = "_GNU_SOURCE", when = { os = "linux" } },
]
source = [
"lib/*.c",
"lib/curlx/*.c",
"lib/vauth/*.c",
"lib/vtls/*.c",
"lib/vquic/*.c",
"lib/vssh/*.c",
]
system_deps = [
{ framework = "SystemConfiguration" },
{ framework = "CoreFoundation" },
]
[[bin]]
name = "curl"
include = ["lib", "src", { path = "config", tree = "manifest" }]
define = [
"HAVE_CONFIG_H",
{ value = "_GNU_SOURCE", when = { os = "linux" } },
]
source = [
"src/tool_*.c",
"src/config2setopts.c",
"src/slist_wc.c",
"src/terminal.c",
"src/var.c",
"src/toolx/tool_time.c",
]
deps = ["curl"]
[[example]]
name = "get"
source = [{ path = "example/get.c", tree = "manifest" }]
deps = ["curl"] [package]
name = "tls"
version = "0.1.0"
[[bin]]
name = "main"
source = ["main.c"]
[deps.package]
mbedtls = "3.6.7" [package]
name = "mbedtls"
version = "3.6.7"
[package.upstream]
url = "https://github.com/Mbed-TLS/mbedtls.git"
commit = "0bebf8b8c7f07abe3571ded48a11aa907a1ffb20"
[options.threading]
type = "bool"
default = [{ value = false, when = { os = "windows" } }, { value = true }]
public = true
define = "MBEDTLS_THREADING_PTHREAD"
[options.threading_c]
type = "bool"
default = [{ value = true, when = { threading = true } }, { value = false }]
public = true
define = "MBEDTLS_THREADING_C"
[options.everest]
type = "bool"
default = false
public = true
define = "MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED"
[options.user_config]
type = "bool"
default = true
define = 'MBEDTLS_USER_CONFIG_FILE="spn_mbedtls_user_config.h"'
[options.p256m]
type = "bool"
default = false
define = "MBEDTLS_PSA_P256M_DRIVER_ENABLED"
[[lib]]
name = "mbedtls"
kinds = ["static"]
include = [
"include",
"library",
{ path = "config", tree = "manifest" },
{ path = "3rdparty/everest/include", when = { everest = true } },
]
define = [{ value = "WIN32_LEAN_AND_MEAN", when = { os = "windows" } }]
source = [
"library/debug.c",
"library/mps_reader.c",
"library/mps_trace.c",
"library/net_sockets.c",
"library/ssl_cache.c",
"library/ssl_ciphersuites.c",
"library/ssl_client.c",
"library/ssl_cookie.c",
"library/ssl_debug_helpers_generated.c",
"library/ssl_msg.c",
"library/ssl_ticket.c",
"library/ssl_tls.c",
"library/ssl_tls12_client.c",
"library/ssl_tls12_server.c",
"library/ssl_tls13_keys.c",
"library/ssl_tls13_server.c",
"library/ssl_tls13_client.c",
"library/ssl_tls13_generic.c",
]
deps = ["mbedx509"]
[[lib]]
name = "mbedx509"
kinds = ["static"]
include = [
"include",
"library",
{ path = "config", tree = "manifest" },
{ path = "3rdparty/everest/include", when = { everest = true } },
]
define = [{ value = "WIN32_LEAN_AND_MEAN", when = { os = "windows" } }]
source = [
"library/pkcs7.c",
"library/x509.c",
"library/x509_create.c",
"library/x509_crl.c",
"library/x509_crt.c",
"library/x509_csr.c",
"library/x509write.c",
"library/x509write_crt.c",
"library/x509write_csr.c",
]
deps = ["mbedcrypto"]
[[lib]]
name = "mbedcrypto"
kinds = ["static"]
include = [
"include",
"library",
{ path = "3rdparty/everest/include", when = { everest = true } },
{ path = "3rdparty/everest/include/everest", when = { everest = true } },
{ path = "3rdparty/everest/include/everest/kremlib", when = { everest = true } },
{ path = "3rdparty/p256-m", when = { p256m = true } },
{ path = "3rdparty/p256-m/p256-m", when = { p256m = true } },
{ path = "config", tree = "manifest" },
]
define = [{ value = "WIN32_LEAN_AND_MEAN", when = { os = "windows" } }]
source = [
"library/aes.c",
"library/aesni.c",
"library/aesce.c",
"library/aria.c",
"library/asn1parse.c",
"library/asn1write.c",
"library/base64.c",
"library/bignum.c",
"library/bignum_core.c",
"library/bignum_mod.c",
"library/bignum_mod_raw.c",
"library/block_cipher.c",
"library/camellia.c",
"library/ccm.c",
"library/chacha20.c",
"library/chachapoly.c",
"library/cipher.c",
"library/cipher_wrap.c",
"library/constant_time.c",
"library/cmac.c",
"library/ctr_drbg.c",
"library/des.c",
"library/dhm.c",
"library/ecdh.c",
"library/ecdsa.c",
"library/ecjpake.c",
"library/ecp.c",
"library/ecp_curves.c",
"library/ecp_curves_new.c",
"library/entropy.c",
"library/entropy_poll.c",
"library/error.c",
"library/gcm.c",
"library/hkdf.c",
"library/hmac_drbg.c",
"library/lmots.c",
"library/lms.c",
"library/md.c",
"library/md5.c",
"library/memory_buffer_alloc.c",
"library/nist_kw.c",
"library/oid.c",
"library/padlock.c",
"library/pem.c",
"library/pk.c",
"library/pk_ecc.c",
"library/pk_wrap.c",
"library/pkcs12.c",
"library/pkcs5.c",
"library/pkparse.c",
"library/pkwrite.c",
"library/platform.c",
"library/platform_util.c",
"library/poly1305.c",
"library/psa_crypto.c",
"library/psa_crypto_aead.c",
"library/psa_crypto_cipher.c",
"library/psa_crypto_client.c",
"library/psa_crypto_driver_wrappers_no_static.c",
"library/psa_crypto_ecp.c",
"library/psa_crypto_ffdh.c",
"library/psa_crypto_hash.c",
"library/psa_crypto_mac.c",
"library/psa_crypto_pake.c",
"library/psa_crypto_rsa.c",
"library/psa_crypto_random.c",
"library/psa_crypto_se.c",
"library/psa_crypto_slot_management.c",
"library/psa_crypto_storage.c",
"library/psa_its_file.c",
"library/psa_util.c",
"library/ripemd160.c",
"library/rsa.c",
"library/rsa_alt_helpers.c",
"library/sha1.c",
"library/sha256.c",
"library/sha512.c",
"library/sha3.c",
"library/threading.c",
"library/timing.c",
"library/version.c",
"library/version_features.c",
{ path = "3rdparty/everest/library/everest.c", when = { everest = true } },
{ path = "3rdparty/everest/library/x25519.c", when = { everest = true } },
{ path = "3rdparty/everest/library/Hacl_Curve25519_joined.c", when = { everest = true } },
{ path = "3rdparty/p256-m/p256-m_driver_entrypoints.c", when = { p256m = true } },
{ path = "3rdparty/p256-m/p256-m/p256-m.c", when = { p256m = true } },
]
system_deps = [
{ lib = "pthread", when = { threading = true } },
{ lib = "ws2_32", when = { os = "windows" } },
{ lib = "bcrypt", when = { os = "windows" } },
]
[[example]]
name = "hash"
source = [{ path = "example/hash.c", tree = "manifest" }]
include = [{ path = "config", tree = "manifest" }]
deps = ["mbedcrypto"]
[[example]]
name = "client"
source = [{ path = "example/client.c", tree = "manifest" }]
include = [{ path = "config", tree = "manifest" }]
deps = ["mbedtls"]
[package.publish]
include = [
{ from = "include/mbedtls/*", to = "mbedtls" },
{ from = "include/psa/*", to = "psa" },
{ from = "3rdparty/everest/include/everest/*", to = "everest", when = { everest = true } },
]
[profile.default]
abi = { value = "gnu", when = { os = "linux" } }
options = { everest = true, p256m = true }