Use target_family for wasm.

This commit is contained in:
Stephen Chung
2022-01-12 08:12:28 +08:00
parent f0e9d4a557
commit 37dbc68bf5
18 changed files with 82 additions and 101 deletions

View File

@@ -66,8 +66,8 @@ def_package! {
{
reg_functions!(lib += numbers_to_int::to_int(i8, u8, i16, u16, i32, u32, i64, u64));
#[cfg(not(target_arch = "wasm32"))]
#[cfg(not(target_arch = "wasm64"))]
#[cfg(not(target_family = "wasm"))]
reg_functions!(lib += num_128_to_int::to_int(i128, u128));
}
@@ -86,8 +86,8 @@ def_package! {
{
reg_functions!(lib += numbers_to_float::to_float(i8, u8, i16, u16, i32, u32, i64, u32));
#[cfg(not(target_arch = "wasm32"))]
#[cfg(not(target_arch = "wasm64"))]
#[cfg(not(target_family = "wasm"))]
reg_functions!(lib += num_128_to_float::to_float(i128, u128));
}
}
@@ -522,8 +522,8 @@ gen_conversion_as_functions!(numbers_to_float => to_float (i8, u8, i16, u16, i32
#[cfg(not(feature = "no_float"))]
#[cfg(not(feature = "only_i32"))]
#[cfg(not(feature = "only_i64"))]
#[cfg(not(target_arch = "wasm32"))]
#[cfg(not(target_arch = "wasm64"))]
#[cfg(not(target_family = "wasm"))]
gen_conversion_as_functions!(num_128_to_float => to_float (i128, u128) -> FLOAT);
gen_conversion_as_functions!(basic_to_int => to_int (char) -> INT);
@@ -534,8 +534,8 @@ gen_conversion_as_functions!(numbers_to_int => to_int (i8, u8, i16, u16, i32, u3
#[cfg(not(feature = "only_i32"))]
#[cfg(not(feature = "only_i64"))]
#[cfg(not(target_arch = "wasm32"))]
#[cfg(not(target_arch = "wasm64"))]
#[cfg(not(target_family = "wasm"))]
gen_conversion_as_functions!(num_128_to_int => to_int (i128, u128) -> INT);
#[cfg(feature = "decimal")]