Skip to content

Commit

Permalink
✨ Switching cellular automata approach
Browse files Browse the repository at this point in the history
  • Loading branch information
typio committed Feb 24, 2024
1 parent 98bdd15 commit ef68246
Show file tree
Hide file tree
Showing 6 changed files with 279 additions and 266 deletions.
26 changes: 10 additions & 16 deletions build.zig
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const std = @import("std");

const page_size = 65536;

// Although this function looks imperative, note that its job is to
// declaratively construct a build graph that will be executed by an external
// runner.
Expand All @@ -22,24 +24,16 @@ pub fn build(b: *std.Build) void {
});
exe.rdynamic = true;
exe.entry = .disabled;
exe.use_llvm = false;
exe.use_lld = false;
// exe.use_llvm = false;
// exe.use_lld = false;

// exe.stack_size = 65536; // 1 page = 64kB
// exe.import_memory = true; // import linear memory from the environment
// exe.initial_memory = 2 * page_size; // initial size of the linear memory (1 page = 64kB)
// exe.max_memory = 2 * page_size; // maximum size of the linear memory
// exe.global_base = 100000; // offset in linear memory to place global data

const install = b.addInstallArtifact(exe, .{});
install.step.dependOn(&exe.step);
b.default_step.dependOn(&install.step);

// const lib_unit_tests = b.addTest(.{
// .root_source_file = .{ .path = "src/main.zig" },
// .target = target,
// .optimize = optimize,
// });

// const run_lib_unit_tests = b.addRunArtifact(lib_unit_tests);

// // Similar to creating the run step earlier, this exposes a `test` step to
// // the `zig build --help` menu, providing a way for the user to request
// // running the unit tests.
// const test_step = b.step("test", "Run unit tests");
// test_step.dependOn(&run_lib_unit_tests.step);
}
2 changes: 1 addition & 1 deletion build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// This field is optional.
// This is currently advisory only; Zig does not yet do anything
// with this value.
//.minimum_zig_version = "0.11.0",
.minimum_zig_version = "0.11.0",

// This field is optional.
// Each dependency must either provide a `url` and `hash`, or a `path`.
Expand Down
Loading

1 comment on commit ef68246

@typio
Copy link
Member Author

@typio typio commented on ef68246 Feb 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mawjad this is booty in every way you shouldn't even look at it. I wanna extend the drawing functions into a simple graphics library like p5.js I think that would be cool, but working with zig+wasm is kind of a pain so idk if I'll make the effort.

Please sign in to comment.