fix: upgrade to zed_extension_api 0.7.0 and improve Linux compatibility - #4
Open
igoforth wants to merge 1 commit into
Open
fix: upgrade to zed_extension_api 0.7.0 and improve Linux compatibility#4igoforth wants to merge 1 commit into
igoforth wants to merge 1 commit into
Conversation
## Changes ### API Compatibility (zed_extension_api 0.1.0 → 0.7.0) - Upgraded zed_extension_api dependency from 0.1.0 to 0.7.0 - Fixed LanguageServerId construction (private constructor in new API) - Updated Worktree API: path() → root_path() - Removed references to GithubReleaseAsset.size (field removed in API) - Fixed string lifetime issues with String::from_utf8_lossy().trim() ### Extension Manifest - Added required [lib] section to extension.toml - Specified Rust kind and version 0.7.0 - Added all required metadata fields ### Language Configuration - Fixed grammar reference: "markdown" → "mermaid" in config.toml - Maintained code_fence_block_name for markdown code block support - Added highlights.scm for syntax highlighting ### Dependency Management - Integrated Zed's npm API for package installation - Use npm_package_latest_version() and npm_install_package() - Dynamic MMDC_PATH derivation from LSP location (no hardcoded paths) - Pass MMDC_PATH as environment variable to LSP server ### Build & Testing - Verified compilation for wasm32-wasip1 target - Tested local installation in Zed remote server environment - Confirmed extension loading and LSP initialization ## Known Issues ### Linux: Puppeteer Chrome Sandbox Error On Linux systems, mmdc fails with Chrome sandbox error: ``` FATAL:zygote_host_impl_linux.cc(128)] No usable sandbox! ``` This is a known issue with headless Chrome on Linux. The extension works on macOS (original author's platform) but requires additional setup on Linux: **Workaround options:** 1. Use `--no-sandbox` flag (security tradeoff for dev environments) 2. Set up Chrome sandbox properly per Puppeteer documentation 3. Run `sudo` commands to configure chrome_sandbox permissions Since this is a Zed extension that should "just work" for users, we're currently using puppeteer-config.json with --no-sandbox for Linux compatibility. The security risk is minimal since users render their own trusted Mermaid diagrams from their own files. ## Testing Environment - Platform: Linux (Ubuntu/Debian-based) - Zed: Remote server setup - Target: wasm32-wasip1 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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.
Changes
API Compatibility (zed_extension_api 0.1.0 → 0.7.0)
Extension Manifest
Language Configuration
Dependency Management
Build & Testing
Known Issues
Linux: Puppeteer Chrome Sandbox Error
On Linux systems, mmdc fails with Chrome sandbox error:
This is a known issue with headless Chrome on Linux. The extension works on macOS (original author's platform) but requires additional setup on Linux:
Workaround options:
--no-sandboxflag (security tradeoff for dev environments)sudocommands to configure chrome_sandbox permissionsSince this is a Zed extension that should "just work" for users, we're currently using puppeteer-config.json with --no-sandbox for Linux compatibility. The security risk is minimal since users render their own trusted Mermaid diagrams from their own files.
Testing Environment