Skip to content

Conversation

@vladiantio
Copy link
Contributor

Resolves the issue #25

@suxiaoshao
Copy link
Collaborator

I found that there is also a package of -musl under Linux. Maybe this method is not perfect enough. Maybe it is better to start with a script under Linux.

_ => return Err(format!("unsupported architecture: {arch:?}")),
},
build = match platform {
zed::Os::Linux => "-gnu",
Copy link
Collaborator

@suxiaoshao suxiaoshao Sep 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve noticed there’s also the @oxlint/linux-x64-musl package, but zed doesn’t provide an API to determine whether it’s musl or gnu. Maybe we can just have Linux use the previous path directly (./node_modules/.bin/oxc_language_server).

// Zed does not currently provide an API to determine whether it is gnu or musl,
// So on Linux you need to run the sh (./node_modules/.bin/oxc_language_server) script.
if let zed::Os::Linux = platform {
    return Ok(".bin/oxc_language_server".to_string());
}
Ok(format!(
    "@oxlint/{platform}-{arch}/{binary}",
    platform = match platform {
        zed::Os::Mac => "darwin",
        zed::Os::Linux => "linux",
        zed::Os::Windows => "win32",
    },
    arch = match arch {
        zed::Architecture::Aarch64 => "arm64",
        zed::Architecture::X8664 => "x64",
        _ => return Err(format!("unsupported architecture: {arch:?}")),
    },
    binary = binary_name,
))

@suxiaoshao suxiaoshao merged commit 4680701 into oxc-project:main Sep 19, 2025
@suxiaoshao suxiaoshao linked an issue Sep 19, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

oxc_language_server not found on Linux

2 participants