Skip to content

Commit 08b6fda

Browse files
committed
Make concordium-cis2 compile with wasm32v1 target
1 parent ebc0676 commit 08b6fda

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

concordium-cis2/Cargo.toml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "concordium-cis2"
33
version = "6.2.1-alpha.1"
44
authors = ["Concordium <developers@concordium.com>"]
55
rust-version = "1.85"
6-
edition = "2021"
6+
edition = "2024"
77
license = "MPL-2.0"
88
description = "A collection of types for implementing CIS-2 Concordium Token Standard."
99
homepage = "https://github.com/Concordium/concordium-rust-smart-contracts/"
@@ -13,7 +13,6 @@ readme = "./README.md"
1313
[dependencies.concordium-std]
1414
path = "../concordium-std"
1515
version = "10.0"
16-
default-features = false
1716

1817
[dependencies.primitive-types]
1918
version = "0.11"
@@ -32,8 +31,6 @@ optional = true
3231
default-features = false
3332

3433
[features]
35-
default = ["std"]
36-
std = ["concordium-std/std"]
3734
u256_amount = []
3835
serde = [
3936
"dep:serde",
@@ -51,7 +48,7 @@ opt-level = "s"
5148
# This sets the default target to `wasm32-unknown-unknown` and only builds that
5249
# target on docs.rs. This is useful because the some parts of documentation only
5350
# exist on that platform.
54-
targets = ["wasm32-unknown-unknown"]
51+
targets = ["wasm32v1-none"]
5552
# Default features to build documentation for.
5653
features = ["std", "u256_amount", "serde"]
5754
rustc-args = ["--cfg", "docsrs"]

concordium-cis2/src/lib.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,18 @@
3333
//! [`TokenAmountU256`] is defined and implements the [`IsTokenAmount`]
3434
//! interface. The `serde` features derives `serde::Serialize` and
3535
//! `serde::Deserialize` for a variety of types.
36-
#![cfg_attr(not(feature = "std"), no_std)]
36+
37+
#![cfg_attr(target_arch = "wasm32", no_std)]
3738

3839
mod cis2_client;
3940
pub use cis2_client::{Cis2Client, Cis2ClientError};
4041

4142
use concordium_std::{collections::BTreeMap, schema::SchemaType, *};
4243
// Re-export for backward compatibility.
4344
pub use concordium_std::MetadataUrl;
44-
#[cfg(not(feature = "std"))]
4545
use core::{fmt, ops, str::FromStr};
4646
#[cfg(feature = "serde")]
4747
use serde::{Deserialize as SerdeDeserialize, Serialize as SerdeSerialize};
48-
#[cfg(feature = "std")]
49-
use std::{fmt, ops, str::FromStr};
5048

5149
use convert::TryFrom;
5250

0 commit comments

Comments
 (0)