This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.10) | |
| # Debug build | |
| # $ cmake -S . -B build/debug -GNinja -DCMAKE_BUILD_TYPE=Debug | |
| # $ cmake --build build/debug -- basic_window && ./build/debug/basic_window.exe | |
| # Release build | |
| # $ cmake -S . -B build/release -GNinja -DCMAKE_BUILD_TYPE=Release | |
| # $ cmake --build build/release -- basic_window && ./build/release/basic_window.exe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| pub fn build(b: *std.Build) void { | |
| const target = b.standardTargetOptions(.{}); | |
| const optimize = b.standardOptimizeOption(.{}); | |
| const lib_mod = b.createModule(.{ | |
| .root_source_file = b.path("lib/mylib/mylib.zig"), | |
| .target = target, | |
| .optimize = optimize, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import std.stdio : writeln; | |
| import std.conv : to; | |
| import std.windows.charset : toMBSz; | |
| import core.sys.windows.windows : GetConsoleOutputCP; | |
| void main() | |
| { | |
| auto currentCodePage = GetConsoleOutputCP(); | |
| writeln(currentCodePage); |
cmake -E tar xf libxml2-xxx.tar.gz
cmake -S libxml2-xxx -B libxml2-xxx-build -D LIBXML2_WITH_PYTHON=OFF -D LIBXML2_WITH_ICONV=OFF -D LIBXML2_WITH_DEBUG=OFF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef UNICODE | |
| #define UNICODE | |
| #endif | |
| #include <stdio.h> | |
| #define WIN32_LEAN_AND_MEAN | |
| #include <Windows.h> | |
| // types |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const std = @import("std"); | |
| fn define_macros(raylib_module: *std.Build.Module) void { | |
| //------------------------------------------------------------------------------------ | |
| // Don't use the built in config.h | |
| //------------------------------------------------------------------------------------ | |
| raylib_module.addCMacro("EXTERNAL_CONFIG_FLAGS", "1"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import x.json2 | |
| import os | |
| struct Tweets { | |
| tweet struct { | |
| created_at string | |
| full_text string | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | |
| // https://medium.com/@tharunappu2004/writing-a-lexer-in-c-a-step-by-step-guide-a1d5c55ac04d | |
| pub var allocator: std.mem.Allocator = undefined; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; | |
| pub var allocator: std.mem.Allocator = undefined; | |
| const S = struct { |