Crates.io | rustc-to-go-target |
lib.rs | rustc-to-go-target |
version | 0.1.0 |
source | src |
created_at | 2023-02-04 23:25:32.506378 |
updated_at | 2023-02-04 23:25:32.506378 |
description | Convert compilation targets supported by rustc (aka target triplets) into targets supported by Go. |
homepage | |
repository | https://github.com/JohnScience/rustc-to-go-target |
max_upload_size | |
id | 776709 |
size | 22,603 |
Library for conversion of targets supported by rustc
(aka target triplets) to targets supported by go
.
Add this to your Cargo.toml:
[dependencies]
rustc-to-go-target = "0.1"
after that you can use it like this:
extern crate rustc_to_go_target;
fn main() {
assert_eq!(rustc_to_go_target::convert("aarch64-apple-darwin"), "darwin/arm64");
assert_eq!(rustc_to_go_target::convert("x86_64-unknown-freebsd"), "freebsd/amd64");
}