stdlib: allow app to override the zig os layer (#93)

wch-ch32v003
Connor Rigby 2 years ago committed by GitHub
parent 31070c1530
commit 680b6282f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -48,6 +48,12 @@ pub const debug = @import("debug.zig");
pub const mmio = @import("mmio.zig");
// Allow app to override the os API layer
pub const os = if (@hasDecl(app, "os"))
app.os
else
struct {};
// Allow app to override the panic handler
pub const panic = if (@hasDecl(app, "panic"))
app.panic

Loading…
Cancel
Save