Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-node-modules-rust

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-node-modules-rust

fast search node_modules dir, power by Rust dylib

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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

  • Rust, lib.rs with libc
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

Keywords

FAQs

Package last updated on 07 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc