Skip to content
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

refactor: move examples to common location #3509

Merged
merged 23 commits into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
f919806
Moved the Chat example into example crate.
yellowred Feb 27, 2023
ee6d2fb
Remove unnecessary deps
yellowred Feb 27, 2023
e9d65a2
Replace chat example with gossipsub version.
yellowred Feb 27, 2023
7255c8c
Moving more examples to separate binary crates.
yellowred Feb 28, 2023
5a1030c
Move Rendezvous protocol examples into separate binary crates.
yellowred Feb 28, 2023
bfe580c
Gather Rendezvous examples in a single crate.
yellowred Mar 2, 2023
0f48838
Move a DCUtR example into a separate crate.
yellowred Mar 2, 2023
4a53d80
No publishing for dcutr example
yellowred Mar 2, 2023
e535d68
Move Identify example to a separate crate.
yellowred Mar 2, 2023
5216f39
Added new lines into Cargo.toml files in examples.
yellowred Mar 2, 2023
3e11c30
cleanup
yellowred Mar 2, 2023
0e423c8
Fix CI error:
yellowred Mar 2, 2023
7ed9a1c
Fix IPFS integration tests.
yellowred Mar 2, 2023
8112a24
Use namesapced binaries to avoid name collision in CI.
yellowred Mar 3, 2023
30006ec
Fix the docs markup
yellowred Mar 3, 2023
db91624
Improved naming and formatting
yellowred Mar 3, 2023
c0ae059
Change to relative references for easier refactoring later
yellowred Mar 3, 2023
b84abe5
Use an Event derived by macro rather than defining it myself.
yellowred Mar 3, 2023
85363e7
More improvements in naming
yellowred Mar 3, 2023
3264a6b
Split network module into a separate file.
yellowred Mar 3, 2023
7b4bc75
More references use relative location.
yellowred Mar 4, 2023
3839920
Use relative path when importing.
yellowred Mar 6, 2023
6568b2d
cleanup
yellowred Mar 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ jobs:
save-if: ${{ github.ref == 'refs/heads/master' }}

- name: Run ipfs-kad example
run: RUST_LOG=libp2p_swarm=debug,libp2p_kad=trace,libp2p_tcp=debug cargo run --example ipfs-kad --features full
run: cd ./examples/ipfs-kad/ && RUST_LOG=libp2p_swarm=debug,libp2p_kad=trace,libp2p_tcp=debug cargo run

rustfmt:
runs-on: ubuntu-latest
Expand Down
155 changes: 143 additions & 12 deletions Cargo.lock

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

45 changes: 9 additions & 36 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ libp2p-tcp = { path = "transports/tcp", features = ["tokio"] }
[workspace]
members = [
"core",
"examples/chat-example",
"examples/dcutr",
"examples/distributed-key-value-store",
"examples/file-sharing",
"examples/identify",
"examples/ipfs-kad",
"examples/ipfs-private",
"examples/ping-example",
"examples/rendezvous",
"misc/metrics",
"misc/multistream-select",
"misc/rw-stream-sink",
Expand Down Expand Up @@ -180,42 +189,6 @@ members = [
"interop-tests"
]

[[example]]
name = "chat"
required-features = ["full"]

[[example]]
name = "chat-tokio"
required-features = ["full"]

[[example]]
name = "file-sharing"
required-features = ["full"]

[[example]]
name = "gossipsub-chat"
required-features = ["full"]

[[example]]
name = "ipfs-private"
required-features = ["full"]

[[example]]
name = "ipfs-kad"
required-features = ["full"]

[[example]]
name = "ping"
required-features = ["full"]

[[example]]
name = "mdns-passive-discovery"
required-features = ["full"]

[[example]]
name = "distributed-key-value-store"
required-features = ["full"]
Comment on lines -183 to -217
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉


# Passing arguments to the docsrs builder in order to properly document cfg's.
# More information: https://docs.rs/about/builds#cross-compiling
[package.metadata.docs.rs]
Expand Down
Loading