another wasm release

This commit is contained in:
Scott Richmond 2025-07-01 19:20:33 -04:00
parent e5467e9e7e
commit f8983d24a4
4 changed files with 6 additions and 6 deletions

View File

@ -1154,7 +1154,7 @@ That leaves the following list:
- [x] delete generated .gitignore
- [x] edit first line of rudus.js to import the local `ludus.js`
- On this, made a justfile, but I needed to like actually try the build and figure out what happens. I got carried away touching the js. Too many things at once.
* [ ] design & implement asynchronous i/o+runtime
* [x] design & implement asynchronous i/o+runtime
- [x] use `box`es for i/o: they can be reified in rust: making actors available is rather more complex (i.e. require message passing between the ludus and rust)
* We also then don't have to have prelude run in the vm; that's good
* We... maybe or maybe don't need processes in prelude, since we need to read and write from the boxes; we might be able to do that with closures and functions that call `spawn!` themselves
@ -1164,10 +1164,10 @@ That leaves the following list:
* [x] completion
- [ ] then js->rust->ludus
* [x] kill
* [?] text input
* [x] text input
* [ ] keypresses
- [ ] then ludus->rust->js->rust->ludus
* [ ] slurp
- [x] then ludus->rust->js->rust->ludus
* [x] slurp
- For the above, I've started hammering out a situation. I ought to have followed my instinct here: do a little at a time. I ended up doing all the things in one place all at once.
- What I've done is work on a bespoke `to_json` method for values; and using serde deserialization to read a string delivered from js. I think this is easier and more straightforward than using `wasm_bindgen`. Or easier; I have no idea what the plumbing looks like.
- Just to catch myself up, some additional decisions & thoughts:

View File

@ -66,7 +66,7 @@ function io_poller () {
}
function start_io_polling () {
io_interval_id = setInterval(io_poller, 10)
io_interval_id = setInterval(io_poller, 100)
}
// runs a ludus script; does not return the result

Binary file not shown.

View File

@ -426,7 +426,7 @@ impl World {
}
async fn maybe_do_io(&mut self) {
if self.last_io + 10.0 < now() {
if self.last_io + 100.0 < now() {
let outbox = self.flush_buffers();
let inbox = do_io(outbox).await;
self.fill_buffers(inbox);