Cargo Features

sdl3-sys has no features set by default.

[dependencies]
sdl3-sys = { version = "0.1.3+SDL3-preview-3.1.6", features = ["build-from-source", "build-from-source-static", "link-static", "link-framework", "sdl-unix-console-build", "use-pkg-config", "use-vcpkg", "assert-level-disabled", "assert-level-debug", "assert-level-paranoid", "debug-impls", "nightly", "use-ash-v0-38", "use-libc-v0-2", "use-windows-sys-v0-59", "use-x11-v2", "use-x11-dl-v2"] }
build-from-source build build-from-source-static?

Build and link SDL 3 from source instead of linking a pre-existing library

Enables cmake, rpkg-config, and sdl3-src

build-from-source-static = build-from-source, link-static

Build and link a static SDL library from source

Link SDL as a static library. The default is to link a shared/dynamic library.

Link SDL as a mac framework. The link-static feature has no effect if this is enabled.

sdl-unix-console-build

When building from source, use the SDL_UNIX_CONSOLE_BUILD flag to disable the X11 dependency and build a console-only version of SDL. This has no effect when not building from source.

use-pkg-config build

Use pkg-config to get link flags for SDL. Only used when not building from source.
This has no effect if the link-framework feature is enabled.

Enables pkg-config

use-vcpkg build

Use vcpkg to get link flags for SDL. Only used when not building from source.
The link-static feature has no effect when using vcpkg.
This has no effect if the link-framework feature is enabled.

Enables vcpkg

assert-level-disabled

These are mutually exlusive; if more than one is enabled, the former in the list is used (so e.g. disabled overrides release). If none are selected, either release or debug will
be enabled based on the build profile

Affects assert::SDL_ASSERT_LEVEL

assert-level-release assert-level-debug

Affects assert::SDL_ASSERT_LEVEL

assert-level-paranoid

Affects assert::SDL_ASSERT_LEVEL

debug-impls

Implement the Debug trait for applicable types

nightly

Enable nightly features

use-ash-v0-38

Optional integrations

Enables ash

use-libc-v0-2

Enables libc

Affects sdl3-sys::ffi.c_wchar_t

use-windows-sys-v0-59

Enables windows-sys

use-x11-v2

Enables x11

use-x11-dl-v2

Enables x11-dl