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

feat(cli): allow specifying an alternative cargo binary via CARGO env var #1181

Merged
merged 1 commit into from May 14, 2022

Conversation

messense
Copy link
Contributor

This opens doors for using cargo-xwin to cross compiling for Windows MSVC targets, for example

CARGO=cargo-xwin yarn build --target x86_64-pc-windows-msvc
   Compiling winapi v0.3.9
   Compiling pin-project-lite v0.2.7
   Compiling futures-sink v0.3.19
   Compiling slab v0.4.5
   Compiling pin-utils v0.1.0
   Compiling futures-io v0.3.19
   Compiling ryu v1.0.9
   Compiling once_cell v1.9.0
   Compiling num_cpus v1.13.1
   Compiling cfg-if v1.0.0
   Compiling itoa v1.0.1
   Compiling lazy_static v1.4.0
   Compiling futures-core v0.3.19
   Compiling futures-task v0.3.19
   Compiling libc v0.2.112
   Compiling memchr v2.4.1
   Compiling futures-channel v0.3.19
   Compiling serde v1.0.132
   Compiling futures-util v0.3.19
   Compiling encoding_rs v0.8.30
   Compiling serde_json v1.0.73
   Compiling thread_local v1.1.4
   Compiling tokio v1.15.0
   Compiling num-traits v0.2.14
   Compiling num-integer v0.1.44
   Compiling napi-examples v0.1.0 (/Users/messense/Projects/napi-rs/examples/napi)
   Compiling libloading v0.7.3
   Compiling time v0.1.44
   Compiling futures-executor v0.3.19
   Compiling napi-sys v2.2.2 (/Users/messense/Projects/napi-rs/crates/sys)
   Compiling futures v0.3.19
   Compiling chrono v0.4.19
   Compiling napi v2.4.3 (/Users/messense/Projects/napi-rs/crates/napi)
    Finished dev [unoptimized + debuginfo] target(s) in 11.33s
file index.node
index.node: PE32+ executable (DLL) (GUI) x86-64, for MS Windows

And cargo-zigbuild can also be used the same way.

cc #1180

@Brooooooklyn Brooooooklyn merged commit 1399288 into napi-rs:main May 14, 2022
@messense messense deleted the cargo-env branch May 14, 2022 07:26
h-a-n-a pushed a commit to speedy-js/napi-rs that referenced this pull request Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants