Runtime API for bun install
?
#2395
lewisl9029
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there! I have a use case for installing sets of npm packages into arbitrary temp directories (sometimes concurrently) at runtime. I'm currently using the arborist library inside NPM for this.
I'm looking into switching to
bun install
for the performance and storage efficiency, but ideally I'd want to just call a runtime API within Bun (sayBun.install(cwd)
?) instead of spawning a Bun process for each install, which feels like it could be a bit wasteful in terms of memory, network connections, etc. It'd be even better if Bun.install() could return some metadata about the installed dependency graph like arborist does, but I can live without this for now.Do you think the current implementation of
bun install
can be safely run concurrently like this from within the same process? Or would I be better off just spawning a separate process for each to be safe?If this sounds feasible and is something you're open to accepting, I'd be happy to work on a PR! Thanks!
Beta Was this translation helpful? Give feedback.
All reactions