Skip to content

Commit

Permalink
Full support of no_std in tendermint crate
Browse files Browse the repository at this point in the history
  • Loading branch information
soareschen committed Nov 23, 2021
1 parent 9690eca commit 89ceb7d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
10 changes: 5 additions & 5 deletions config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
tendermint = { version = "0.23.0", default-features = false, path = "../tendermint" }
flex-error = { version = "0.4.4", default-features = false }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = { version = "0.5" }
url = { version = "2.2" }
serde = { version = "1", default-features = false, features = ["derive"] }
serde_json = { version = "1", default-features = false }
toml = { version = "0.5", default-features = false }
url = { version = "2.2", default-features = false }

[dev-dependencies]
pretty_assertions = "0.7.2"
pretty_assertions = { version = "0.7.2", default-features = false }
2 changes: 1 addition & 1 deletion config/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

use crate::net;
use crate::node_key::NodeKey;
use crate::prelude::*;
use crate::Error;

use crate::prelude::*;
use alloc::collections::{btree_map, BTreeMap};
use core::{fmt, str::FromStr};
use serde::{de, de::Error as _, ser, Deserialize, Serialize};
Expand Down
3 changes: 3 additions & 0 deletions proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

extern crate alloc;

#[cfg(feature = "std")]
extern crate std;

mod prelude;

/// Built-in prost_types with slight customization to enable JSON-encoding
Expand Down
1 change: 1 addition & 0 deletions proto/src/tendermint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ pub mod p2p {
}

pub mod abci {
use crate::prelude::*;
include!("prost/tendermint.abci.rs");
}

Expand Down
3 changes: 0 additions & 3 deletions tendermint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ authors = [
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
async-trait = { version = "0.1", default-features = false }
bytes = { version = "1.0", default-features = false }
Expand Down

0 comments on commit 89ceb7d

Please sign in to comment.