// Example where we are intending to publish ourselves as a package,
// and are using another published package commonly called "alt".
//
// For this proposal we select ed25519 with SIGN and AUTHENTICATE capabilities to use
// as the basis for universal identities. The pubkey _IS_ the identifier of this package.
// Any .zig `@package()` statements contained in our sources will be SIGNED by out pubkey.
//
// The idea is any person anywhere can generate their own ed25519 identity and self-sign
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
--- a1.flags 2021-03-02 17:52:38.811747918 -0500 | |
+++ b1.flags 2021-03-02 17:52:43.179991504 -0500 | |
@@ -1,4 +1,3 @@ | |
--a35 | |
-a65 | |
-a76 | |
-aes | |
@@ -7,8 +6,6 @@ | |
-altnzcv | |
-am |
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
Test [476/1747] os.linux.io_uring.test "std-native-Debug-bare-single timeout (af... panic: actual 1.6e+01, not within margin 5.0e+00 of expected 1.0e+01 | |
/home/mike/project/zig/work/llvm12/lib/std/testing.zig:215:32: 0x4d56e2 in testing.expectWithinMargin (test) | |
std.debug.panic("actual {}, not within margin {} of expected {}", .{ actual, margin, expected }); | |
^ | |
/home/mike/project/zig/work/llvm12/lib/std/os/linux/io_uring.zig:1356:31: 0x3ef471 in os.linux.io_uring.test "std-native-Debug-bare-single timeout (after a relative time)" (test) | |
testing.expectWithinMargin(@intToFloat(f64, ms), @intToFloat(f64, stopped - started), margin); | |
^ | |
/home/mike/project/zig/work/llvm12/lib/std/special/test_runner.zig:69:28: 0x497d7c in std.special.main (test) | |
} else test_fn.func(); | |
^ |
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
const Foo = struct { | |
a: u32 = 0, | |
b: u32 = 0, | |
c: u32 = 0, | |
d: u32 = 0, | |
e: u32 = 0, | |
f: u32 = 0, | |
g: u32 = 0, | |
}; |
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
// A future version of zig is self-hosting and has a low-latency backend | |
// for x86_64 and arch64. | |
// | |
// A variant of zig may be built with LLVM-backend and this is our | |
// use-case: build zig w/ LLVM-backend. | |
// start point: | |
// → zig binary installation `/opt/zig/{bin,lib}` | |
// → zig source git worktree `/project/zig` |
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
[01e89c917] tiberius▸ zig version | |
0.8.0-dev.1296+01e89c917 | |
[01e89c917] tiberius▸ zig build test-translate-c test-run-translated-c | |
thread 200933 panic: reached unreachable code | |
/Users/mike/project/zig/work/main/lib/std/zig/ast.zig:1821:13: 0x10e138042 in std.zig.ast.Tree.fullFnProto (zig1) | |
.lib_name = null, | |
^ | |
/Users/mike/project/zig/work/main/lib/std/fmt.zig:219:13: 0x10e6d53d6 in std.fmt.format (zig1) | |
try writer.writeAll(fmt[start_index..end_index]); | |
^ |
The primary goal of this proposal is to lexically distinguish error control-flow from regular flow-control:
return
statements do not effect error flow-control or error-stack changes- replace current
return error.BadValue;
withthrow error.BadValue;
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
diff --git a/lib/std/target/powerpc.zig b/lib/std/target/powerpc.zig | |
index 2ec559ca6..2db7d30e8 100644 | |
--- a/lib/std/target/powerpc.zig | |
+++ b/lib/std/target/powerpc.zig | |
@@ -760,7 +760,7 @@ pub const cpu = struct { | |
}; | |
pub const ppc32 = CpuModel{ | |
.name = "ppc32", | |
- .llvm_name = "ppc32", | |
+ .llvm_name = "ppc", |
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
#!/usr/bin/env bash | |
set -e | |
################################################################################ | |
# | |
# note: if building with gcc you might need ~1.5-2.0 GiB per concurrent job | |
# | |
# apt install git vim ruby cmake ninja-build | |
# |
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
const std = @import("std"); | |
const tester = @import("tester.zig"); | |
pub fn main() !void { | |
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator); | |
defer arena.deinit(); | |
const allocator = &arena.allocator; | |
var tests = tester.TestList.init(allocator); |