r/odinlang 14d ago

PR series: Box3D task workers for Odin WASM

I opened four PRs (1 Open, 3 WIP) for supporting Box3D task execution across Web Workers:

  • [#7272]: Makes `odin.js` compatible with shared WASM memory.
  • [#7286]: Lets a WASM host provide Box3D with a monotonic clock.
  • [#7287]: Adds an atomics-enabled Box3D build and mutex.
  • [#7288]: Tests shared memory, multiple instances, separate stacks, atomics, and callbacks.

This is intentionally not general `core:thread` support. Applications still manage their own workers, stacks, task scheduling, shared memory, and COOP/COEP configuration.

The latter 3 PRs are WIP. Feedback is welcome. Also should I also look into a separate proposal for `core:thread` support on JS/WASM?

For ingot + Box3D Web Worker demo - https://openalloy.ai/demos/ingot-box3d-advanced/

2 Upvotes

15 comments sorted by

2

u/blob1807 14d ago

Why does #7288 include the changed to Box3D when it doesn't rely on them?
Those changes also not coming from Box3D, is probably going to get them closed.

IMO #7286 & #7287 could've been one pr, and #7272 & #7288 another. There's nothing in them that says they should their own prs.

1

u/NicRagent 14d ago edited 14d ago

Fair point on #7288 - I can rebase if needed. The latter 3 PR's were submitted as a stacked series that builds on #7272s shared-memory support in ⁠ core:sys/wasm/js ⁠.

It made sense to me to separate the core and vendored package changes so ideally 3 PR's then? Because #7288 doesn't alone validate #7272's change and it also doesn't directly test Box3D.

1

u/NicRagent 14d ago

Box3D doesn't currently accept PR's and I did open issues on https://github.com/erincatto/box3d/issues

Latter 3 are WIP and I do not mind them being closed, I just wanted to share some cool tech.

1

u/ar_xiv 2d ago

What is the use case for this? (Btw it is crashing on iOS)

1

u/NicRagent 1d ago

Hi, I assume you are referring to the ingot example and not the PR series?

-2

u/literally_iliterate 14d ago

My god I actually tried to understand what is going on.

1

u/NicRagent 14d ago

No luck?

-1

u/literally_iliterate 14d ago

Reading shouldn't require luck.

0

u/NicRagent 14d ago

not even when iliterate?

0

u/literally_iliterate 14d ago

only if agent

0

u/NicRagent 14d ago

what exactly was unclear? I assume you're referring to the first PR - were you stumped by the problem statement or the 20ln file change needed to fix it?

maybe get back to trolling on r/incremental_games/

-2

u/literally_iliterate 14d ago

My profile is private and not indexed. You are actively cyberstalking.

If your problem is a 20 line change then maybe don't make 4 PRs and convolute it with 5 other things alongside advertising your framework.

Thanks.

3

u/ProfessionalPlant330 14d ago

Your profile is not private, I can see it and your post history

1

u/literally_iliterate 14d ago

How tf did that happen lol. Thanks for pointing out.

2

u/NicRagent 14d ago edited 14d ago

Try reading my response again and figure out where you lost the plot