-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(iroh)!: improve reexport structure (#3023)
## Description Currently this simply normalizes `iroh_base` based reexports, but this shows that a lot of the types in `iroh-base` are not very pleasant to import ## Breaking Changes - `iroh-base` - `key` -> `iroh_base::NodeId` etc - `hash` -> `iroh_base::Hash` etc - `node_addr` -> `iroh_base::NodeAddr` - `relay_url` -> `iroh_base::RelayUrl` - `relay_map` -> use `iroh_relay::relay_map` - `iroh` - `hash` -> `iroh_base` - `ticket` -> `iroh_base::ticket`) - `relay` -> removed, use `iroh_relay` directly if needed - `key` -> `NodeId`, etc top level now - `endpoint::Bytes` removed use `bytes::Bytes` - `endpoint::NodeAddr`, use `iroh::NodeAddr` ## Notes & open questions <!-- Any notes, remarks or open questions you have to make about the PR. --> ## Change checklist - [ ] Self-review. - [ ] Documentation updates following the [style guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text), if relevant. - [ ] Tests if relevant. - [ ] All breaking changes documented.
- Loading branch information
1 parent
6e009a8
commit d9fb470
Showing
55 changed files
with
224 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,30 @@ | ||
//! Base types and utilities for Iroh | ||
#![cfg_attr(iroh_docsrs, feature(doc_auto_cfg))] | ||
|
||
// TODO: remove | ||
#[cfg(feature = "base32")] | ||
pub mod base32; | ||
|
||
// TODO: move to own crate | ||
#[cfg(feature = "ticket")] | ||
pub mod ticket; | ||
|
||
#[cfg(feature = "hash")] | ||
pub mod hash; | ||
mod hash; | ||
#[cfg(feature = "key")] | ||
pub mod key; | ||
mod key; | ||
#[cfg(feature = "key")] | ||
pub mod node_addr; | ||
#[cfg(feature = "relay")] | ||
pub mod relay_map; | ||
mod node_addr; | ||
#[cfg(feature = "relay")] | ||
mod relay_url; | ||
#[cfg(feature = "ticket")] | ||
pub mod ticket; | ||
|
||
#[cfg(feature = "hash")] | ||
pub use self::hash::{BlobFormat, Hash, HashAndFormat}; | ||
#[cfg(feature = "key")] | ||
pub use self::key::{ | ||
KeyParsingError, NodeId, PublicKey, SecretKey, SharedSecret, Signature, PUBLIC_KEY_LENGTH, | ||
}; | ||
#[cfg(feature = "key")] | ||
pub use self::node_addr::NodeAddr; | ||
#[cfg(feature = "relay")] | ||
pub use self::relay_url::RelayUrl; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.