Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
zig-cache/
zig-out/
5 changes: 5 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ pub fn build(b: *std.build.Builder) void {
const target = b.standardTargetOptions(.{});
const mode = b.standardOptimizeOption(.{});

const fsm_mod = b.addModule("fsm", .{
.source_file = .{.path = "src/main.zig"},
});

const lib = b.addStaticLibrary(.{
.name = "zigfsm",
.root_source_file = .{
Expand All @@ -25,6 +29,7 @@ pub fn build(b: *std.build.Builder) void {
.root_source_file = .{ .path = "src/benchmark.zig" },
.optimize = std.builtin.Mode.ReleaseFast,
});
benchmark.addModule("fsm", fsm_mod);

b.installArtifact(benchmark);

Expand Down
2 changes: 1 addition & 1 deletion src/benchmark.zig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const std = @import("std");
const zigfsm = @import("main.zig");
const zigfsm = @import("fsm");

// Run with `zig build benchmark`
pub fn main() !void {
Expand Down