Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 655 Bytes

File metadata and controls

26 lines (20 loc) · 655 Bytes

SDL2 for Zig

This is a fork of SDL2, packaged for Zig. Unnecessary files have been deleted, and the build system has been replaced with build.zig.

For SDL3, consider:

Getting started

Linking SDL2 to your project

Fetch SDL and add to your build.zig.zon :

zig fetch --save=SDL git+https://github.com/allyourcodebase/SDL

Add this to your build.zig :

const sdl_dep = b.dependency("SDL", .{
    .optimize = .ReleaseFast,
    .target = target,
});
exe.linkLibrary(sdl_dep.artifact("SDL2"));