Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support cpu flag #9636

Open
jlucaso1 opened this issue Mar 26, 2024 · 3 comments
Open

Support cpu flag #9636

jlucaso1 opened this issue Mar 26, 2024 · 3 comments
Labels
bun install Something that relates to the npm-compatible client enhancement New feature or request

Comments

@jlucaso1
Copy link
Contributor

What is the problem this feature would solve?

Override CPU architecture of native modules to install. Acceptable values are same as cpu field of package.json, which comes from process.arch.
Example: bun i --cpu=wasm32 sharp

What is the feature you are proposing to solve the problem?

Same feature present on npm and variants:

https://docs.npmjs.com/cli/v10/commands/npm-install#cpu

What alternatives have you considered?

No response

@jlucaso1 jlucaso1 added the enhancement New feature or request label Mar 26, 2024
@Electroid Electroid added the bun install Something that relates to the npm-compatible client label Mar 26, 2024
@jtenner
Copy link

jtenner commented Apr 19, 2024

I've hit this exact issue. Any advice?

@jlucaso1
Copy link
Contributor Author

@jtenner Unfortunately I have to use npm to install this dependency

@infrahead
Copy link

The new cross-compilation support for Bun build is awesome, and reminded me that we really need the ability to override platforms/architectures in Bun install. In addition to the cpu flag, would be nice to get os and glibc as well. For example, this is npm command I'm using in meantime: npm install --cpu=arm64 --os=linux --libc=glibc sharp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bun install Something that relates to the npm-compatible client enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants