Skip to content

Instantly share code, notes, and snippets.

@marler8997
Created November 26, 2019 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marler8997/a1334511af6aeef63f4e8aeb2c507417 to your computer and use it in GitHub Desktop.
Save marler8997/a1334511af6aeef63f4e8aeb2c507417 to your computer and use it in GitHub Desktop.
// run with: zig run --library c test.zig
const std = @import("std");
extern "C" fn strlen([*:0]const u8) c_int;
pub fn main() void {
std.debug.warn("strlen(\"abc\") = {}\n", strlen("abc"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment