zhangyuang / node-ffi-rs

Implement ffi in Node.js by Rust and NAPI
MIT License
159 stars 6 forks source link

Cannot find module '@yuuang/ffi-rs-linux-arm-gnueabihf' #71

Open salivanas opened 1 week ago

salivanas commented 1 week ago

Current ffi-rs version

Print current Node.js info with the following code

$ cat node_modules/ffi-rs/package.json

{ "_from": "ffi-rs@1.0.91", "_id": "ffi-rs@1.0.91", "_inBundle": false, "_integrity": "sha512-B0OscU3Doy/zgD2uqmul/fyni7PgGZJk16pqNryHJTXbXV/y+ydnMjV7jSi6KOprKJZxsbjpiI5Sh9NgvcTqOg==", "_location": "/ffi-rs", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, "raw": "ffi-rs@1.0.91", "name": "ffi-rs", "escapedName": "ffi-rs", "rawSpec": "1.0.91", "saveSpec": null, "fetchSpec": "1.0.91" }, "_requiredBy": [ "/net-keepalive" ], "_resolved": "https://registry.npmjs.org/ffi-rs/-/ffi-rs-1.0.91.tgz", "_shasum": "eea9feef43b9e81a11c6683c680b35b98203f355", "_spec": "ffi-rs@1.0.91", "_where": "/home/pi/releases/developer/Test_Kit/net-keepalive-bug-reproduction/node_modules/net-keepalive", "author": { "name": "zhangyuang" }, "bugs": { "url": "https://github.com/zhangyuang/node-ffi-rs/issues" }, "bundleDependencies": false, "dependencies": { "@yuuang/ffi-rs-darwin-arm64": "1.0.91", "@yuuang/ffi-rs-darwin-x64": "1.0.91", "@yuuang/ffi-rs-linux-arm64-gnu": "1.0.91", "@yuuang/ffi-rs-linux-arm64-musl": "1.0.91", "@yuuang/ffi-rs-linux-x64-gnu": "1.0.91", "@yuuang/ffi-rs-linux-x64-musl": "1.0.91", "@yuuang/ffi-rs-win32-arm64-msvc": "1.0.91", "@yuuang/ffi-rs-win32-ia32-msvc": "1.0.91", "@yuuang/ffi-rs-win32-x64-msvc": "1.0.91" }, "deprecated": false, "description": "A module written in Rust and N-API provides interface (FFI) features for Node.js", "devDependencies": { "@napi-rs/cli": "^2.15.2", "@types/node": "^20.8.7", "benny": "^3.7.1", "conventional-changelog-cli": "^4.1.0", "esno": "^4.0.0", "ffi-napi": "^4.0.3", "koa": "^2.14.2", "shelljs": "^0.8.5", "typescript": "^5.4.5" }, "files": [ "index.js", "index.d.ts", "README.md" ], "homepage": "https://github.com/zhangyuang/node-ffi-rs#readme", "keywords": [ "ffi", "rust", "node.js", "napi" ], "license": "MIT", "main": "index.js", "name": "ffi-rs", "napi": { "name": "ffi-rs", "triples": { "additional": [ "aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "aarch64-unknown-linux-musl", "i686-pc-windows-msvc", "x86_64-unknown-linux-musl", "aarch64-pc-windows-msvc" ] } }, "optionalDependencies": { "@yuuang/ffi-rs-darwin-arm64": "1.0.91", "@yuuang/ffi-rs-darwin-x64": "1.0.91", "@yuuang/ffi-rs-linux-arm64-gnu": "1.0.91", "@yuuang/ffi-rs-linux-arm64-musl": "1.0.91", "@yuuang/ffi-rs-linux-x64-gnu": "1.0.91", "@yuuang/ffi-rs-linux-x64-musl": "1.0.91", "@yuuang/ffi-rs-win32-arm64-msvc": "1.0.91", "@yuuang/ffi-rs-win32-ia32-msvc": "1.0.91", "@yuuang/ffi-rs-win32-x64-msvc": "1.0.91" }, "repository": { "type": "git", "url": "git+https://github.com/zhangyuang/node-ffi-rs.git" }, "scripts": { "artifacts": "napi artifacts", "build": "node scripts/build.js", "build:c": "node scripts/compile.js", "build:dev": "env=development node scripts/build.js", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add . && git commit -m \"docs: update changelog.md\" && git push origin master", "pub": "npm version patch && git push origin master --tags && npm run changelog", "pub:alpha": "npm version prerelease --preid=alpha && git push origin master --tags", "publish:npm": "node scripts/publish.js", "test": "esno ./test.ts" }, "types": "index.d.ts", "version": "1.0.91" }

$ ls node_modules/@yuuang

Current Node.js arch

Print current Node.js info with the following code

$ node -e "console.log(process.arch, process.platform)"

arm linux

Descibe your problem in detail

I get an error when running on a Raspberry Pi 4.

node index.js node:internal/modules/cjs/loader:1248 const err = new Error(message); ^

Error: Cannot find module '@yuuang/ffi-rs-linux-arm-gnueabihf' Require stack:

Node.js v22.7.0

What's your expect result

Raspberry Pi 4 architecture is supported.

The reproduction repo address

zhangyuang commented 1 week ago

I will fix it in the next version

salivanas commented 1 week ago

Great news!

zhangyuang commented 5 days ago

Support linux-arm-gnueabihf platform architecture in ffi-rs@1.0.94