diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2015-11-27 15:46:06 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2015-11-27 15:46:06 -0700 |
| commit | 024052b4483b13639e998ef34dc097a24860c612 (patch) | |
| tree | 267af11f1d492a1c532a671079ade5520564299a /example/hello.zig | |
| parent | 9ca9a2c5540683a54bae597c59152d06d095beef (diff) | |
| download | zig-024052b4483b13639e998ef34dc097a24860c612.tar.gz zig-024052b4483b13639e998ef34dc097a24860c612.zip | |
add pub and export visibility modifiers and optimization
Diffstat (limited to 'example/hello.zig')
| -rw-r--r-- | example/hello.zig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/example/hello.zig b/example/hello.zig new file mode 100644 index 0000000000..9e6257eaff --- /dev/null +++ b/example/hello.zig @@ -0,0 +1,10 @@ +#link("c") +extern { + fn puts(s: *mut u8) -> i32; + fn exit(code: i32) -> unreachable; +} + +export fn _start() -> unreachable { + puts("Hello, world!"); + exit(0); +} |
