Skip to content

Commit

Permalink
Merge pull request #18 from lukewilliamboswell/minor-cleanup
Browse files Browse the repository at this point in the history
Minor Cleanup
  • Loading branch information
bhansconnect authored Jan 19, 2024
2 parents 59b46d4 + 0e55559 commit c234d38
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ To generate locally use `roc docs platform/main.roc`, and then use a file server

Well it isn't perfect, hot reloading can be quite nice when developing a game. For this, I suggest using the [entr](https://github.com/eradman/entr) command line tool.

In one terminal run the build command: `find . -name "*.roc" -o -name "*.zig" | entr -cc zig build -Dapp=<app>`.
In one terminal run the build command: `find . -name "*.roc" -o -name "*.zig" | entr -ccr zig build -Dapp=<app>`.

In another terminal run wasm4: `w4 run zig-out/lib/cart.wasm --hot`.

Expand Down
11 changes: 2 additions & 9 deletions build_roc.zig
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,8 @@ pub fn main() !void {
defer std.process.argsFree(allocator, args);

// Setup buffered stdout and stderr
const stdout_file = std.io.getStdOut().writer();
var bwout = std.io.bufferedWriter(stdout_file);
const stdout = bwout.writer();
defer bwout.flush() catch unreachable;

const stderr_file = std.io.getStdErr().writer();
var bwerr = std.io.bufferedWriter(stderr_file);
const stderr = bwerr.writer();
defer bwerr.flush() catch unreachable;
const stdout = std.io.getStdOut().writer();
const stderr = std.io.getStdErr().writer();

// Early exit on not enough args
if (args.len < 2) {
Expand Down
2 changes: 1 addition & 1 deletion examples/rocci-bird.roc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ app "rocci-bird"
}
imports [
w4.Task.{ Task },
w4.W4.{ Gamepad },
w4.W4,
w4.Sprite.{ Sprite },
]
provides [main, Model] to w4
Expand Down

0 comments on commit c234d38

Please sign in to comment.