-
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
- Loading branch information
1 parent
28cd0c4
commit a38df9b
Showing
9 changed files
with
82 additions
and
21 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 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.