Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Linux on AArch64 #227

Merged
merged 1 commit into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## next

- Bump mesonlsp to v4.2.2
- Add experimental mesonlsp support for Linux on AArch64.

## 1.23.0

Expand Down
10 changes: 7 additions & 3 deletions src/lsp/mesonlsp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export class MesonLSPLanguageClient extends LanguageServerClient {
name: "mesonlsp-x86_64-unknown-linux-musl.zip",
hash: "f5d1178721cd35575d3d94164de112a8925a10cc25eb6b4567913b197d92d601",
},
"linux-arm64": {
name: "mesonlsp-aarch64-unknown-linux-musl.zip",
hash: "ca74a2eb883a5d69d415e9a58eba2a5305c1d511e109994461f8d7f59715658f",
},
};

static override repoURL: string = "https://github.com/JCWasmx86/mesonlsp";
Expand Down Expand Up @@ -51,7 +55,7 @@ export class MesonLSPLanguageClient extends LanguageServerClient {
const platform = os.platform();
const slug = `${platform}-${arch}`;

if (arch !== "x64" && slug != "darwin-arm64") return null;
if (arch !== "x64" && slug != "darwin-arm64" && slug != "linux-arm64") return null;

const artifact = MesonLSPLanguageClient.artifacts[slug];
return {
Expand All @@ -66,12 +70,12 @@ export class MesonLSPLanguageClient extends LanguageServerClient {

const platform = os.platform();
switch (platform) {
case "linux":
case "darwin":
// x64 and ARM are supported.
return true;
case "linux":
case "win32":
// Currently no support for ARM on other operating systems.
// Currently no support for ARM Windows.
return arch == "x64";
default:
return false;
Expand Down
Loading