myelnet / rust-pop

Rust implementation of a Myel point of presence
1 stars 0 forks source link

feat: wasm dev server #26

Closed tchardin closed 2 years ago

tchardin commented 2 years ago

Building wasm:

Blockers:

alexander-camuto commented 2 years ago

for reference should pass an executor to the swarm that is compatible with wasm. For instance:

let mut swarm = SwarmBuilder::new(transport, behaviour, local_peer_id)
            .executor(Box::new(|fut| {
                wasm_bindgen_futures::spawn_local(fut);
            }))
            .build();
alexander-camuto commented 2 years ago

delete

 let mut yamux_config = yamux::YamuxConfig::default();
        yamux_config.set_max_buffer_size(16 * 1024 * 1024);
        yamux_config.set_receive_window_size(16 * 1024 * 1024);
        core::upgrade::SelectUpgrade::new(yamux_config, mplex_config)

as SelectUpgrade seems to hang forever in the browser. Multiplexer should just be the default mplex::MplexConfig::new()