Skip to content

Commit

Permalink
refactor(iroh-net)!: Move relay implemention in iroh-net behind `ir…
Browse files Browse the repository at this point in the history
…oh-relay` cfg flag (#2516)

## Description

We had an `iroh-relay` cfg flag, but it was unused.

Enabling it is useful for working towards building iroh-net for Wasm (we
won't be able to compile the server bits to Wasm, sorry
:stuck_out_tongue: )

This moves the `axum` and `tokio-rustls-acme` dependencies behind that
feature flag as well as the modules `iroh_net::relay::http::server` and
`iroh_net::relay::iroh_relay`.

I also had to move the `relay::http::server::Protocol` one module up.

## Breaking Changes

- iroh-relay *implementation*-specific features are now behind an
`iroh-relay` feature flag in iroh-net.

## Notes & open questions

LMK!

## Change checklist

- [X] 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.~~ I ran `cargo test -p iroh-net`. That
enables the `iroh-relay` feature and runs successfully.
- [X] All breaking changes documented.

---------

Co-authored-by: Floris Bruynooghe <flub@n0.computer>
  • Loading branch information
matheus23 and flub committed Jul 17, 2024
1 parent d17ffa3 commit f37d9f9
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 135 deletions.
Loading

0 comments on commit f37d9f9

Please sign in to comment.