You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I imagine people will over time show up to write bindings for all the possible languages - look at the WASM-4 project for a list of what's already possible to compile to WASM pretty simply:
Although because of this they also kind of keep the API to "least common denominator" and the functions are all very C like - even when the languages might allow for much nicer APIs... Personally I'd hope we could be a little more flexible in that regard, but it does have concerns like documentation, etc... ie, the "original" API looks one way while the Zig or Odin API has "more niceness". Perhaps we could support both "raw" and nicer... Mostly I'm imagining useful "aliases" (such as noclip(), if we don't decide to add it more broadly) and named arguments:
// behind the scenes calls clip(-1,-1,-1,-1)tic.noclip()
// named arguments via a structtic.print("hello world", x, y, .{ scale: 3, fixed: false, smallfont: true, color: 4 })
The text was updated successfully, but these errors were encountered:
joshgoebel
changed the title
Do we want to own the per-language WASM bindings/libs?
Do we want to "own" the per-language WASM bindings/libs?
Jan 1, 2022
I've created the first, for Zig: https://github.com/joshgoebel/zig_bunnymark/blob/main/src/tic80.zig
Related: #1259
I imagine people will over time show up to write bindings for all the possible languages - look at the WASM-4 project for a list of what's already possible to compile to WASM pretty simply:
WASM-4 "owns" the bindings (and build scripts) for each of these in it's own repo: https://github.com/aduros/wasm4/tree/main/cli/assets/templates
Although because of this they also kind of keep the API to "least common denominator" and the functions are all very C like - even when the languages might allow for much nicer APIs... Personally I'd hope we could be a little more flexible in that regard, but it does have concerns like documentation, etc... ie, the "original" API looks one way while the Zig or Odin API has "more niceness". Perhaps we could support both "raw" and nicer... Mostly I'm imagining useful "aliases" (such as
noclip()
, if we don't decide to add it more broadly) and named arguments:The text was updated successfully, but these errors were encountered: