From 874134f3ff726d969fd901fee18c1aceb415c03b Mon Sep 17 00:00:00 2001 From: Ernesto Lanchares Date: Sun, 23 Mar 2025 18:20:38 +0000 Subject: PROPOSAL: IR This is a proposal of a custom IR to run wasm. At the moment only `ir.zig` has some parts related to this IR. The idea of the IR is to be a subset of the one defined in wasm. There are some gaps (mostly in wasm instructions that have opcode 0xFC) but in wasm they don't use all of the opcodes for some reason so maybe we could try to utilize them and be a superset of wasm. --- src/main.zig | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main.zig') diff --git a/src/main.zig b/src/main.zig index 97aa5bf..e8ff1d1 100644 --- a/src/main.zig +++ b/src/main.zig @@ -5,9 +5,8 @@ const window = @import("rendering/window.zig"); const config = @import("config"); const Renderer = @import("rendering/renderer_vulkan.zig"); const math = @import("math.zig"); -const Parser = @import("mods/Parser.zig"); -const vm = @import("mods/vm.zig"); -const wasm = @import("mods/wasm.zig"); +const mods = @import("mods"); + const components = @import("ecs/components.zig"); const entities = @import("ecs/entities.zig"); @@ -30,7 +29,7 @@ pub fn main() !void { // const file = try std.fs.cwd().openFile("assets/core.wasm", .{}); // const all = try file.readToEndAlloc(allocator, 1_000_000); // 1 MB - // var parser = Parser{ + // var parser = mods.Parser{ // .bytes = all, // .byte_idx = 0, // .allocator = allocator, -- cgit v1.2.3