Skip to content

Commit 3f8bd84

Browse files
committed
Limit state_version to wasm target
1 parent 7d067a1 commit 3f8bd84

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/derive/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl Parse for Options {
9898
///
9999
/// The VM will use this as a hint whether it needs to run the migrate function of your contract or not.
100100
///
101-
/// ```no_run
101+
/// ```
102102
/// # use cosmwasm_std::{
103103
/// # DepsMut, entry_point, Env,
104104
/// # Response, StdResult,
@@ -151,6 +151,7 @@ fn expand_attributes(func: &mut ItemFn) -> syn::Result<TokenStream> {
151151

152152
#[allow(unused)]
153153
#[doc(hidden)]
154+
#[cfg(target_arch = "wasm32")]
154155
#[link_section = "cw_state_version"]
155156
/// This is an internal constant exported as a custom section denoting the contract state version.
156157
/// The format and even the existence of this value is an implementation detail, DO NOT RELY ON THIS!
@@ -262,6 +263,7 @@ mod test {
262263
let expected = quote! {
263264
#[allow(unused)]
264265
#[doc(hidden)]
266+
#[cfg(target_arch = "wasm32")]
265267
#[link_section = "cw_state_version"]
266268
/// This is an internal constant exported as a custom section denoting the contract state version.
267269
/// The format and even the existence of this value is an implementation detail, DO NOT RELY ON THIS!

0 commit comments

Comments
 (0)