Build and run
$ git init
$ git submodule add https://github.com/ryupold/raylib.zig raylib.zig
$ cd raylib.zig
$ git submodule update --init --recursive
$ cd ..
$ zig build run| #!/bin/sh | |
| EXE=main | |
| SDL3=C:/Libs/SDL3/x86_64-w64-mingw32 | |
| if [ ! -e "SDL3.dll" ]; then | |
| cp ${SDL3}/bin/SDL3.dll . | |
| fi | |
| cc -I${SDL3}/include -L${SDL3}/bin -o ${EXE} main.c -lSDL3 |
Build and run
$ git init
$ git submodule add https://github.com/ryupold/raylib.zig raylib.zig
$ cd raylib.zig
$ git submodule update --init --recursive
$ cd ..
$ zig build run| package main | |
| import "core:container/queue" | |
| // import "core:fmt" | |
| import rl "vendor:raylib" | |
| SCREEN_WIDTH :: 800 | |
| SCREEN_HEIGHT :: 450 | |
| FPS :: 60 |
| @echo off | |
| setlocal | |
| set EXE=main | |
| set PDB=main | |
| odin build main.odin -file -strict-style -vet -debug -out:%EXE%.exe -pdb-name:%PDB%.pdb | |
| if %ERRORLEVEL% neq 0 exit /b 1 |
| cmake_minimum_required(VERSION 3.10) | |
| project(test-winlibs C) | |
| set(CMAKE_C_STANDARD 99) | |
| set(CMAKE_C_STANDARD_REQUIRED True) | |
| set(CMAKE_C_EXTENSIONS OFF) | |
| set(CMAKE_C_FLAGS "") | |
| set(CMAKE_C_FLAGS_DEBUG "") | |
| set(CMAKE_C_FLAGS_RELEASE "") | |
| set(CMAKE_C_STANDARD_LIBRARIES "") |
| const std = @import("std"); | |
| const print = std.debug.print; | |
| pub fn main() !void { | |
| // Create an allocator. | |
| var gpa = std.heap.GeneralPurposeAllocator(.{}){}; | |
| defer _ = gpa.deinit(); | |
| const allocator = gpa.allocator(); | |
| // Parse the URI. |
| package main | |
| import ( | |
| "image/color" | |
| "log" | |
| "github.com/hajimehoshi/ebiten/v2" | |
| "github.com/hajimehoshi/ebiten/v2/ebitenutil" | |
| ) |
| format PE CONSOLE | |
| entry start | |
| include 'encoding\utf8.inc' | |
| include 'win32w.inc' | |
| section '.data' data readable writeable | |
| name db '山田(yamada)', 0 | |
| title TCHAR 'タイトル(title)', 0 | |
| content TCHAR 'コンテンツ(content)', 0 |
| const std = @import("std"); | |
| const fmt = std.fmt; | |
| const mem = std.mem; | |
| const print = std.debug.print; | |
| const assert = std.debug.assert; | |
| const expect = std.testing.expect; | |
| const Allocator = mem.Allocator; | |
| // zig run singly_linked_list.zig | |
| // zig test singly_linked_list.zig |
| #!/bin/bash | |
| set -eu | |
| cd "$(dirname "$0")" | |
| exe_name=linked_list | |
| # build -> debug mode (implicit) | |
| # build debug -> debug mode | |
| # build asan -> debug mode with asan | |
| # build release -> release mode |