From 81e6de55f85fc296e2b1f7bb8dc9d4c789dec29d Mon Sep 17 00:00:00 2001 From: iddev5 Date: Wed, 6 Jul 2022 12:39:08 +0530 Subject: [PATCH] mach: wasm: Build textured-cube and ecs-app examples --- build.zig | 3 ++- examples/ecs-app/physics2d.zig | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.zig b/build.zig index d4da181f..941a244b 100644 --- a/build.zig +++ b/build.zig @@ -41,9 +41,10 @@ pub fn build(b: *std.build.Builder) void { .{ .name = "instanced-cube", .packages = &[_]Pkg{Packages.zmath} }, .{ .name = "advanced-gen-texture-light", .packages = &[_]Pkg{Packages.zmath} }, .{ .name = "fractal-cube", .packages = &[_]Pkg{Packages.zmath} }, - .{ .name = "gkurve", .packages = &[_]Pkg{ Packages.zmath, Packages.zigimg, freetype.pkg }, .std_platform_only = true }, .{ .name = "textured-cube", .packages = &[_]Pkg{ Packages.zmath, Packages.zigimg } }, .{ .name = "ecs-app", .packages = &[_]Pkg{} }, + // NOTE: examples with std_platform_only should be placed at last + .{ .name = "gkurve", .packages = &[_]Pkg{ Packages.zmath, Packages.zigimg, freetype.pkg }, .std_platform_only = true }, }) |example| { // FIXME: this is workaround for a problem that some examples (having the std_platform_only=true field) as // well as zigimg uses IO which is not supported in freestanding environments. So break out of this loop diff --git a/examples/ecs-app/physics2d.zig b/examples/ecs-app/physics2d.zig index 948a1713..d22716e3 100644 --- a/examples/ecs-app/physics2d.zig +++ b/examples/ecs-app/physics2d.zig @@ -21,6 +21,6 @@ pub const Vec2 = struct { x: f32, y: f32 }; fn update(msg: Message) void { switch (msg) { // TODO: implement queries, ability to set components, etc. - .tick => std.debug.print("\nphysics tick!\n", .{}), + .tick => std.log.debug("physics tick!", .{}), } }