-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): include target architecture in nx report (#27094)
- Loading branch information
1 parent
173ea84
commit 40d39d4
Showing
7 changed files
with
57 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#[napi] | ||
#[cfg(target_arch = "wasm32")] | ||
pub const IS_WASM: bool = true; | ||
|
||
#[napi] | ||
#[cfg(not(target_arch = "wasm32"))] | ||
pub const IS_WASM: bool = false; | ||
|
||
use std::env::consts; | ||
|
||
#[napi] | ||
pub fn get_binary_target() -> String { | ||
let arch = consts::ARCH; | ||
let os = consts::OS; | ||
|
||
let mut binary_target = String::new(); | ||
|
||
if !arch.is_empty() { | ||
binary_target.push_str(&arch); | ||
} | ||
|
||
if !os.is_empty() { | ||
if !binary_target.is_empty() { | ||
binary_target.push('-'); | ||
} | ||
binary_target.push_str(&os); | ||
} | ||
|
||
binary_target | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.