Skip to content

Instantly share code, notes, and snippets.

@Lightnet
Lightnet / README.md
Last active June 29, 2026 06:56
Raylib 6.0 and nuklear 4.13.3 with zig 0.16.0 sample test by using the AI model to quick setup.

raylib and nuklear

Simple sample test with AI to handle setup and how it works.

project root
- assets
  - JetBrainsMonoNL-Light.ttf
- src
 - nuklear_impl.c

Information:

Zig 0.16.0

Sample test. Note the font need to load to render text.

Note it still use c code and zig a bit.

assets:
@Lightnet
Lightnet / gist:0f583f99028a54d323f9eb4a4d8349d1
Created June 28, 2026 01:25
sample zig 0.16.0 time build test for build.zig
const std = @import("std");
pub fn build(b: *std.Build) void {
std.debug.print("build script running...\n", .{});
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const exe = b.addExecutable(.{
.name = "ztimestartend",
@Lightnet
Lightnet / sample_input.zig
Last active June 26, 2026 18:33
Fake Terminal Input Zig 0.16.0 SDL 3
const std = @import("std");
const zsdl3 = @import("zsdl3"); // https://github.com/felixuxx/zsdl3
pub const TerminalInput = struct {
buffer: std.ArrayList(u8) = .empty,
history: std.ArrayList([]const u8) = .empty,
cursor_pos: usize = 0, // tracks byte index offset from the START
pub fn init() TerminalInput {
return .{};
@Lightnet
Lightnet / database_struct.zig
Created June 25, 2026 05:39
sample database struct AI base model test.
// zig 0.16.0
const std = @import("std");
pub const User = struct {
id: u32,
name: []const u8,
date: []const u8,
};
@Lightnet
Lightnet / sample_thread01.zig
Created June 25, 2026 03:00
sample raylib thread
//
// do not use gpu in thread
// zig 0.16.0
// https://github.com/raylib-zig/raylib-zig.git
const std = @import("std");
const rl = @import("raylib");
const SharedData = struct {
mutex: std.Io.Mutex = .init,
@Lightnet
Lightnet / sample_plane_text02.zig
Created June 23, 2026 00:31
Text 3d render using rlgl raylib. zig.
// working
const rl = @import("raylib");
// https://github.com/raylib-zig/raylib-zig
const rlgl = rl.gl; // raylib rlgl
pub fn main() anyerror!void {
// Initialization
const screen_width = 800;
const screen_height = 450;
@Lightnet
Lightnet / sample_transparent_window.zig
Last active June 22, 2026 05:40
sample transparent window image test
// zig 0.16.0
const rl = @import("raylib"); // https://github.com/raylib-zig/raylib-zig
const std = @import("std");
pub fn main() !void {
// Set configuration flags BEFORE initializing the window
rl.setConfigFlags(.{
.window_undecorated = true,
.window_transparent = true,
@Lightnet
Lightnet / README.md
Last active June 19, 2026 06:52
Zig SDL 3 TTF fake window test sample.

Information:

Prebuild files for sdl3.dll. Use SDL3-devel-3.4.10-mingw.tar.gz

Project Folder:

- src
 - main.zig
- build.zig
@Lightnet
Lightnet / README.md
Last active April 19, 2026 06:57
spacetimedb batch into single build typescript.
// reducer: scheduleReminder
// table: person
// view: my_player

// lifecycle: init
export const init = spacetimedb.init(_ctx => {
  console.log("====::: INIT SPACETIMEDB :::====");
});