mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
Wiring up dictionary and hash rust code to their zig counterparts
This commit is contained in:
parent
c7f6de2afe
commit
520dcfbaca
13 changed files with 79 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue