[ASSETS] create a seperate assets/mods directory
This commit is contained in:
parent
4fa1df1281
commit
3c105c235e
2 changed files with 1 additions and 1 deletions
BIN
assets/mods/core.wasm
Executable file
BIN
assets/mods/core.wasm
Executable file
Binary file not shown.
|
|
@ -17,7 +17,7 @@ fn init_mods() void {
|
||||||
var global_runtime = mods.GlobalRuntime.init(allocator);
|
var global_runtime = mods.GlobalRuntime.init(allocator);
|
||||||
defer global_runtime.deinit();
|
defer global_runtime.deinit();
|
||||||
|
|
||||||
// const file = std.fs.cwd().openFile("assets/core.wasm", .{}) catch @panic("Couldn't open assets/core.wasm");
|
// const file = std.fs.cwd().openFile("assets/mods/core.wasm", .{}) catch @panic("Couldn't open assets/mods/core.wasm");
|
||||||
const file = std.fs.cwd().openFile("./test.wasm", .{}) catch @panic("Couldn't open test.wasm");
|
const file = std.fs.cwd().openFile("./test.wasm", .{}) catch @panic("Couldn't open test.wasm");
|
||||||
const all = file.readToEndAlloc(allocator, 1_000_000) catch @panic("Unable to read the file"); // 1 MB
|
const all = file.readToEndAlloc(allocator, 1_000_000) catch @panic("Unable to read the file"); // 1 MB
|
||||||
defer allocator.free(all);
|
defer allocator.free(all);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue