Created
April 19, 2017 15:02
-
-
Save andrewrk/b9d23ac7061961d1b31d9495dad56e76 to your computer and use it in GitHub Desktop.
avoids dragging in standard library
This file contains 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
pub fn panic(msg: []const u8) -> noreturn { @breakpoint(); while (true) {} } | |
comptime { | |
if (@sizeOf(@typeOf(foo)) == 0) unreachable; | |
} | |
// now you can have foo be any function you'd like to play with | |
fn foo() { | |
} | |
// build with: | |
// ./zig build_obj test.zig --verbose |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment