Giter VIP home page Giter VIP logo

Comments (5)

EverlastingBugstopper avatar EverlastingBugstopper commented on May 28, 2024

Hi @innovate-invent - do you have a specific use case for this? Happy to add support, just curious about the utility 😄

from binary-install.

innovate-invent avatar innovate-invent commented on May 28, 2024

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.

qm3ster avatar qm3ster commented on May 28, 2024

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.

iameli avatar iameli commented on May 28, 2024

I'd love this as well — use case is calling Wrangler programmatically from a CI script written in JavaScript.

from binary-install.

giraffekey avatar giraffekey commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.