diff --git a/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/Cargo.toml b/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/Cargo.toml index c7884c73af..729cc26576 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/Cargo.toml +++ b/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/Cargo.toml @@ -16,6 +16,9 @@ keywords = ["stratum", "mining", "bitcoin", "protocol"] [dependencies] binary_codec_sv2 = {version = "^1.0.0", path="../codec"} +[features] +std = [] + [lib] proc-macro = true diff --git a/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/src/lib.rs b/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/src/lib.rs index aef883ba1b..dc8167ec9e 100644 --- a/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/src/lib.rs +++ b/protocols/v2/binary-sv2/no-serde-sv2/derive_codec/src/lib.rs @@ -1,4 +1,13 @@ +#![cfg_attr(not(feature = "std"), no_std)] + extern crate proc_macro; +#[macro_use] +extern crate alloc; + +use alloc::{ + string::{String, ToString}, + vec::Vec, +}; use core::iter::FromIterator; use proc_macro::{Group, TokenStream, TokenTree};