feat: add generic extension pump registration mechanism#790
Open
Lebei2046 wants to merge 5 commits into
Open
Conversation
Add support for specifying library search paths in native library target configurations via the new `libDirs` field in package.json. Changes: - Add `lib_dirs` field to TargetNativeConfig - Parse `libDirs` from package.json - Add `-L` flags for libDirs before linking
…docs (v0.5.909) Maintainer fold-in on top of @Lebei2046's libDirs feature: - link.rs: emit /LIBPATH:<dir> on is_windows (MSVC link.exe) instead of -L<dir>, mirroring the existing libs loop's MSVC/Unix split. - resolve.rs: anchor relative libDirs entries to package_dir via package_dir.join(p), matching swift_sources / metal_sources. Field type is now Vec<PathBuf>. - compile.rs: doc-comment on the new field. - manifest-v1.md: row added for libDirs. - resolve.rs: two new tests in manifest_parse_tests covering package_dir anchoring + empty-by-default behavior. - Cargo.toml / Cargo.lock / CLAUDE.md / CHANGELOG.md: 0.5.908 → 0.5.909 (renumbered to follow PerryTS#760 which took 0.5.908 mid-review).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added a generic extension pump registration mechanism that allows external extensions (like Vosk speech recognition) to register pump functions that run on each timer tick, without coupling to Perry core code.
Changes
crates/perry-runtime/src/lib.rsext_pumpmodule with:js_register_ext_pump(f): Extensions call this to register their process_pending functionjs_run_ext_pump(): Called by platform-specific timer pumps to execute registered extension workcrates/perry-ui-gtk4/src/app.rsjs_run_ext_pump()in the 8ms timer pumpRelated issue
Test plan
The extension pump is used by the Vosk speech recognition extension to process pending recognition results on the main thread, enabling real-time text updates during speech.
cargo build --releasecleancargo test --workspace --exclude perry-ui-ios --exclude perry-ui-tvos --exclude perry-ui-watchos --exclude perry-ui-gtk4 --exclude perry-ui-android --exclude perry-ui-windowspassestest-files/or a#[test]in the affected cratedocs/src/-p perry-ui-<backend>locally on that platformScreenshots / output
Checklist
feat:/fix:/docs:/chore:prefix convention used in the logBenefits
AtomicPtrwith proper memory orderingstdlib_pumpregistration pattern