1.0.1 • Published 5 years ago

get-node-modules-rust v1.0.1

Weekly downloads
2
License
MIT
Repository
-
Last release
5 years ago

Walk thougn the Given Dir by Rust crate(readir)

Why

  • f.f.f.f..f.f..ff...f.ff.f..fast

Use

const files = require('get-node-modules-rust').find('./');

Demo

npm run start

see Result

[ './node_modules' ]
cost time: 0.043 ms
  • 3.5G ~ 2ms

Build

cargo build --release

cp dylib into the dir named in package.json and index.js

cp target/release/libfind_files.dylib ./rust-dylib
var lib = ffi.Library(path.join(__dirname, './rust-dylib/libget_dir'), {
  get_dir: ['char *', ['string']],
  free_memory: ['void', ['char *']]
});

Use by