From f8983d24a4c6098d53449c883401826180a4dfc1 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Tue, 1 Jul 2025 19:20:33 -0400 Subject: [PATCH] another wasm release --- may_2025_thoughts.md | 8 ++++---- pkg/ludus.js | 2 +- pkg/rudus_bg.wasm | Bin 2577397 -> 2577397 bytes src/world.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/may_2025_thoughts.md b/may_2025_thoughts.md index 87a902b..6e6c2b1 100644 --- a/may_2025_thoughts.md +++ b/may_2025_thoughts.md @@ -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: diff --git a/pkg/ludus.js b/pkg/ludus.js index de045a1..542f62b 100644 --- a/pkg/ludus.js +++ b/pkg/ludus.js @@ -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 diff --git a/pkg/rudus_bg.wasm b/pkg/rudus_bg.wasm index 08202951a2503215b7b24f0fbae2ac6de56f5226..d3c90942c73882e4cf8b0da12ef5faff584beba6 100644 GIT binary patch delta 151 zcmWN=yA6U+0EW?AK|p*U_yiH~MdL*D4r1{qPC@MgB+ekq+=`y>Bxm@xX5d>!6FG7< zl_y_;W?lHVrup