Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dozreg-toplud
Copy link
Contributor

@dozreg-toplud dozreg-toplud commented Mar 23, 2025

Hoon side update for stateful urwasm: =^-friendly return of ++run, jet registration version increment.

Also faster tests.

TODO

  • more end-to-end ++run tests:
    • urwasm-in-urwasm test

@dozreg-toplud dozreg-toplud marked this pull request as draft March 23, 2025 10:27
@dozreg-toplud dozreg-toplud marked this pull request as ready for review April 25, 2025 14:52
@dozreg-toplud
Copy link
Contributor Author

added a %noun case to $lia-value. No increment to jet version as it does not affect the Nock battery of the jetted gates.

@dozreg-toplud
Copy link
Contributor Author

also added a %vase case, which makes more sense in terms of ergonomics and performance. Monomorphic noun accumulator in +run was also changed from being a raw noun to a vase

@dozreg-toplud
Copy link
Contributor Author

added a +fail:m arrow to purposefully "crash" Wasm VM. this comes with an increment of version tag in jet registration label, which is reflected in vere side of PR

@dozreg-toplud dozreg-toplud changed the base branch from develop to next/kelvin/409 June 18, 2025 17:57
@dozreg-toplud
Copy link
Contributor Author

I changed the target from develop to 409 without rebasing, is it ok? this should be merged with 409

@dozreg-toplud dozreg-toplud force-pushed the quodss/urwasm_stateful branch from b872d64 to 8472b53 Compare July 7, 2025 15:50
@pkova pkova merged commit 8408ac9 into urbit:next/kelvin/409 Jul 16, 2025
1 check passed
pkova added a commit to urbit/vere that referenced this pull request Jul 17, 2025
Depends on urbit/wasm3#1

Adds stateful jet for `++run:wasm-lia`:

- Defines two sets of allocators for m3 structs and codepages;
- Updates `_reduce_monad` to enable computation suspension;
- Adds `_get_state` to load wasm3 state from persistent cache table;
- Adds `_move_state` to store wasm3 state in persistent cache table with
the new key and remove an entry with the old key;
- updates `u3we_lia_run` version due to return type change in
urbit/urbit#7128;

Misc:
builtins for `c3_d`, motes

TODO:
- [x] optimizations:
    - [x] arena on a slab to prevent copying data one more time;
- [x] smarter m3 struct realloc (currently wastes memory since wasm3
uses realloc to grow dynamic arrays);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants