Wiring up dictionary and hash rust code to their zig counterparts

This commit is contained in:
Chadtech 2021-01-18 15:25:37 -05:00
parent c7f6de2afe
commit 520dcfbaca
13 changed files with 79 additions and 10 deletions

View file

@ -5,7 +5,7 @@ const testing = std.testing;
// Dict Module
const dict = @import("dict.zig");
comptime {
exportDictFn(dict.size, "size");
exportDictFn(dict.dictSize, "size");
}
// Num Module
@ -42,6 +42,9 @@ fn exportNumFn(comptime func: anytype, comptime func_name: []const u8) void {
fn exportStrFn(comptime func: anytype, comptime func_name: []const u8) void {
exportBuiltinFn(func, "str." ++ func_name);
}
fn exportDictFn(comptime func: anytype, comptime func_name: []const u8) void {
exportBuiltinFn(func, "dict." ++ func_name);
}
// Run all tests in imported modules
// https://github.com/ziglang/zig/blob/master/lib/std/std.zig#L94