Comments (5)
Hi @innovate-invent - do you have a specific use case for this? Happy to add support, just curious about the utility 😄
from binary-install.
Applications installed via this utility can be run via the run() interface. Those applications expect command line arguments.
The run() function basically just acts as a convenient wrapper for child_process with some path resolution. It would be good to forward a bit more of the underlying interface.
from binary-install.
This would really help with a transient dependency here: wasm-tool/rollup-plugin-rust@9027e61
While it makes sense that install
is a "binary" to run in npm scripts, in many cases a deep dependency binary is run programatically, which can be done more performantly and ergonomically without the .cmd -> .js ->
stubs.
An alternative would be making _getBinaryPath
public, so that people can do whatever they want with it, binary-install
handling just the npm lifecycle. rustwasm/wasm-pack#827 <- possibly this change should be applied to the template?
from binary-install.
I'd love this as well — use case is calling Wrangler programmatically from a CI script written in JavaScript.
from binary-install.
Adding on top of this, returning from run would also be helpful. It's useful for projects that want the main CLI tool to be written in Node, but certain parts of it to be written in another language. For example if a CLI tool was written for a programming language:
const compiler = require("./compiler") // loads a compiler binary
function command_install(...) {...} // uses axios to install a package
function command_compile(...) {
const args = preprocess(...) // do some preprocessing
const stdout = compiler.run(args)
postprocess(stdout)
}
If the language compiles to JavaScript, you may want to use an existing node package to minify the output before the file is saved to the system, but use a language better suited for compilation such as Rust to generate that initial output.
from binary-install.
Related Issues (9)
- Error on Windows HOT 1
- set up github actions
- Add Download Progress Bar HOT 1
- This repo vs. EverlastingBugstopper/binary-install HOT 4
- what happened to the npm package? HOT 4
- @cloudflare/wrangler postinstall script does not exit HOT 2
- Add option to remove only binary or whole directory
- Use checksums to verify integrity of the downloads
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binary-install.