Skip to content

Commit

Permalink
derive_codec_sv2: refactor to std logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Georges Palauqui committed Oct 20, 2024
1 parent 8f5d7ae commit 03a2dae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions protocols/v2/binary-sv2/no-serde-sv2/derive_codec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 9 additions & 0 deletions protocols/v2/binary-sv2/no-serde-sv2/derive_codec/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down

0 comments on commit 03a2dae

Please sign in to comment.