Skip to content

Commit

Permalink
Release 0.5.1
Browse files Browse the repository at this point in the history
This bugfix release extends atomics support to more wasm platforms
  • Loading branch information
djkoloski committed May 17, 2021
1 parent f159eea commit 41479ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bytecheck/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bytecheck"
version = "0.5.0"
version = "0.5.1"
authors = ["David Koloski <[email protected]>"]
edition = "2018"
description = "Derive macro for bytecheck"
Expand Down
6 changes: 4 additions & 2 deletions bytecheck/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ use std::env;
fn main() {
let target = env::var("TARGET").unwrap();

let emscripten = target == "asmjs-unknown-emscripten" || target == "wasm32-unknown-emscripten";
let is_wasm = target == "asmjs-unknown-emscripten"
|| target == "wasm32-unknown-emscripten"
|| target == "wasm32-unknown-unknown";

let has_atomic64 = target.starts_with("x86_64")
|| target.starts_with("i686")
|| target.starts_with("aarch64")
|| target.starts_with("powerpc64")
|| target.starts_with("sparc64")
|| target.starts_with("mips64el");
let has_atomic32 = has_atomic64 || emscripten;
let has_atomic32 = has_atomic64 || is_wasm;

if has_atomic64 {
println!("cargo:rustc-cfg=has_atomics_64");
Expand Down

0 comments on commit 41479ca

Please sign in to comment.