mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-02 20:18:38 -05:00
Changes on main needed the events code and its tests to follow them.
- A module that carries its manifest in the `vc_manifest`
custom section is loaded without being instantiated, and its exports
are checked by `check_exports`. That check now also requires
`vc_event` with the type (param i32 i32) (result i32) when the
manifest lists `events`, as the instantiated path already did. The
`an_event_plugin_exports_vc_event` test covers a sectioned module
without `vc_event`, with the wrong type and with the right one.
- JavaScript plug-ins have no `vc_event`, so their manifest may not
list the permission `events`, next to `settings`, `cache` and
`commands`. The JavaScript bundle test and docs/plugins.md say so.
- The craft UI framework port removed
`VectorcraftApp::begin_host_iteration`, so the two UI-pass event
tests no longer call it.
- On the framework, the whole window draws only on a context with the
framework's runtime installed. `a_change_made_in_a_ui_pass_is_delivered_in_that_pass`
drew it on a plain `egui::Context`, where the runtime panics ("the
runtime plugin's hooks did not run for the previous pass") and the
test did not finish. It now draws its passes with
`testing::ui_context` and `testing::part_frame`, as the window tests
on main do.