johanhelsing / matchbox

Painless peer-to-peer WebRTC networking for rust wasm (and native!)
Apache License 2.0
848 stars 67 forks source link

Update to axum-0.7/hyper-1.2 #436

Closed RaoulHC closed 3 months ago

RaoulHC commented 3 months ago

Hyper (and by extension axum) removed the Server struct on 1.0, this largely keeps the same API but uses axum::serve under the hood. However bind is now an async function, and the errors are slightly different.

Closes #397.

RaoulHC commented 3 months ago

Realised that actually the bind can be made non-async, as the TcpListener can be converted back and forth, so this keeps the API pretty much identical.

RaoulHC commented 3 months ago

@johanhelsing that dead code warning seems unrelated to this change, should the field be made public or have an accessor? It looks like it's meant to be there for debugging