Finn

Results 24 comments of Finn

I've started working on a Rust binding, and I have the core functionality working. I've only bound a few functions to test it so far, but I think the rest...

> Is the stack grows down, isn't the rest heap by default? Well, normally, but in the WASM-4 Rust template and by extension my TIC-80 Rust template, a different memory...

Okay, found the reasoning: https://github.com/aduros/wasm4/pull/78. Basically, both the default allocator, and the commonly recommended `wee_alloc` expect to be able to use `memory.grow` to allocate additional memory pages. So looks like...

I've run into quite a big issue with my Rust template. In WASM-4, the first 4 bytes are unused, but in TIC-80, the memory map begins right away at address...

Really fairly sure, at least not without major modifications to the compiler itself. The null = 0 assumption runs pretty deep through the language and its optimisation features. I wonder...

> 19kb out of 256kb Correct me if I'm wrong, but since the code is stored in the BINARY chunk, isn't the limit actually 64k? > That would require a...

Oh yeah, forgot the memory related functions. In that case I'll just finish off the Rust bindings using `opt-level = 0`. The size penalty isn't just a one time cost,...

Found yet another issue with Rust bindings. I was testing `memcpy`, and I found that Rust can't actually link to an external function called `memcpy`. It clashes with the compiler...

The Rust version is a compiler builtin, so it's not available to developers, only used internally. Also, the interfaces *are* different, the Rust one returns a pointer. I guess that...

In the process of fixing another function signature bug, I encountered some issues with the Zig template: - The template builds with Zig's `master` branch, not 0.9.1. This isn't really...