Repository: ast-grep/ast-grep (language: rust)

Issue:
[feature request]  support @ast-grep/napi-linux-arm64-musl
the code refers to a non existent optional package 

nativeBinding = require('@ast-grep/napi-linux-arm64-musl')

Do you plan to support it ? Is there a workaround possible ?

following optional package are available but  @ast-grep/napi-linux-arm64-musl is missing.
@ast-grep/napi-linux-x64-gnu
@ast-grep/napi-darwin-arm64
@ast-grep/napi-darwin-x64
@ast-grep/napi-linux-x64-musl
@ast-grep/napi-win32-x64-msvc
@ast-grep/napi-win32-arm64-msvc
@ast-grep/napi-win32-ia32-msvc
@ast-grep/napi-linux-arm64-gnu



Discussion / hints:
I don't have plan to support MUSL itself but contributors can take a look at it.

Fix patch:
diff --git a/.github/workflows/napi.yml b/.github/workflows/napi.yml
index ac7b8645b8..ba5eca561f 100644
--- a/.github/workflows/napi.yml
+++ b/.github/workflows/napi.yml
@@ -59,6 +59,14 @@ jobs:
               yarn build --target x86_64-unknown-linux-musl &&
               strip *.node &&
               yarn test
+          - host: ubuntu-20.04
+            target: aarch64-unknown-linux-musl
+            docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
+            build: |-
+              set -e &&
+              cd crates/napi &&
+              rustup target add aarch64-unknown-linux-musl &&
+              yarn build --target aarch64-unknown-linux-musl
           - host: ubuntu-latest
             target: aarch64-unknown-linux-gnu
             # docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
diff --git a/crates/napi/npm/linux-arm64-musl/README.md b/crates/napi/npm/linux-arm64-musl/README.md
new file mode 100644
index 0000000000..2eafdaa243
--- /dev/null
+++ b/crates/napi/npm/linux-arm64-musl/README.md
@@ -0,0 +1,3 @@
+# `@ast-grep/napi-linux-arm64-musl`
+
+This is the **aarch64-unknown-linux-musl** binary for `@ast-grep/napi`
diff --git a/crates/napi/npm/linux-arm64-musl/package.json b/crates/napi/npm/linux-arm64-musl/package.json
new file mode 100644
index 0000000000..dfd4dd3b45
--- /dev/null
+++ b/crates/napi/npm/linux-arm64-musl/package.json
@@ -0,0 +1,34 @@
+{
+  "name": "@ast-grep/napi-linux-arm64-musl",
+  "version": "0.24.1",
+  "os": [
+    "linux"
+  ],
+  "cpu": [
+    "arm64"
+  ],
+  "libc": [
+    "musl"
+  ],
+  "main": "ast-grep-napi.linux-arm64-musl.node",
+  "files": [
+    "ast-grep-napi.linux-arm64-musl.node"
+  ],
+  "description": "Search and Rewrite code at large scale using precise AST pattern",
+  "keywords": [
+    "ast",
+    "pattern",
+    "codemod",
+    "search",
+    "rewrite"
+  ],
+  "license": "MIT",
+  "engines": {
+    "node": ">= 10"
+  },
+  "publishConfig": {
+    "registry": "https://registry.npmjs.org/",
+    "access": "public"
+  },
+  "repository": "https://github.com/ast-grep/ast-grep"
+}
\ No newline at end of file


Test patch: