An extremely fast build system
Write project manifests in TOML, and spn turns them into a build graph and executes it in parallel. You don't have to envy Rust programmers any more.
spn's build executor is as fast as Ninja, but since it owns your entire build, it can aggressively parallelize and cache in ways that other tools simply aren't able to.
It's really, really fast.
[package]
name = "hello"
[[bin]]
name = "hello"
source = ["main.c"]$ spn build
Compiled profile debug in 22.5 ms (0 executed, 807 cached)Reproducible, sandboxed builds
Build scripts are written in the same language as your project. spn sandboxes them by compiling them to WASM modules. Or, if you prefer, write your build scripts in any language that compiles to WASM.
Build scripts are first class programs. They can have their own dependencies, and are only rerun when the files they read change.
spn_err_t build(spn_t* spn) {
read_json("endpoints.json");
generate_code();
add_to_build("/source/gen/endpoint.c");
}Zero dependency, single file deployment
spn ships as a single file static executable, or an embeddable library with a C ABI. It runs natively on Linux, macOS, and Windows, supports most common toolchains, and supports your toolchain's cross compilation matrix.
spn build --target x86_64-windows-gnu
spn build --target aarch64-macos
spn build --target x86_64-windows-msvc --toolchain msvcA package manager built for C and C++
spn includes a sophisticated package manager with first class Git integration. Pick from existing package versions, write your own, or just pin to a commit.
C/C++ are not JS. There isn't a package culture. spn takes great care to provide a package manager that can handle anything from complex dependency structures to hardcoded versions to hobby projects with an excellent developer experience.
[deps.package.imgui]
version = "1.92.8"
options = { sdl3 = true, sdlgpu3 = true, freetype = false }
[patch.imgui]
files = ["patches/oopsie-daisy.patch"]
[deps.build]
yyjson = "0.14.0"Try out the libraries you already use
Unsure what all of this looks like? Click a library to see how simple it is to use (or even write your own package for) real, complex libraries.
[package]
name = "window"
version = "0.1.0"
[[bin]]
name = "main"
source = ["main.c"]
[deps.package]
sdl3 = "3.4.16"
[config.sdl3]
options = { x11 = true } [package]
name = "sdl3"
version = "3.4.16"
upstream.url = "https://github.com/libsdl-org/SDL.git"
upstream.commit = "147a8ee32dbf9ac02f3794964490687b6bbda1bc"
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" } },
]
[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"]
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 = [
"-fno-strict-aliasing",
"-fvisibility=hidden",
{ value = "-msse", when = { arch = "x86_64" } },
{ value = "-msse2", when = { arch = "x86_64" } },
{ value = "-msse3", when = { arch = "x86_64" } },
{ value = "-fobjc-arc", when = { os = "macos" } },
]
[lib.macos]
frameworks = [
"AVFoundation",
"AudioToolbox",
"Carbon",
"Cocoa",
"CoreAudio",
"CoreFoundation",
"CoreHaptics",
"CoreMedia",
"CoreVideo",
"ForceFeedback",
"GameController",
"IOKit",
"Metal",
"QuartzCore",
"UniformTypeIdentifiers",
]
[[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"
[[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" } },
]
[lib.macos]
frameworks = ["Cocoa", "IOKit", "CoreFoundation", "CoreAudio", "CoreVideo", "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"]
[publish]
copy = [
{ from = "source/src/raylib.h", to = "include" },
{ from = "source/src/raymath.h", to = "include" },
{ from = "source/src/rlgl.h", to = "include" },
{ from = "source/src/rcamera.h", to = "include" },
] [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.16"
[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 } }
[[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 = [
{ value = "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 }
[publish]
copy = [
{ from = "source/*.h", to = "include" },
{ from = "source/backends/imgui_impl_sdl2.h", to = "include" },
{ from = "source/backends/imgui_impl_opengl3.h", to = "include" },
{ from = "source/backends/imgui_impl_sdl3.h", to = "include" },
{ from = "source/backends/imgui_impl_sdlgpu3.h", to = "include" },
] [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",
]
headers = ["lua.h", "luaconf.h", "lualib.h", "lauxlib.h"]
define = [
{ value = "LUA_USE_POSIX", when = { os = { not = "windows" } } },
]
[[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"
[[lib]]
name = "stb"
kinds = ["source"]
[publish]
copy = [
{ from = "source/*.h", to = "include" },
] [package]
name = "db"
version = "0.1.0"
[[bin]]
name = "main"
source = ["main.c"]
[deps.package]
sqlite = "3.53.4"
[config.sqlite]
options = { fts5 = true, rtree = true } [package]
name = "sqlite"
version = "3.53.4"
author = "sqlite"
maintainer = "tspader"
system_deps = [
{ lib = "m", when = { os = { not = "windows" } } },
{ lib = "pthread", when = { os = { not = "windows" }, single_thread = false } },
{ lib = "dl", when = { os = { not = "windows" }, omit_load_extension = false } },
]
[options.all]
type = "bool"
default = false
[options.fts3]
type = "bool"
default = false
define = "SQLITE_ENABLE_FTS3"
[options.fts4]
type = "bool"
default = [{ value = true, when = { all = true } }, { value = false }]
define = "SQLITE_ENABLE_FTS4"
[options.fts5]
type = "bool"
default = [{ value = true, when = { all = true } }, { value = false }]
define = "SQLITE_ENABLE_FTS5"
[options.geopoly]
type = "bool"
default = [{ value = true, when = { all = true } }, { value = false }]
define = "SQLITE_ENABLE_GEOPOLY"
[options.rtree]
type = "bool"
default = [
{ value = true, when = { all = true } },
{ value = true, when = { geopoly = true } },
{ value = false },
]
define = "SQLITE_ENABLE_RTREE"
[options.session]
type = "bool"
default = [{ value = true, when = { all = true } }, { value = false }]
public = true
define = "SQLITE_ENABLE_SESSION"
[options.preupdate_hook]
type = "bool"
default = [{ value = true, when = { session = true } }, { value = false }]
public = true
define = "SQLITE_ENABLE_PREUPDATE_HOOK"
[options.dbpage]
type = "bool"
default = [{ value = true, when = { all = true } }, { value = false }]
define = "SQLITE_ENABLE_DBPAGE_VTAB"
[options.dbstat]
type = "bool"
default = [{ value = true, when = { all = true } }, { value = false }]
define = "SQLITE_ENABLE_DBSTAT_VTAB"
[options.carray]
type = "bool"
default = [{ value = true, when = { all = true } }, { value = false }]
define = "SQLITE_ENABLE_CARRAY"
[options.column_metadata]
type = "bool"
default = false
define = "SQLITE_ENABLE_COLUMN_METADATA"
[options.scanstatus]
type = "bool"
default = false
define = "SQLITE_ENABLE_STMT_SCANSTATUS"
[options.bytecode_vtab]
type = "bool"
default = [{ value = true, when = { scanstatus = true } }, { value = false }]
define = "SQLITE_ENABLE_BYTECODE_VTAB"
[options.debug]
type = "bool"
default = false
define = "SQLITE_DEBUG"
[options.memsys5]
type = "bool"
default = [{ value = true, when = { debug = true } }, { value = false }]
define = "SQLITE_ENABLE_MEMSYS5"
[options.memsys3]
type = "bool"
default = false
define = "SQLITE_ENABLE_MEMSYS3"
[options.math]
type = "bool"
default = true
define = "SQLITE_ENABLE_MATH_FUNCTIONS"
[options.percentile]
type = "bool"
default = true
define = "SQLITE_ENABLE_PERCENTILE"
[options.omit_json]
type = "bool"
default = false
define = "SQLITE_OMIT_JSON"
[options.omit_load_extension]
type = "bool"
default = false
define = "SQLITE_OMIT_LOAD_EXTENSION"
[options.single_thread]
type = "bool"
default = false
define = "SQLITE_THREADSAFE=0"
[options.tempstore]
type = "enum"
values = ["never", "no", "yes", "always"]
default = "no"
[[lib]]
name = "sqlite3"
kinds = ["static"]
source = ["gen/sqlite3.c"]
define = [
{ value = "SQLITE_TEMP_STORE=0", when = { tempstore = "never" } },
{ value = "SQLITE_TEMP_STORE=2", when = { tempstore = "yes" } },
{ value = "SQLITE_TEMP_STORE=3", when = { tempstore = "always" } },
{ value = "SQLITE_ENABLE_SELECTTRACE", when = { debug = true } },
{ value = "SQLITE_ENABLE_WHERETRACE", when = { debug = true } },
]
[[bin]]
name = "sqlite3"
source = ["gen/shell.c"]
define = [{ value = "_GNU_SOURCE", when = { os = "linux" } }]
deps = ["sqlite3"]
[[example]]
name = "memory"
source = [{ path = "example/memory.c", tree = "manifest" }]
deps = ["sqlite3"]
[publish]
copy = [
{ from = "source/gen/sqlite3.h", to = "include" },
{ from = "source/gen/sqlite3ext.h", to = "include" },
]
[profile.default]
options = { all = true } [package]
name = "fetch"
version = "0.1.0"
[[bin]]
name = "main"
source = ["main.c"]
[deps.package]
curl = "8.19.1" [package]
name = "curl"
version = "8.19.1"
author = "curl"
maintainer = "tspader"
include = ["include"]
system_deps = [
{ lib = "pthread", when = { os = "linux", threaded_resolver = true } },
{ 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", sspi = true } },
{ lib = "wldap32", when = { os = "windows", ldap = true } },
{ 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"
[deps.package]
mbedtls = { version = "3.6.6", when = { mbedtls = true } }
[options.mbedtls]
type = "bool"
default = [{ value = false, when = { os = "windows" } }, { value = true }]
define = "SPN_CURL_MBEDTLS"
[options.schannel]
type = "bool"
default = [{ value = true, when = { os = "windows" } }, { value = false }]
define = "SPN_CURL_SCHANNEL"
[options.sspi]
type = "bool"
default = [{ value = true, when = { schannel = true } }, { value = false }]
define = "SPN_CURL_SSPI"
[options.staticlib]
type = "bool"
default = true
public = true
define = "CURL_STATICLIB"
[options.ca_bundle]
type = "bool"
default = true
define = "SPN_CURL_CA_BUNDLE"
[options.threaded_resolver]
type = "bool"
default = true
define = "SPN_CURL_THREADED_RESOLVER"
[options.ipv6]
type = "bool"
default = true
define = "SPN_CURL_IPV6"
[options.unix_sockets]
type = "bool"
default = true
define = "SPN_CURL_UNIX_SOCKETS"
[options.idn]
type = "bool"
default = false
define = "SPN_CURL_IDN"
[options.http]
type = "bool"
default = true
define = "SPN_CURL_HTTP"
[options.ftp]
type = "bool"
default = true
define = "SPN_CURL_FTP"
[options.file]
type = "bool"
default = true
define = "SPN_CURL_FILE"
[options.dict]
type = "bool"
default = true
define = "SPN_CURL_DICT"
[options.gopher]
type = "bool"
default = true
define = "SPN_CURL_GOPHER"
[options.imap]
type = "bool"
default = true
define = "SPN_CURL_IMAP"
[options.pop3]
type = "bool"
default = true
define = "SPN_CURL_POP3"
[options.smtp]
type = "bool"
default = true
define = "SPN_CURL_SMTP"
[options.telnet]
type = "bool"
default = true
define = "SPN_CURL_TELNET"
[options.tftp]
type = "bool"
default = true
define = "SPN_CURL_TFTP"
[options.mqtt]
type = "bool"
default = true
define = "SPN_CURL_MQTT"
[options.rtsp]
type = "bool"
default = true
define = "SPN_CURL_RTSP"
[options.smb]
type = "bool"
default = true
define = "SPN_CURL_SMB"
[options.ldap]
type = "bool"
default = [{ value = true, when = { os = "windows" } }, { value = false }]
define = "SPN_CURL_LDAP"
[options.ipfs]
type = "bool"
default = true
define = "SPN_CURL_IPFS"
[options.websockets]
type = "bool"
default = true
define = "SPN_CURL_WEBSOCKETS"
[options.proxy]
type = "bool"
default = true
define = "SPN_CURL_PROXY"
[options.cookies]
type = "bool"
default = true
define = "SPN_CURL_COOKIES"
[options.doh]
type = "bool"
default = true
define = "SPN_CURL_DOH"
[options.hsts]
type = "bool"
default = true
define = "SPN_CURL_HSTS"
[options.altsvc]
type = "bool"
default = true
define = "SPN_CURL_ALTSVC"
[options.netrc]
type = "bool"
default = true
define = "SPN_CURL_NETRC"
[options.mime]
type = "bool"
default = true
define = "SPN_CURL_MIME"
[options.form_api]
type = "bool"
default = [{ value = false, when = { mime = false } }, { value = true }]
define = "SPN_CURL_FORM_API"
[options.ntlm]
type = "bool"
default = true
define = "SPN_CURL_NTLM"
[options.aws]
type = "bool"
default = true
define = "SPN_CURL_AWS"
[options.http_auth]
type = "bool"
default = true
define = "SPN_CURL_HTTP_AUTH"
[options.basic_auth]
type = "bool"
default = true
define = "SPN_CURL_BASIC_AUTH"
[options.bearer_auth]
type = "bool"
default = true
define = "SPN_CURL_BEARER_AUTH"
[options.digest_auth]
type = "bool"
default = true
define = "SPN_CURL_DIGEST_AUTH"
[options.kerberos_auth]
type = "bool"
default = true
define = "SPN_CURL_KERBEROS_AUTH"
[options.negotiate_auth]
type = "bool"
default = true
define = "SPN_CURL_NEGOTIATE_AUTH"
[options.verbose_strings]
type = "bool"
default = true
define = "SPN_CURL_VERBOSE_STRINGS"
[[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",
]
deps = [{ pkg = "mbedtls", when = { mbedtls = true } }]
macos = { frameworks = ["SystemConfiguration", "CoreFoundation", "CoreServices"] }
[[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"]
[[example]]
name = "simple"
source = ["docs/examples/simple.c"]
deps = ["curl"]
[[example]]
name = "https"
source = ["docs/examples/https.c"]
deps = ["curl"]
[[example]]
name = "getinmemory"
source = ["docs/examples/getinmemory.c"]
deps = ["curl"]
[[example]]
name = "sepheaders"
source = ["docs/examples/sepheaders.c"]
deps = ["curl"]
[[example]]
name = "simplepost"
source = ["docs/examples/simplepost.c"]
deps = ["curl"]
[[example]]
name = "postinmemory"
source = ["docs/examples/postinmemory.c"]
deps = ["curl"]
[[example]]
name = "multi-single"
source = ["docs/examples/multi-single.c"]
deps = ["curl"]
[[example]]
name = "persistent"
source = ["docs/examples/persistent.c"]
deps = ["curl"]
[[example]]
name = "urlapi"
source = ["docs/examples/urlapi.c"]
deps = ["curl"]
[[example]]
name = "parseurl"
source = ["docs/examples/parseurl.c"]
deps = ["curl"]
[publish]
copy = [
{ from = "source/include/curl/*.h", to = "include/curl" },
]