There are no reviews yet. Be the first to send feedback to the community and the maintainers!
DEPRECATED: This is no longer needed since Zig added specific C-pointer types for translated code. I recommend using C import directly. If there is any issue with the automatic translation process, you can make an issue on the main zig compiler repository and we can fix upstream. Minimal zig wrapper over SDL2. For now, the standard SDL naming conventions are used but these will be changed in the future to use zig namespacing. The only difference between this package and `@cImport(@cInclude("SDL.h"))` is fixing and correcting single-pointer entries and completing macro definitions that are otherwise untranslatable. ## Example use @import("src/index.zig"); pub fn main() u8 { if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) != 0) { SDL_Log(c"failed to initialized SDL\n"); return 1; } defer SDL_Quit(); var renderer: *SDL_Renderer = undefined; var window: *SDL_Window = undefined; if (SDL_CreateWindowAndRenderer(640, 480, SDL_WINDOW_SHOWN, &window, &renderer) != 0) { SDL_Log(c"failed to initialize window and renderer\n"); return 1; } defer SDL_DestroyRenderer(renderer); defer SDL_DestroyWindow(window); SDL_SetWindowTitle(window, c"zig-sdl"); _ = SDL_SetRenderDrawColor(renderer, 0, 64, 128, 255); _ = SDL_RenderClear(renderer); _ = SDL_RenderPresent(renderer); SDL_Delay(3000); return 0; } ## Todo - Clean up remaining arguments to take single-item pointers and non-nullables where applicable. - Convert c_int return codes to bool where applicable. - Potentially namespace functions to `sdl.` instead of the current `SDL_`.
2048-cli
The game 2048 for your Linux terminal (https://github.com/gabrielecirulli/2048)zig-regex
A regex implementation for the zig programming languagezig-rosetta
Rosettacode examples in ziglibhcs
A partially Homomorphic C library.zligc
libc implementation in zigzig-lua
zig interfacing with lua examplezig-nng-example
Example of using nanomsg-next-generation with ZigHeborisC7EX
A high speed puzzle action gamenanopack
Lightweight Msgpack Encoderzig-ryu
Zig port of https://github.com/ulfjack/ryuzig-raytrace
simple raytracer in zigzig-gameboy
A gameboy emulator in zigzig-benchmarks-game
The Computer Language Benchmarks Game in Zigfaststack
If you want to stack blocks kind of quickzig-bn
big numbers for zigzig-ctags
ctags definition for zigzig-replace-c
zig-parsefloat
Float parsing library for Zigzstack
Line-race tetris mode in Zigtetrs
A Tetris Engine in Rustquartic
Music Fundamentals Libraryzig-dlmalloc
Work in progress port of dlmalloc-2.8.6 to Zigzig-compiler-completions
bash and zsh completions for the zig compilereuler
Solutions forzig-simd-mem
std.mem rewrites using vectorizationansiz
ansi escape code library for zigQuickEdit
A (very) small editor for quick editing of large files.Football-Fumble
Android gamezig-docgen
documentation generator for zigzig-notes
notes about the zig programming languagezig-deflate
DEFLATE implementation for ziglwan-api-example
linguist-color-checker
Compares colors of linguist languageslibhcs-voting
An example of a voting system using libhcscihttp
Simple Case-Insensitive File Serverzig-xxh3
XXH3 implementation in Zigmpe
Tetris in C++17advent-of-code-2019
https://adventofcode.com/2019dotfiles
Dotfilesmptet
Multiple-Precision Tetriszig-cli-experiment
Experiment in how to handle the cli interface for ziggolfscript-rs
Golfscript Interpreter in Rustchrono
Timing library in CSnake
Play snake on the terminalint_traits
Extended Traits for Rust Integer TypesLove Open Source and this site? Check out how you can help us