Introduce runtime abstraction for faster initialization#53
Open
realfakenerd wants to merge 1 commit intozed-extensions:mainfrom
Open
Introduce runtime abstraction for faster initialization#53realfakenerd wants to merge 1 commit intozed-extensions:mainfrom
realfakenerd wants to merge 1 commit intozed-extensions:mainfrom
Conversation
This commit introduces a new `Runtime` abstraction to manage execution environments for the language server and package installation. The `Runtime` enum currently supports `Bun` (if found on the system path) and falls back to Zed's built-in `Node.js` runtime. This change allows the extension to leverage Bun for potentially faster package management and server execution when available, while maintaining compatibility with the standard Node.js environment. The following changes were made: - Add `src/runtime.rs` defining the `Runtime` enum and its methods (`new`, `server_command`, `install_package`, `latest_package_version`, `installed_package_version`). - Update `Cargo.toml` to include `serde` and `which` dependencies. - Refactor `src/svelte.rs` to use the new `Runtime` for package installation checks, version lookups, and starting the language server process.
MrSubidubi
requested changes
Dec 30, 2025
Contributor
MrSubidubi
left a comment
There was a problem hiding this comment.
As mentioned, I am not really a big fan of this, not because I think we shouldn't support this, but because I think this needs better support in core.
That said, while I am tempted to close this, we can perhaps discuss having this configurable for this extension if you can outline some benefits and if we were to make this opt-in instead of automatic behavior.
Could you elaborate briefly why you think this provides an advantage for users in the context of this extension? I'd also not like for this to become something we add to each extension, but would like your thoughts, because frankly, you'll have more context here. Thanks
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.
Re-opening the #49 here in a new branch, i think it will be better organized this way