-
-
Save kbd/83193ef65e8d3416e20a111b4a4d9624 to your computer and use it in GitHub Desktop.
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 mymain = @import("main.zig"); | |
var A = mymain.dummy_allocator; |
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 funcs = @import("funcs.zig"); | |
pub var dummy_allocator: u8 = undefined; | |
fn buildFuncMap() void { | |
const info = @typeInfo(funcs); | |
const decls = info.Struct.decls; | |
inline for (decls) |d| {} | |
} | |
pub fn main() !void { | |
dummy_allocator = 1; | |
buildFuncMap(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
here's a stab at exporting a main config that can be used by another module:
funcs.zig
main.zig