Skip to content

Instantly share code, notes, and snippets.

View silversquirl's full-sized avatar

Silver silversquirl

  • 13:31 (UTC +01:00)
View GitHub Profile
@silversquirl
silversquirl / renderdoc.zig
Created October 1, 2024 22:53
Zig renderdoc API wrapper
//! Wrapper for RenderDoc in-application API, v1.4.1
pub fn load() ?*const Api {
if (!builtin.link_libc) {
return null;
}
var dl: std.DynLib = switch (builtin.os.tag) {
.linux => .{ .inner = .{
.handle = std.c.dlopen(
@silversquirl
silversquirl / .gitignore
Last active October 2, 2024 20:30
A fast, simple allocator for Zig
.zig-cache/
@silversquirl
silversquirl / update-zig
Last active November 18, 2022 14:11
Simple script to update to latest zig master. Depends on curl, tar, xz and jq
#!/bin/sh -e
case "$(uname -s)" in
Linux) os=linux;;
Darwin) os=macos;;
FreeBSD) os=freebsd;;
*) echo 'Unsupported OS' >&2; exit 1;;
esac
curl -sSL 'https://ziglang.org/download/index.json' |
jq -r ".master| .version, (.\"$(uname -m)-$os\" | .tarball, .shasum)" | {
read -r version