Repository navigation
This release brings a few breaking improvements and fixes, but the main focus of it is the support of re-entrant plugin/host calls on the main thread.
Support re-entrancy on the main thread
Previously, re-entrantly calling host or plugin methods was disallowed, due to all of them requiring &mut on handles. For the same reason, the main-thread interfaces required &mut self, which would cause UB if hosts called plug-in methods re-entrantly (or vice-versa).
This release fixes both issues by simply only requiring and issuing shared & references in both cases.
This change is simple on the surface, but has significant repercussions:
- Implementers must now rewrite their methods to support mutating their state while operating with shared
&references, e.g. by usingCell,OnceCellorRefCell. - Implementers must do so while being wary of the possibility of re-entrant function calls, both to the same function and to different functions.
GUI: Expanded safe use of the Window object
This release adds a new 'w lifetime on the Window type (from the gui extension), which represents the lifetime of the underlying window handle.
(The previously existing 'a lifetime only tracked the gui_api_type's field's lifetime.)
This change allows to track the underlying window handle lifetime, and therefore allows to implement the new RawWindowHandle APIs safely.
What's Changed
- Embrace reentrancy by @prokopyl in #90
- mark
MidiSysExEvent::newasunsafeby @edwloef in #83 - mark
set_cookieandwith_cookieasunsafeby @edwloef in #86 - Embrace reentrancy (host-side) by @prokopyl in #93
- Add window handle lifetime by @prokopyl in #94
- add two missing event kinds to
CoreEventSpace::from_unknownby @edwloef in #99 - Add reproduction test for issue #97 (param gestures not decoded) by @ErwanLegrand in #100
- add three missing CLAP feature constants by @edwloef in #98
- fix(gui): allow plugin to return an error in set_size() by @ErwanLegrand in #102
New Contributors
- @ErwanLegrand made their first contribution in #100
Full Changelog: v0.1.1...v0.2