-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: introduce iroh-router crate #2832
Merged
+751
−210
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
2a08e7d
refactor: extract protocolhandler trait into iroh-router
dignifiedquire d871e23
refactor: extract custom protocol logic into iroh-router
dignifiedquire fa3a835
fixups
dignifiedquire 9eeee23
fixup import
dignifiedquire 01de8db
Update iroh-router/src/router.rs
dignifiedquire 14dc6ab
apply CR
dignifiedquire 77b4fed
fixup: typo
dignifiedquire 39ac431
fixup formatting
dignifiedquire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[package] | ||
name = "iroh-router" | ||
version = "0.27.0" | ||
edition = "2021" | ||
readme = "README.md" | ||
description = "protocol router support for iroh" | ||
license = "MIT OR Apache-2.0" | ||
authors = ["dignifiedquire <me@dignifiedquire.com>", "n0 team"] | ||
repository = "/~https://github.com/n0-computer/iroh" | ||
keywords = ["quic", "networking", "holepunching", "p2p"] | ||
|
||
|
||
[dependencies] | ||
anyhow = "1.0.91" | ||
futures-buffered = "0.2.9" | ||
futures-lite = "2.3.0" | ||
futures-util = "0.3.31" | ||
iroh-net = { version = "0.27.0", path = "../iroh-net" } | ||
tokio = "1.41.0" | ||
tokio-util = "0.7.12" | ||
tracing = "0.1.40" | ||
|
||
# Examples | ||
clap = { version = "4", features = ["derive"], optional = true } | ||
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true } | ||
dignifiedquire marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[lints] | ||
workspace = true | ||
|
||
|
||
[features] | ||
default = [] | ||
examples = ["dep:clap", "dep:tracing-subscriber"] | ||
|
||
[[example]] | ||
name = "custom-protocol" | ||
required-features = ["examples"] |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# iroh-router | ||
|
||
This crate contains the definitions for custom protocols for `iroh`. | ||
|
||
# License | ||
|
||
This project is licensed under either of | ||
|
||
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or | ||
http://www.apache.org/licenses/LICENSE-2.0) | ||
* MIT license ([LICENSE-MIT](LICENSE-MIT) or | ||
http://opensource.org/licenses/MIT) | ||
|
||
at your option. | ||
|
||
### Contribution | ||
|
||
Unless you explicitly state otherwise, any contribution intentionally submitted | ||
for inclusion in this project by you, as defined in the Apache-2.0 license, | ||
shall be dual licensed as above, without any additional terms or conditions. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting is weird btw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
cargo
...