Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/logotip4ik/nrn
Fast cross package manager scripts runner (and more). Similar to `ni`, but faster
https://github.com/logotip4ik/nrn
Last synced: 2 days ago
JSON representation
Fast cross package manager scripts runner (and more). Similar to `ni`, but faster
- Host: GitHub
- URL: https://github.com/logotip4ik/nrn
- Owner: logotip4ik
- Created: 2024-04-06T19:20:09.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-04-13T19:46:25.000Z (7 months ago)
- Last Synced: 2024-04-14T09:57:01.592Z (7 months ago)
- Language: Nim
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nrn
Cross package manager scripts runner (and more). Why, if there is `ni` ? Switching node versions will require you to reinstall the `ni` every time and i forgor to do that.
I tried [`nrr`](https://github.com/ryanccn/nrr), it's fast, cool and maintained, but it lacks some of core package manager features like `install`, `remove` or `add`.## Build
```sh
$ nim c ./src/nrn.nim
```## Benchmarks
Just for fun, i didn't expect to be (nearly) on par with rust, using nim, but it's cool how high you can jump with this little language. I used decent sized package.json file
from my [Keycap](https://github.com/logotip4ik/keycap) project and added `start` script with `node ./index.js` (where index.js is an empty file).Mac M3 pro
```sh
$ hyperfine --shell=none --warmup=5 --output=pipe 'nrr start' 'nrn start' 'yarn start'Benchmark 1: nrr start
Time (mean ± σ): 21.8 ms ± 0.3 ms [User: 14.2 ms, System: 4.1 ms]
Range (min … max): 20.8 ms … 22.4 ms 137 runs
Benchmark 2: nrn start
Time (mean ± σ): 31.6 ms ± 0.5 ms [User: 17.9 ms, System: 6.6 ms]
Range (min … max): 30.2 ms … 32.9 ms 95 runs
Benchmark 3: yarn start
Time (mean ± σ): 202.0 ms ± 3.2 ms [User: 114.8 ms, System: 20.3 ms]
Range (min … max): 191.9 ms … 204.7 ms 14 runs
Summary
nrr start ran
1.45 ± 0.03 times faster than nrn start
9.29 ± 0.19 times faster than yarn start
```