Skip to content

Commit

Permalink
Merge pull request #75 from fjarri/reexports
Browse files Browse the repository at this point in the history
Adjust re-exports
  • Loading branch information
fjarri authored Nov 19, 2024
2 parents cd58417 + 1c662a3 commit b3276cb
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 19 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.2.0] - in development

### Changed

- Removed `protocol::digest` re-export ([#75]).
- `digest` and `signature` are now re-exported from the top level instead of `session` ([#75]).


[#75]: https://github.com/entropyxyz/manul/pull/75


## [0.1.0] - 2024-11-19

### Changed
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions examples/src/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ use alloc::{
};
use core::fmt::Debug;

use manul::protocol::*;
use manul::protocol::{
Artifact, BoxedRound, Deserializer, DirectMessage, EchoBroadcast, EntryPoint, FinalizeOutcome, LocalError,
MessageValidationError, NormalBroadcast, PartyId, Payload, Protocol, ProtocolError, ProtocolMessagePart,
ProtocolValidationError, ReceiveError, Round, RoundId, Serializer,
};
use rand_core::CryptoRngCore;
use serde::{Deserialize, Serialize};
use tracing::debug;
Expand Down Expand Up @@ -405,7 +409,7 @@ mod tests {

use manul::{
dev::{run_sync, BinaryFormat, TestSessionParams, TestSigner},
session::signature::Keypair,
signature::Keypair,
};
use rand_core::OsRng;
use test_log::test;
Expand Down
2 changes: 1 addition & 1 deletion examples/src/simple_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ mod tests {

use manul::{
dev::{run_sync, BinaryFormat, TestSessionParams, TestSigner},
session::signature::Keypair,
signature::Keypair,
};
use rand_core::OsRng;
use test_log::test;
Expand Down
2 changes: 1 addition & 1 deletion examples/src/simple_malicious.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use manul::{
Artifact, BoxedRound, Deserializer, DirectMessage, EntryPoint, LocalError, PartyId, ProtocolMessagePart,
RoundId, Serializer,
},
session::signature::Keypair,
signature::Keypair,
};
use rand_core::{CryptoRngCore, OsRng};
use test_log::test;
Expand Down
6 changes: 2 additions & 4 deletions examples/tests/async_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ use alloc::collections::{BTreeMap, BTreeSet};
use manul::{
dev::{BinaryFormat, TestSessionParams, TestSigner},
protocol::Protocol,
session::{
signature::Keypair, CanFinalize, LocalError, Message, RoundOutcome, Session, SessionId, SessionParameters,
SessionReport,
},
session::{CanFinalize, LocalError, Message, RoundOutcome, Session, SessionId, SessionParameters, SessionReport},
signature::Keypair,
};
use manul_example::simple::{SimpleProtocol, SimpleProtocolEntryPoint};
use rand::Rng;
Expand Down
2 changes: 1 addition & 1 deletion manul/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "manul"
version = "0.1.0"
version = "0.2.0-dev"
edition = "2021"
rust-version = "1.81"
authors = ['Entropy Cryptography <[email protected]>']
Expand Down
2 changes: 1 addition & 1 deletion manul/benches/empty_rounds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use manul::{
Artifact, BoxedRound, Deserializer, DirectMessage, EchoBroadcast, EntryPoint, FinalizeOutcome, LocalError,
NormalBroadcast, PartyId, Payload, Protocol, ProtocolMessagePart, ReceiveError, Round, RoundId, Serializer,
},
session::signature::Keypair,
signature::Keypair,
};
use rand_core::{CryptoRngCore, OsRng};
use serde::{Deserialize, Serialize};
Expand Down
6 changes: 5 additions & 1 deletion manul/src/combinators/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ use rand_core::CryptoRngCore;
use serde::{Deserialize, Serialize};

use super::markers::{Combinator, CombinatorEntryPoint};
use crate::protocol::*;
use crate::protocol::{
Artifact, BoxedRng, BoxedRound, Deserializer, DirectMessage, EchoBroadcast, EchoRoundParticipation, EntryPoint,
FinalizeOutcome, LocalError, NormalBroadcast, ObjectSafeRound, PartyId, Payload, Protocol, ProtocolError,
ProtocolValidationError, ReceiveError, RoundId, Serializer,
};

/// A marker for the `chain` combinator.
#[derive(Debug, Clone, Copy)]
Expand Down
4 changes: 4 additions & 0 deletions manul/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ pub mod dev;

#[cfg(test)]
mod tests;

// Re-exports for easier version matching
pub use digest;
pub use signature;
2 changes: 0 additions & 2 deletions manul/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,3 @@ pub use serialization::{Deserializer, Serializer};

pub(crate) use errors::ReceiveErrorType;
pub(crate) use object_safe::{BoxedRng, ObjectSafeRound};

pub use digest;
3 changes: 0 additions & 3 deletions manul/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ pub use transcript::{SessionOutcome, SessionReport};
pub use wire_format::WireFormat;

pub(crate) use echo::EchoRoundError;

pub use digest;
pub use signature;
8 changes: 6 additions & 2 deletions manul/src/tests/partial_echo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ use serde::{Deserialize, Serialize};

use crate::{
dev::{run_sync, BinaryFormat, TestSessionParams, TestSigner, TestVerifier},
protocol::*,
session::signature::Keypair,
protocol::{
Artifact, BoxedRound, Deserializer, DirectMessage, EchoBroadcast, EchoRoundParticipation, EntryPoint,
FinalizeOutcome, LocalError, NormalBroadcast, PartyId, Payload, Protocol, ProtocolError, ProtocolMessagePart,
ProtocolValidationError, ReceiveError, Round, RoundId, Serializer,
},
signature::Keypair,
};

#[derive(Debug)]
Expand Down

0 comments on commit b3276cb

Please sign in to comment.