Zig Programming Language
last updated: {{ โ1712202776โ | date: โ%Y-%m-%d %H:%Mโ }} Intro a general-purpose programming language and toolchain for maintaining robust, optimal and reusable software. Install Debian/Ubuntu $ sudo apt install zig Alpine Linux $ doas apk add zig ์ต์ ๋ฆฌ๋ ์ค ๋ฒ์ ์ค์น https://ziglang.org/download/ os์ ์ํคํ ์ณ์ ๋ง๋ ํ์ผ์ ๋ค์ด๋ก๋ํ๋ค. ์์ถ์ ํผ ํ PATH๋ฅผ ์ค์ ํด์ฃผ๋ฉด ๋ฐ๋ก ์ฌ์ฉ ๊ฐ๋ฅํ๋ค. ํ์ฌ ์ฌ์ฉ ๋ฒ์ : 0.12 $ tar xJf zig-linux-x86_64-0.12.0-dev.3212+40e64245f.tar.xz $ ln -s zig-linux-x86_64-0.12.0-dev.3212+40e64245f/ zig $ cd zig; ls $ ./zig version $ ./zig help Hello World hello-world.zig const std = @import("std"); pub fn main() !void { std.debug.print("Hello, World!\n", .{}); } run / test $ zig run hello-world.zig $ zig test hello-world.zig build (default=debug, small, fast, safe) $ zig build-exe hello.zig $ ./hello $ zig build-exe --name hello-small -O ReleaseSmall hello.zig $ zig build-exe --name hello-fast -O ReleaseFast hello.zig $ zig build-exe --name hello-safe -O ReleaseSafe hello.zig $ zig build-exe --name hello-debug -O Debug hello.zig $ ls -l $ ./hello-small More Docs zig-nvim - neovim์ zig ๊ฐ๋ฐ ํ๊ฒฝ ์ค์ ํ๊ธฐ zig-cc - Zig๋ก gcc/clang ์ปดํ์ผ๋ฌ ๋์ฒดํ๊ธฐ Links home - https://ziglang.org/ awesome zig - https://www.trackawesomelist.com/catdevnull/awesome-zig/readme/ Study and Docs zig-guide - https://zig.guide/ reference - https://ziglang.org/documentation/0.11.0/ zig-by-example - https://zig-by-example.com/ zig std - https://ziglang.org/documentation/master/std/ exercises - https://exercism.org/tracks/zig/exercises learn x in y minutes - https://learnxinyminutes.com/docs/zig/ Compile and Build zig-cc - https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html Zig Build System Internals - https://mitchellh.com/zig/build-internals