profile
viewpoint
Roman Proskuryakov kpp The Russian Federation

0x7CFE/llst 82

LLVM powered Little Smalltalk.

kpp/2tox 71

Reimplementation of toxcore

kpp/futures-async-combinators 32

Toy future combinators using async/await

kpp/iota_task 1

Ledger Statistics

kpp/async-std 0

Async version of the Rust standard library

kpp/async-stream 0

Asynchronous streams for Rust using async & await notation

kpp/awesome-rust-mentors 0

A list of rust lang mentors tagged by topics of interest

kpp/binary_enclave 0

Binary Embedded Configuration

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 0b630dec8b8b61669077f45a43ccc13829d79d33

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 2 days

push eventtox-rs/rstox

jfreegman

commit sha 8ec0964804ff5c27047f0863a45245b157f08240

Replace mem::uninitialized with mem::MaybeUninit uninitialized has been deprecated and was causing panics. see: https://doc.rust-lang.org/std/mem/fn.uninitialized.html

view details

Roman Proskuryakov

commit sha 2e3dc013ce324dd1d5b01a08c188e7dbee02abed

Merge pull request #37 from JFreegman/master Replace mem::uninitialized with mem::MaybeUninit

view details

push time in 2 days

PR merged tox-rs/rstox

Replace mem::uninitialized with mem::MaybeUninit

uninitialized has been deprecated and was causing panics. see: https://doc.rust-lang.org/std/mem/fn.uninitialized.html

This addresses issue https://github.com/tox-rs/rstox/issues/36

Also, my Rust is a little rusty, so apologies in advance if I did anything strange or incorrect.

+79 -80

1 comment

1 changed file

JFreegman

pr closed time in 2 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 628b2dd0b9fafb520f2e9d7b920460ea201ea12c

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 3 days

delete branch tox-rs/rstox

delete branch : send-with-id

delete time in 3 days

delete branch tox-rs/rstox

delete branch : sk_fmt

delete time in 3 days

delete branch tox-rs/rstox

delete branch : sk_fromstr

delete time in 3 days

pull request commenttox-rs/rstox

Replace mem::uninitialized with mem::MaybeUninit

For some reason there is an issue with TravisCI, so we switched to Github Actions which works perfectly. Would you please rebase onto master?

JFreegman

comment created time in 3 days

delete branch tox-rs/rstox

delete branch : actions

delete time in 3 days

PullRequestReviewEvent
PullRequestReviewEvent

issue commenttox-rs/rstox

Panic in tox_new()

Oh...

JFreegman

comment created time in 3 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha fd7c2d3295da603abf965ba50493e2fa2be4f627

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 4 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha cb61e239780259b271e141efe8b4e4cf4abfb064

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 5 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha e0c82ef80f229365c8f43e5d1750ed2fc72b3936

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 7 days

delete branch tox-rs/tox

delete branch : no_clone

delete time in 8 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha e9697ad1b44dd36a5f12165a80e688191d9022bc

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 8 days

PullRequestReviewEvent

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 9a95c49febefe30e16dcd140510142b970c4f477

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 9 days

issue commentjaparic/heapless

Const generics

How about make a WIP PR so no one else tries to do it on their own?

kpp

comment created time in 10 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 204aa4963c4b5b7f1d93727823ad8201ef41ff2f

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 10 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 69d17a9e171921eb2f8875539867899389762e6f

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 11 days

issue closedtox-rs/tox

Replace blocking Mutex with future Mutex

Myabe with https://docs.rs/futures/0.3.5/futures/lock/struct.Mutex.html

closed time in 11 days

kpp

issue commenttox-rs/tox

Replace blocking Mutex with future Mutex

Fixed in https://github.com/tox-rs/tox/pull/434

kpp

comment created time in 11 days

push eventtox-rs/tox

abigath

commit sha 87c435de42c96739b1475165d70a5bec7abfa514

perf: Replace blocking Mutex Replace PrecomputedCache's blocking mutex with future Mutex Fixes #433

view details

Evgeny Kurnevsky

commit sha de33a32b2c895dd83ce6535f6f183a6ddb059513

refactor: use async fn

view details

Evgeny Kurnevsky

commit sha abf9814a84dcf272e752f45e43d752b40fe0f3a7

refactor(onion_client): use async fn

view details

Evgeny Kurnevsky

commit sha 34453a735b1f4257fc2080d0f25f6189bdab306a

fix(dht): use tokio rw lock

view details

Evgeny Kurnevsky

commit sha 9415bae9bcbc17a84dd77d0843ec5dd0edf1f4f9

refactor: more async fns

view details

Evgeny Kurnevsky

commit sha cd3a10052ad32d8d4e7f82e2ea83cab87c766443

fix(friend_connection): use tokio rw lock

view details

Evgeny Kurnevsky

commit sha 8cbc87f2079d7e1ff8ed1d9e4ae0393335267c4e

fix(net_crypto): use tokio rw lock

view details

Evgeny Kurnevsky

commit sha 94cb3007caa4d0aa7a483465e34b16bf3de4002a

fix(onion_client): use async mutex

view details

Evgeny Kurnevsky

commit sha caf81d16be411ef847446a2e698b1523a6f461ea

refactor(dht): use simple function instead of extension trait

view details

Evgeny Kurnevsky

commit sha 2fcb4599b19475081208b128e4bccebbac458c15

refactor: use async fns in tcp server

view details

Evgeny Kurnevsky

commit sha 3cd15721869f6c9a60fc8406119a14aaddab61ba

refactor: remove unnecessary conversions

view details

Evgeny Kurnevsky

commit sha 5df6c4b1fe2b487d5dbb0c9bf0df4bca5837a4a1

refactor(tcp): use async fns

view details

Evgeny Kurnevsky

commit sha 37f6cfee4515fb2284f54ed4ef3168b84c51675a

fix(tcp): use async locks

view details

Evgeny Kurnevsky

commit sha 4a1ecea48ce57d41767fe259e4fcaf79103f5b8a

refactor: use async fns

view details

Roman Proskuryakov

commit sha 91eb5637e4ccbe04cff7fdacaa87536f18b95ef3

Merge pull request #434 from 0623forbidden/433_replace_blocking_mutex perf: Replace blocking Mutex

view details

push time in 11 days

PR merged tox-rs/tox

perf: Replace blocking Mutex

Replace PrecomputedCache's blocking mutex with future Mutex Fixes #433

+2509 -2946

20 comments

21 changed files

0623forbidden

pr closed time in 11 days

issue closedtox-rs/tox

Replace PrecomputedCache's blocking Mutex with future Mutex

It's a subissue of #415

closed time in 11 days

0623forbidden

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 7c0b488ad36570ca7472f556ebd492f35e2c191c

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 12 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 36c04071a54dbfc6231d060a9d102ae71e6752f4

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 13 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 09a198717e54715582a94bddfa65fe663a2654a7

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 14 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 8ac986563d79fd301818cdeb087c3401e15af193

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 15 days

startedByron/gitoxide

started time in 16 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 556ee4eb598b54acf335dcbe0e8eec3277bc7741

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 16 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha e62ecb6ba7f277a7248b141982fd050bae73d0aa

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 17 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 8a4f596e5837547e07531b273c00e240e9f25d81

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 18 days

Pull request review commenttox-rs/tox

perf: Replace blocking Mutex

 impl Server {     handshaked client.     */     pub fn handle_packet(&self, pk: &PublicKey, packet: Packet) -> impl Future<Output = Result<(), Error>> + Send {

How about make it async?

0623forbidden

comment created time in 18 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commenttox-rs/tox

WIP: perf: Replace blocking Mutex

 fn main() -> Result<(), Box<dyn std::error::Error>> {     // let local_addr: SocketAddr = "[::]:33445".parse().unwrap(); // [::] for IPv6     info!("Running echo server on {}", local_addr); -    let future = async {-        let socket = common::bind_socket(local_addr).await;-        let stats = Stats::new();--        let lan_discovery_sender = LanDiscoverySender::new(tx.clone(), dht_pk, local_addr.is_ipv6());--        let (tcp_incoming_tx, mut tcp_incoming_rx) = mpsc::unbounded();--        let mut dht_server = Server::new(tx.clone(), dht_pk, dht_sk.clone());-        dht_server.enable_lan_discovery(true);-        dht_server.enable_ipv6_mode(local_addr.is_ipv6());--        let tcp_connections = Connections::new(dht_pk, dht_sk.clone(), tcp_incoming_tx);-        let onion_client = OnionClient::new(dht_server.clone(), tcp_connections.clone(), real_sk.clone(), real_pk);--        let (lossless_tx, mut lossless_rx) = mpsc::unbounded();-        let (lossy_tx, mut lossy_rx) = mpsc::unbounded();--        let (friend_request_tx, mut friend_request_sink_rx) = mpsc::unbounded();-        onion_client.set_friend_request_sink(friend_request_tx);--        let net_crypto = NetCrypto::new(NetCryptoNewArgs {-            udp_tx: tx,-            lossless_tx,-            lossy_tx,-            dht_pk,-            dht_sk,-            real_pk,-            real_sk: real_sk.clone(),-            precomputed_keys: dht_server.get_precomputed_keys(),-        });--        let (net_crypto_tcp_tx, mut net_crypto_tcp_rx) = mpsc::channel(32);-        net_crypto.set_tcp_sink(net_crypto_tcp_tx);--        dht_server.set_net_crypto(net_crypto.clone());-        dht_server.set_onion_client(onion_client.clone());--        let friend_connections = FriendConnections::new(-            real_sk,-            real_pk,-            dht_server.clone(),-            tcp_connections.clone(),-            onion_client.clone(),-            net_crypto.clone(),-        );--        // Bootstrap from nodes-        for &(pk, saddr) in &common::BOOTSTRAP_NODES {-            // get PK bytes of the bootstrap node-            let bootstrap_pk_bytes: [u8; 32] = FromHex::from_hex(pk).unwrap();-            // create PK from bytes-            let bootstrap_pk = PublicKey::from_slice(&bootstrap_pk_bytes).unwrap();+    let socket = common::bind_socket(local_addr).await;+    let stats = Stats::new();++    let lan_discovery_sender = LanDiscoverySender::new(tx.clone(), dht_pk, local_addr.is_ipv6());++    let (tcp_incoming_tx, mut tcp_incoming_rx) = mpsc::unbounded();++    let mut dht_server = Server::new(tx.clone(), dht_pk, dht_sk.clone());+    dht_server.enable_lan_discovery(true);+    dht_server.enable_ipv6_mode(local_addr.is_ipv6());++    let tcp_connections = Connections::new(dht_pk, dht_sk.clone(), tcp_incoming_tx);+    let onion_client = OnionClient::new(dht_server.clone(), tcp_connections.clone(), real_sk.clone(), real_pk);++    let (lossless_tx, mut lossless_rx) = mpsc::unbounded();+    let (lossy_tx, mut lossy_rx) = mpsc::unbounded();++    let (friend_request_tx, mut friend_request_sink_rx) = mpsc::unbounded();+    onion_client.set_friend_request_sink(friend_request_tx);++    let net_crypto = NetCrypto::new(NetCryptoNewArgs {+        udp_tx: tx,+        lossless_tx,+        lossy_tx,+        dht_pk,+        dht_sk,+        real_pk,+        real_sk: real_sk.clone(),+        precomputed_keys: dht_server.get_precomputed_keys(),+    });++    let (net_crypto_tcp_tx, mut net_crypto_tcp_rx) = mpsc::channel(32);+    net_crypto.set_tcp_sink(net_crypto_tcp_tx);++    dht_server.set_net_crypto(net_crypto.clone());+    dht_server.set_onion_client(onion_client.clone());++    let friend_connections = FriendConnections::new(+        real_sk,+        real_pk,+        dht_server.clone(),+        tcp_connections.clone(),+        onion_client.clone(),+        net_crypto.clone(),+    );++    // Bootstrap from nodes+    for &(pk, saddr) in &common::BOOTSTRAP_NODES {+        // get PK bytes of the bootstrap node+        let bootstrap_pk_bytes: [u8; 32] = FromHex::from_hex(pk).unwrap();+        // create PK from bytes+        let bootstrap_pk = PublicKey::from_slice(&bootstrap_pk_bytes).unwrap();++        let node = PackedNode::new(saddr.parse().unwrap(), &bootstrap_pk);++        dht_server.add_initial_bootstrap(node);+        onion_client.add_path_node(node);+    }++    let tcp_connections_c = tcp_connections.clone();+    let net_crypto_tcp_future = async move {+        while let Some((packet, pk)) = net_crypto_tcp_rx.next().await {+            tcp_connections_c.send_data(pk, packet).await?;+        }+        Result::<(), Error>::Ok(())+    }; -            let node = PackedNode::new(saddr.parse().unwrap(), &bootstrap_pk);+    let onion_client_c = onion_client.clone();+    let net_crypto_c = net_crypto.clone();+    let tcp_incoming_future = async {+        while let Some((_relay_pk, packet)) = tcp_incoming_rx.next().await { // TODO: do we need relay_pk at all?+            match packet {+                IncomingPacket::Data(sender_pk, packet) => match packet {+                    DataPayload::CookieRequest(packet) => net_crypto_c.handle_tcp_cookie_request(&packet, sender_pk).map_err(Error::from).await,+                    DataPayload::CookieResponse(packet) => net_crypto_c.handle_tcp_cookie_response(&packet, sender_pk).map_err(Error::from).await,+                    DataPayload::CryptoHandshake(packet) => net_crypto_c.handle_tcp_crypto_handshake(&packet, sender_pk).map_err(Error::from).await,+                    DataPayload::CryptoData(packet) => net_crypto_c.handle_tcp_crypto_data(&packet, sender_pk).map_err(Error::from).await,+                },+                IncomingPacket::Oob(_sender_pk, _packet) => Ok(()),+                IncomingPacket::Onion(packet) => match packet {+                    InnerOnionResponse::OnionAnnounceResponse(packet) => onion_client_c.handle_announce_response(&packet, true).map_err(Error::from).await,+                    InnerOnionResponse::OnionDataResponse(packet) => onion_client_c.handle_data_response(&packet).map_err(Error::from).await,+                },+            }?;+        }+        Result::<(), Error>::Ok(())+    };+    let tcp_incoming_future = tcp_incoming_future.map_err(|err| {+        error!("Failed to handle packet: {:?}", err);+        err+    });++    let net_crypto_c = net_crypto.clone();+    let friend_connections_c = friend_connections.clone();+    let lossless_future = async {+        while let Some((pk, packet)) = lossless_rx.next().await {+            let future = async {

do we need this async block?

0623forbidden

comment created time in 19 days

PullRequestReviewEvent

Pull request review commenttox-rs/tox

WIP: perf: Replace blocking Mutex

 fn main() -> Result<(), Box<dyn std::error::Error>> {         server.add_initial_bootstrap(bootstrap_pn);     } -    let future = async move {-        let socket = common::bind_socket(local_addr).await;-        let server_fut = server.run_socket(socket, rx, stats)-            .boxed();-        let res =-            futures::select! {-                res = server_fut.fuse() => res,-                res = lan_discovery_sender.run().fuse() =>-                    res.map_err(|e| Error::new(ErrorKind::Other, e.compat()))-            };--        if let Err(ref e) = res {-            error!("Processing ended with error: {:?}", e)-        }--        res+    let socket = common::bind_socket(local_addr).await;+    let res = futures::select! {+        res = server.run_socket(socket, rx, stats).fuse() => res,+        res = lan_discovery_sender.run().fuse() =>+            res.map_err(|e| Error::new(ErrorKind::Other, e.compat()))     }; -    info!("Running DHT server on {}", local_addr);+    if let Err(ref e) = res {+        error!("Processing ended with error: {:?}", e)+    } -    let mut runtime = tokio::runtime::Runtime::new()?;-    runtime.block_on(future)?;+    info!("Running DHT server on {}", local_addr);

This line should be somewhere upper

0623forbidden

comment created time in 19 days

PullRequestReviewEvent

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 6acd2bbe196bcecc1df10b7c642fbbb22c8ff575

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 20 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha a9f6b6b19c947f8f99f6c0e3e3e3a72ff33ad04a

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 21 days

Pull request review commenttox-rs/tox

WIP: perf: Replace blocking Mutex

 fn main() -> Result<(), Box<dyn std::error::Error>> {     // let local_addr: SocketAddr = "[::]:33445".parse().unwrap(); // [::] for IPv6     info!("Running echo server on {}", local_addr); -    let future = async {-        let socket = common::bind_socket(local_addr).await;-        let stats = Stats::new();--        let lan_discovery_sender = LanDiscoverySender::new(tx.clone(), dht_pk, local_addr.is_ipv6());--        let (tcp_incoming_tx, mut tcp_incoming_rx) = mpsc::unbounded();--        let mut dht_server = Server::new(tx.clone(), dht_pk, dht_sk.clone());-        dht_server.enable_lan_discovery(true);-        dht_server.enable_ipv6_mode(local_addr.is_ipv6());--        let tcp_connections = Connections::new(dht_pk, dht_sk.clone(), tcp_incoming_tx);-        let onion_client = OnionClient::new(dht_server.clone(), tcp_connections.clone(), real_sk.clone(), real_pk);--        let (lossless_tx, mut lossless_rx) = mpsc::unbounded();-        let (lossy_tx, mut lossy_rx) = mpsc::unbounded();--        let (friend_request_tx, mut friend_request_sink_rx) = mpsc::unbounded();-        onion_client.set_friend_request_sink(friend_request_tx);--        let net_crypto = NetCrypto::new(NetCryptoNewArgs {-            udp_tx: tx,-            lossless_tx,-            lossy_tx,-            dht_pk,-            dht_sk,-            real_pk,-            real_sk: real_sk.clone(),-            precomputed_keys: dht_server.get_precomputed_keys(),-        });--        let (net_crypto_tcp_tx, mut net_crypto_tcp_rx) = mpsc::channel(32);-        net_crypto.set_tcp_sink(net_crypto_tcp_tx);--        dht_server.set_net_crypto(net_crypto.clone());-        dht_server.set_onion_client(onion_client.clone());--        let friend_connections = FriendConnections::new(-            real_sk,-            real_pk,-            dht_server.clone(),-            tcp_connections.clone(),-            onion_client.clone(),-            net_crypto.clone(),-        );--        // Bootstrap from nodes-        for &(pk, saddr) in &common::BOOTSTRAP_NODES {-            // get PK bytes of the bootstrap node-            let bootstrap_pk_bytes: [u8; 32] = FromHex::from_hex(pk).unwrap();-            // create PK from bytes-            let bootstrap_pk = PublicKey::from_slice(&bootstrap_pk_bytes).unwrap();+    let socket = common::bind_socket(local_addr).await;+    let stats = Stats::new();++    let lan_discovery_sender = LanDiscoverySender::new(tx.clone(), dht_pk, local_addr.is_ipv6());++    let (tcp_incoming_tx, mut tcp_incoming_rx) = mpsc::unbounded();++    let mut dht_server = Server::new(tx.clone(), dht_pk, dht_sk.clone());+    dht_server.enable_lan_discovery(true);+    dht_server.enable_ipv6_mode(local_addr.is_ipv6());++    let tcp_connections = Connections::new(dht_pk, dht_sk.clone(), tcp_incoming_tx);+    let onion_client = OnionClient::new(dht_server.clone(), tcp_connections.clone(), real_sk.clone(), real_pk);++    let (lossless_tx, mut lossless_rx) = mpsc::unbounded();+    let (lossy_tx, mut lossy_rx) = mpsc::unbounded();++    let (friend_request_tx, mut friend_request_sink_rx) = mpsc::unbounded();+    onion_client.set_friend_request_sink(friend_request_tx);++    let net_crypto = NetCrypto::new(NetCryptoNewArgs {+        udp_tx: tx,+        lossless_tx,+        lossy_tx,+        dht_pk,+        dht_sk,+        real_pk,+        real_sk: real_sk.clone(),+        precomputed_keys: dht_server.get_precomputed_keys(),+    });++    let (net_crypto_tcp_tx, mut net_crypto_tcp_rx) = mpsc::channel(32);+    net_crypto.set_tcp_sink(net_crypto_tcp_tx);++    dht_server.set_net_crypto(net_crypto.clone());+    dht_server.set_onion_client(onion_client.clone());++    let friend_connections = FriendConnections::new(+        real_sk,+        real_pk,+        dht_server.clone(),+        tcp_connections.clone(),+        onion_client.clone(),+        net_crypto.clone(),+    );++    // Bootstrap from nodes+    for &(pk, saddr) in &common::BOOTSTRAP_NODES {+        // get PK bytes of the bootstrap node+        let bootstrap_pk_bytes: [u8; 32] = FromHex::from_hex(pk).unwrap();+        // create PK from bytes+        let bootstrap_pk = PublicKey::from_slice(&bootstrap_pk_bytes).unwrap();++        let node = PackedNode::new(saddr.parse().unwrap(), &bootstrap_pk);++        dht_server.add_initial_bootstrap(node);+        onion_client.add_path_node(node);+    }++    let tcp_connections_c = tcp_connections.clone();+    let net_crypto_tcp_future = async move {+        while let Some((packet, pk)) = net_crypto_tcp_rx.next().await {+            tcp_connections_c.send_data(pk, packet).await?;+        }+        Result::<(), Error>::Ok(())+    }; -            let node = PackedNode::new(saddr.parse().unwrap(), &bootstrap_pk);+    // let onion_client_c = onion_client.clone();+    // let net_crypto_c = net_crypto.clone();+    // let tcp_incoming_future = async {+    //     while let Some((_relay_pk, packet)) = tcp_incoming_rx.next().await { // TODO: do we need relay_pk at all?+    //         match packet {+    //             IncomingPacket::Data(sender_pk, packet) => match packet {+    //                 DataPayload::CookieRequest(packet) => net_crypto_c.handle_tcp_cookie_request(&packet, sender_pk).map_err(Error::from).await,+    //                 DataPayload::CookieResponse(packet) => net_crypto_c.handle_tcp_cookie_response(&packet, sender_pk).map_err(Error::from).await,+    //                 DataPayload::CryptoHandshake(packet) => net_crypto_c.handle_tcp_crypto_handshake(&packet, sender_pk).map_err(Error::from).await,+    //                 DataPayload::CryptoData(packet) => net_crypto_c.handle_tcp_crypto_data(&packet, sender_pk).map_err(Error::from).await,+    //             },+    //             IncomingPacket::Oob(_sender_pk, _packet) => Ok(()),+    //             IncomingPacket::Onion(packet) => match packet {+    //                 InnerOnionResponse::OnionAnnounceResponse(packet) => onion_client_c.handle_announce_response(&packet, true).map_err(Error::from).await,+    //                 InnerOnionResponse::OnionDataResponse(packet) => onion_client_c.handle_data_response(&packet).map_err(Error::from).await,+    //             },+    //         }?;+    //     }+    //     Result::<(), Error>::Ok(())+    // };+    // let tcp_incoming_future = tcp_incoming_future.map_err(|err| {+    //     error!("Failed to handle packet: {:?}", err);+    //     err+    // });++    let net_crypto_c = net_crypto.clone();+    let friend_connections_c = friend_connections.clone();+    let lossless_future = async {+        while let Some((pk, packet)) = lossless_rx.next().await {+            let future = async {+                match packet[0] {+                    PACKET_ID_ALIVE => {+                        friend_connections_c.handle_ping(pk);+                        Ok(())+                    },+                    PACKET_ID_SHARE_RELAYS => {+                        match ShareRelays::from_bytes(&packet) {+                            Ok((_, share_relays)) =>+                                friend_connections_c.handle_share_relays(pk, share_relays)+                                .map_err(Error::from).await,+                            _ => Err(err_msg("Failed to parse ShareRelays"))+                        }+                    },+                    0x18 => { // PACKET_ID_ONLINE+                        net_crypto_c.send_lossless(pk, vec![0x18]).map_err(Error::from).await?;+                        net_crypto_c.send_lossless(pk, vec![0x32, 0x00]).map_err(Error::from).await?; // PACKET_ID_USERSTATUS+                        net_crypto_c.send_lossless(pk, b"\x30tox-rs".to_vec()).map_err(Error::from).await+                    },+                    0x40 => { // PACKET_ID_CHAT_MESSAGE+                        net_crypto_c.send_lossless(pk, packet).map_err(Error::from).await+                    },+                    _ => Ok(()),+                }+            };+            future.await?;+        }+        Result::<(), Error>::Ok(())+    }; -            dht_server.add_initial_bootstrap(node);-            onion_client.add_path_node(node);+    // handle incoming friend connections by just accepting all of them+    let friend_connection_c = friend_connections.clone();+    let friend_future = async {+        while let Some((pk, _)) = friend_request_sink_rx.next().await {+            friend_connection_c.add_friend(pk);         }+        Result::<(), Error>::Ok(())+    }; -        let tcp_connections_c = tcp_connections.clone();-        let net_crypto_tcp_future = async move {-            while let Some((packet, pk)) = net_crypto_tcp_rx.next().await {-                tcp_connections_c.send_data(pk, packet).await?;-            }-            Result::<(), Error>::Ok(())-        };--        let onion_client_c = onion_client.clone();-        let net_crypto_c = net_crypto.clone();-        let tcp_incoming_future = async {-            while let Some((_relay_pk, packet)) = tcp_incoming_rx.next().await { // TODO: do we need relay_pk at all?-                let future = async {-                    match packet {-                        IncomingPacket::Data(sender_pk, packet) => match packet {-                            DataPayload::CookieRequest(packet) => net_crypto_c.handle_tcp_cookie_request(packet, sender_pk).map_err(Error::from).await,-                            DataPayload::CookieResponse(packet) => net_crypto_c.handle_tcp_cookie_response(packet, sender_pk).map_err(Error::from).await,-                            DataPayload::CryptoHandshake(packet) => net_crypto_c.handle_tcp_crypto_handshake(&packet, sender_pk).map_err(Error::from).await,-                            DataPayload::CryptoData(packet) => net_crypto_c.handle_tcp_crypto_data(&packet, sender_pk).map_err(Error::from).await,-                        },-                        IncomingPacket::Oob(_sender_pk, _packet) => Ok(()),-                        IncomingPacket::Onion(packet) => match packet {-                            InnerOnionResponse::OnionAnnounceResponse(packet) => onion_client_c.handle_announce_response(&packet, true).map_err(Error::from).await,-                            InnerOnionResponse::OnionDataResponse(packet) => onion_client_c.handle_data_response(&packet).map_err(Error::from).await,-                        },-                    }-                };-                future.await?;-            }-            Ok(())-        };-        let tcp_incoming_future = tcp_incoming_future.map_err(|err| {-            error!("Failed to handle packet: {:?}", err);-            err-        });--        let net_crypto_c = net_crypto.clone();-        let friend_connections_c = friend_connections.clone();-        let lossless_future = async {-            while let Some((pk, packet)) = lossless_rx.next().await {-                let future = async {-                    match packet[0] {-                        PACKET_ID_ALIVE => {-                            friend_connections_c.handle_ping(pk);-                            Ok(())-                        },-                        PACKET_ID_SHARE_RELAYS => {-                            match ShareRelays::from_bytes(&packet) {-                                Ok((_, share_relays)) =>-                                    friend_connections_c.handle_share_relays(pk, share_relays)-                                        .map_err(Error::from).await,-                                _ => Err(err_msg("Failed to parse ShareRelays"))-                            }-                        },-                        0x18 => { // PACKET_ID_ONLINE-                            net_crypto_c.send_lossless(pk, vec![0x18]).map_err(Error::from).await?;-                            net_crypto_c.send_lossless(pk, vec![0x32, 0x00]).map_err(Error::from).await?; // PACKET_ID_USERSTATUS-                            net_crypto_c.send_lossless(pk, b"\x30tox-rs".to_vec()).map_err(Error::from).await-                        },-                        0x40 => { // PACKET_ID_CHAT_MESSAGE-                            net_crypto_c.send_lossless(pk, packet).map_err(Error::from).await-                        },-                        _ => Ok(()),-                    }-                };-                future.await?;-            }-            Ok(())-        };--        // handle incoming friend connections by just accepting all of them-        let friend_connection_c = friend_connections.clone();-        let friend_future = async {-            while let Some((pk, _)) = friend_request_sink_rx.next().await {-                friend_connection_c.add_friend(pk);-            }-            Ok(())-        };--        let lossy_future = async {-            while lossy_rx.next().await.is_some() {-                // ignore-            }-            Ok(())-        };--        // Add TCP relays-        let tcp_connections_c = tcp_connections.clone();-        let mut relays_futures: Vec<_> = TCP_RELAYS.iter()-            .map(|&(pk, saddr)| {-                // get PK bytes of the relay-                let relay_pk_bytes: [u8; 32] = FromHex::from_hex(pk).unwrap();-                // create PK from bytes-                let relay_pk = PublicKey::from_slice(&relay_pk_bytes).unwrap();--                tcp_connections_c.add_relay_global(saddr.parse().unwrap(), relay_pk)-            })-            .map(|future| future.map_err(Error::from).boxed())-            .collect();--        let mut futures = vec![-            dht_server.run_socket(socket, rx, stats).map_err(Error::from).boxed(),-            lan_discovery_sender.run().map_err(Error::from).boxed(),-            tcp_connections.run().map_err(Error::from).boxed(),-            onion_client.run().map_err(Error::from).boxed(),-            net_crypto.run().map_err(Error::from).boxed(),-            friend_connections.run().map_err(Error::from).boxed(),-            net_crypto_tcp_future.boxed(),-            tcp_incoming_future.boxed(),-            lossless_future.boxed(),-            lossy_future.boxed(),-            friend_future.boxed(),-        ];--        futures.append(&mut relays_futures);--        future::try_join_all(futures)-            .map_err(|e| error!("Processing ended with error: {:?}", e))-            .await-            .unwrap();+    let lossy_future = async {+        while lossy_rx.next().await.is_some() {+            // ignore+        }+        Result::<(), Error>::Ok(())     }; -    let mut runtime = tokio::runtime::Runtime::new()?;-    runtime.block_on(future);+    // Add TCP relays+    for &(pk, saddr) in TCP_RELAYS.iter() {+        // get PK bytes of the relay+        let relay_pk_bytes: [u8; 32] = FromHex::from_hex(pk).unwrap();+        // create PK from bytes+        let relay_pk = PublicKey::from_slice(&relay_pk_bytes).unwrap();++        tcp_connections.add_relay_global(saddr.parse().unwrap(), relay_pk).await.map_err(Error::from)?;+    }++    futures::select!(+        res = dht_server.run_socket(socket, rx, stats).fuse() => res.map_err(Error::from)?,+        res = lan_discovery_sender.run().fuse() => res.map_err(Error::from)?,+        res = tcp_connections.run().fuse() => res.map_err(Error::from)?,+        res = onion_client.run().fuse() => res.map_err(Error::from)?,+        res = net_crypto.run().fuse() => res.map_err(Error::from)?,+        res = friend_connections.run().fuse() => res.map_err(Error::from)?,+        res = net_crypto_tcp_future.fuse() => res?,+        // res = tcp_incoming_future => res?,

In the current PR or in another?

0623forbidden

comment created time in 21 days

PullRequestReviewEvent

Pull request review commenttox-rs/tox

WIP: perf: Replace blocking Mutex

 fn main() -> Result<(), Box<dyn std::error::Error>> {     // let local_addr: SocketAddr = "[::]:33445".parse().unwrap(); // [::] for IPv6     info!("Running echo server on {}", local_addr); -    let future = async {-        let socket = common::bind_socket(local_addr).await;-        let stats = Stats::new();--        let lan_discovery_sender = LanDiscoverySender::new(tx.clone(), dht_pk, local_addr.is_ipv6());--        let (tcp_incoming_tx, mut tcp_incoming_rx) = mpsc::unbounded();--        let mut dht_server = Server::new(tx.clone(), dht_pk, dht_sk.clone());-        dht_server.enable_lan_discovery(true);-        dht_server.enable_ipv6_mode(local_addr.is_ipv6());--        let tcp_connections = Connections::new(dht_pk, dht_sk.clone(), tcp_incoming_tx);-        let onion_client = OnionClient::new(dht_server.clone(), tcp_connections.clone(), real_sk.clone(), real_pk);--        let (lossless_tx, mut lossless_rx) = mpsc::unbounded();-        let (lossy_tx, mut lossy_rx) = mpsc::unbounded();--        let (friend_request_tx, mut friend_request_sink_rx) = mpsc::unbounded();-        onion_client.set_friend_request_sink(friend_request_tx);--        let net_crypto = NetCrypto::new(NetCryptoNewArgs {-            udp_tx: tx,-            lossless_tx,-            lossy_tx,-            dht_pk,-            dht_sk,-            real_pk,-            real_sk: real_sk.clone(),-            precomputed_keys: dht_server.get_precomputed_keys(),-        });--        let (net_crypto_tcp_tx, mut net_crypto_tcp_rx) = mpsc::channel(32);-        net_crypto.set_tcp_sink(net_crypto_tcp_tx);--        dht_server.set_net_crypto(net_crypto.clone());-        dht_server.set_onion_client(onion_client.clone());--        let friend_connections = FriendConnections::new(-            real_sk,-            real_pk,-            dht_server.clone(),-            tcp_connections.clone(),-            onion_client.clone(),-            net_crypto.clone(),-        );--        // Bootstrap from nodes-        for &(pk, saddr) in &common::BOOTSTRAP_NODES {-            // get PK bytes of the bootstrap node-            let bootstrap_pk_bytes: [u8; 32] = FromHex::from_hex(pk).unwrap();-            // create PK from bytes-            let bootstrap_pk = PublicKey::from_slice(&bootstrap_pk_bytes).unwrap();+    let socket = common::bind_socket(local_addr).await;+    let stats = Stats::new();++    let lan_discovery_sender = LanDiscoverySender::new(tx.clone(), dht_pk, local_addr.is_ipv6());++    let (tcp_incoming_tx, mut tcp_incoming_rx) = mpsc::unbounded();++    let mut dht_server = Server::new(tx.clone(), dht_pk, dht_sk.clone());+    dht_server.enable_lan_discovery(true);+    dht_server.enable_ipv6_mode(local_addr.is_ipv6());++    let tcp_connections = Connections::new(dht_pk, dht_sk.clone(), tcp_incoming_tx);+    let onion_client = OnionClient::new(dht_server.clone(), tcp_connections.clone(), real_sk.clone(), real_pk);++    let (lossless_tx, mut lossless_rx) = mpsc::unbounded();+    let (lossy_tx, mut lossy_rx) = mpsc::unbounded();++    let (friend_request_tx, mut friend_request_sink_rx) = mpsc::unbounded();+    onion_client.set_friend_request_sink(friend_request_tx);++    let net_crypto = NetCrypto::new(NetCryptoNewArgs {+        udp_tx: tx,+        lossless_tx,+        lossy_tx,+        dht_pk,+        dht_sk,+        real_pk,+        real_sk: real_sk.clone(),+        precomputed_keys: dht_server.get_precomputed_keys(),+    });++    let (net_crypto_tcp_tx, mut net_crypto_tcp_rx) = mpsc::channel(32);+    net_crypto.set_tcp_sink(net_crypto_tcp_tx);++    dht_server.set_net_crypto(net_crypto.clone());+    dht_server.set_onion_client(onion_client.clone());++    let friend_connections = FriendConnections::new(+        real_sk,+        real_pk,+        dht_server.clone(),+        tcp_connections.clone(),+        onion_client.clone(),+        net_crypto.clone(),+    );++    // Bootstrap from nodes+    for &(pk, saddr) in &common::BOOTSTRAP_NODES {+        // get PK bytes of the bootstrap node+        let bootstrap_pk_bytes: [u8; 32] = FromHex::from_hex(pk).unwrap();+        // create PK from bytes+        let bootstrap_pk = PublicKey::from_slice(&bootstrap_pk_bytes).unwrap();++        let node = PackedNode::new(saddr.parse().unwrap(), &bootstrap_pk);++        dht_server.add_initial_bootstrap(node);+        onion_client.add_path_node(node);+    }++    let tcp_connections_c = tcp_connections.clone();+    let net_crypto_tcp_future = async move {+        while let Some((packet, pk)) = net_crypto_tcp_rx.next().await {+            tcp_connections_c.send_data(pk, packet).await?;+        }+        Result::<(), Error>::Ok(())+    }; -            let node = PackedNode::new(saddr.parse().unwrap(), &bootstrap_pk);+    // let onion_client_c = onion_client.clone();+    // let net_crypto_c = net_crypto.clone();+    // let tcp_incoming_future = async {+    //     while let Some((_relay_pk, packet)) = tcp_incoming_rx.next().await { // TODO: do we need relay_pk at all?+    //         match packet {+    //             IncomingPacket::Data(sender_pk, packet) => match packet {+    //                 DataPayload::CookieRequest(packet) => net_crypto_c.handle_tcp_cookie_request(&packet, sender_pk).map_err(Error::from).await,+    //                 DataPayload::CookieResponse(packet) => net_crypto_c.handle_tcp_cookie_response(&packet, sender_pk).map_err(Error::from).await,+    //                 DataPayload::CryptoHandshake(packet) => net_crypto_c.handle_tcp_crypto_handshake(&packet, sender_pk).map_err(Error::from).await,+    //                 DataPayload::CryptoData(packet) => net_crypto_c.handle_tcp_crypto_data(&packet, sender_pk).map_err(Error::from).await,+    //             },+    //             IncomingPacket::Oob(_sender_pk, _packet) => Ok(()),+    //             IncomingPacket::Onion(packet) => match packet {+    //                 InnerOnionResponse::OnionAnnounceResponse(packet) => onion_client_c.handle_announce_response(&packet, true).map_err(Error::from).await,+    //                 InnerOnionResponse::OnionDataResponse(packet) => onion_client_c.handle_data_response(&packet).map_err(Error::from).await,+    //             },+    //         }?;+    //     }+    //     Result::<(), Error>::Ok(())+    // };+    // let tcp_incoming_future = tcp_incoming_future.map_err(|err| {+    //     error!("Failed to handle packet: {:?}", err);+    //     err+    // });++    let net_crypto_c = net_crypto.clone();+    let friend_connections_c = friend_connections.clone();+    let lossless_future = async {+        while let Some((pk, packet)) = lossless_rx.next().await {+            let future = async {+                match packet[0] {+                    PACKET_ID_ALIVE => {+                        friend_connections_c.handle_ping(pk);+                        Ok(())+                    },+                    PACKET_ID_SHARE_RELAYS => {+                        match ShareRelays::from_bytes(&packet) {+                            Ok((_, share_relays)) =>+                                friend_connections_c.handle_share_relays(pk, share_relays)+                                .map_err(Error::from).await,+                            _ => Err(err_msg("Failed to parse ShareRelays"))+                        }+                    },+                    0x18 => { // PACKET_ID_ONLINE+                        net_crypto_c.send_lossless(pk, vec![0x18]).map_err(Error::from).await?;+                        net_crypto_c.send_lossless(pk, vec![0x32, 0x00]).map_err(Error::from).await?; // PACKET_ID_USERSTATUS+                        net_crypto_c.send_lossless(pk, b"\x30tox-rs".to_vec()).map_err(Error::from).await+                    },+                    0x40 => { // PACKET_ID_CHAT_MESSAGE+                        net_crypto_c.send_lossless(pk, packet).map_err(Error::from).await+                    },+                    _ => Ok(()),+                }+            };+            future.await?;+        }+        Result::<(), Error>::Ok(())+    }; -            dht_server.add_initial_bootstrap(node);-            onion_client.add_path_node(node);+    // handle incoming friend connections by just accepting all of them+    let friend_connection_c = friend_connections.clone();+    let friend_future = async {+        while let Some((pk, _)) = friend_request_sink_rx.next().await {+            friend_connection_c.add_friend(pk);         }+        Result::<(), Error>::Ok(())+    }; -        let tcp_connections_c = tcp_connections.clone();-        let net_crypto_tcp_future = async move {-            while let Some((packet, pk)) = net_crypto_tcp_rx.next().await {-                tcp_connections_c.send_data(pk, packet).await?;-            }-            Result::<(), Error>::Ok(())-        };--        let onion_client_c = onion_client.clone();-        let net_crypto_c = net_crypto.clone();-        let tcp_incoming_future = async {-            while let Some((_relay_pk, packet)) = tcp_incoming_rx.next().await { // TODO: do we need relay_pk at all?-                let future = async {-                    match packet {-                        IncomingPacket::Data(sender_pk, packet) => match packet {-                            DataPayload::CookieRequest(packet) => net_crypto_c.handle_tcp_cookie_request(packet, sender_pk).map_err(Error::from).await,-                            DataPayload::CookieResponse(packet) => net_crypto_c.handle_tcp_cookie_response(packet, sender_pk).map_err(Error::from).await,-                            DataPayload::CryptoHandshake(packet) => net_crypto_c.handle_tcp_crypto_handshake(&packet, sender_pk).map_err(Error::from).await,-                            DataPayload::CryptoData(packet) => net_crypto_c.handle_tcp_crypto_data(&packet, sender_pk).map_err(Error::from).await,-                        },-                        IncomingPacket::Oob(_sender_pk, _packet) => Ok(()),-                        IncomingPacket::Onion(packet) => match packet {-                            InnerOnionResponse::OnionAnnounceResponse(packet) => onion_client_c.handle_announce_response(&packet, true).map_err(Error::from).await,-                            InnerOnionResponse::OnionDataResponse(packet) => onion_client_c.handle_data_response(&packet).map_err(Error::from).await,-                        },-                    }-                };-                future.await?;-            }-            Ok(())-        };-        let tcp_incoming_future = tcp_incoming_future.map_err(|err| {-            error!("Failed to handle packet: {:?}", err);-            err-        });--        let net_crypto_c = net_crypto.clone();-        let friend_connections_c = friend_connections.clone();-        let lossless_future = async {-            while let Some((pk, packet)) = lossless_rx.next().await {-                let future = async {-                    match packet[0] {-                        PACKET_ID_ALIVE => {-                            friend_connections_c.handle_ping(pk);-                            Ok(())-                        },-                        PACKET_ID_SHARE_RELAYS => {-                            match ShareRelays::from_bytes(&packet) {-                                Ok((_, share_relays)) =>-                                    friend_connections_c.handle_share_relays(pk, share_relays)-                                        .map_err(Error::from).await,-                                _ => Err(err_msg("Failed to parse ShareRelays"))-                            }-                        },-                        0x18 => { // PACKET_ID_ONLINE-                            net_crypto_c.send_lossless(pk, vec![0x18]).map_err(Error::from).await?;-                            net_crypto_c.send_lossless(pk, vec![0x32, 0x00]).map_err(Error::from).await?; // PACKET_ID_USERSTATUS-                            net_crypto_c.send_lossless(pk, b"\x30tox-rs".to_vec()).map_err(Error::from).await-                        },-                        0x40 => { // PACKET_ID_CHAT_MESSAGE-                            net_crypto_c.send_lossless(pk, packet).map_err(Error::from).await-                        },-                        _ => Ok(()),-                    }-                };-                future.await?;-            }-            Ok(())-        };--        // handle incoming friend connections by just accepting all of them-        let friend_connection_c = friend_connections.clone();-        let friend_future = async {-            while let Some((pk, _)) = friend_request_sink_rx.next().await {-                friend_connection_c.add_friend(pk);-            }-            Ok(())-        };--        let lossy_future = async {-            while lossy_rx.next().await.is_some() {-                // ignore-            }-            Ok(())-        };--        // Add TCP relays-        let tcp_connections_c = tcp_connections.clone();-        let mut relays_futures: Vec<_> = TCP_RELAYS.iter()-            .map(|&(pk, saddr)| {-                // get PK bytes of the relay-                let relay_pk_bytes: [u8; 32] = FromHex::from_hex(pk).unwrap();-                // create PK from bytes-                let relay_pk = PublicKey::from_slice(&relay_pk_bytes).unwrap();--                tcp_connections_c.add_relay_global(saddr.parse().unwrap(), relay_pk)-            })-            .map(|future| future.map_err(Error::from).boxed())-            .collect();--        let mut futures = vec![-            dht_server.run_socket(socket, rx, stats).map_err(Error::from).boxed(),-            lan_discovery_sender.run().map_err(Error::from).boxed(),-            tcp_connections.run().map_err(Error::from).boxed(),-            onion_client.run().map_err(Error::from).boxed(),-            net_crypto.run().map_err(Error::from).boxed(),-            friend_connections.run().map_err(Error::from).boxed(),-            net_crypto_tcp_future.boxed(),-            tcp_incoming_future.boxed(),-            lossless_future.boxed(),-            lossy_future.boxed(),-            friend_future.boxed(),-        ];--        futures.append(&mut relays_futures);--        future::try_join_all(futures)-            .map_err(|e| error!("Processing ended with error: {:?}", e))-            .await-            .unwrap();+    let lossy_future = async {+        while lossy_rx.next().await.is_some() {+            // ignore+        }+        Result::<(), Error>::Ok(())     }; -    let mut runtime = tokio::runtime::Runtime::new()?;-    runtime.block_on(future);+    // Add TCP relays+    for &(pk, saddr) in TCP_RELAYS.iter() {+        // get PK bytes of the relay+        let relay_pk_bytes: [u8; 32] = FromHex::from_hex(pk).unwrap();+        // create PK from bytes+        let relay_pk = PublicKey::from_slice(&relay_pk_bytes).unwrap();++        tcp_connections.add_relay_global(saddr.parse().unwrap(), relay_pk).await.map_err(Error::from)?;+    }++    futures::select!(+        res = dht_server.run_socket(socket, rx, stats).fuse() => res.map_err(Error::from)?,+        res = lan_discovery_sender.run().fuse() => res.map_err(Error::from)?,+        res = tcp_connections.run().fuse() => res.map_err(Error::from)?,+        res = onion_client.run().fuse() => res.map_err(Error::from)?,+        res = net_crypto.run().fuse() => res.map_err(Error::from)?,+        res = friend_connections.run().fuse() => res.map_err(Error::from)?,+        res = net_crypto_tcp_future.fuse() => res?,+        // res = tcp_incoming_future => res?,

How so?

0623forbidden

comment created time in 21 days

PullRequestReviewEvent

Pull request review commenttox-rs/tox

WIP: perf: Replace blocking Mutex

 impl ServerExt for Server {         socket: UdpSocket,         mut rx: Receiver<(Packet, SocketAddr)>,         stats: Stats-    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>> {+    ) -> Pin<Box<dyn Future<Output = Result<(), Error>>>> {

Can it be async fn?

0623forbidden

comment created time in 21 days

PullRequestReviewEvent

pull request commenttox-rs/tox

WIP: perf: Replace blocking Mutex

@kurnevsky you can push right into 0623forbidden:433_replace_blocking_mutex. Or do you prefer @0623forbidden to merge your changes into their PR?

0623forbidden

comment created time in 21 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 00fc9d9a3836b255e18a699f678eea19e61e433f

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 22 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 6af487161c26740f9ce1f0666f5b77494f845e88

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 23 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha d1a5a5b8878d650ad34ba2f6f00250ce1a3b0afa

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 24 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 9bf316f7df703e136ef60a90eda7dcd31b7e72aa

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 25 days

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha a10dc47d85ad8077f6d25e653e428125aa710c05

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in a month

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 39f1b37a809ca23ee03dbee6cac978a3f1ba7cc2

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in a month

starteddomclick/tuchanka

started time in a month

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha f94565ad2ea4166c76150322f3bb4f630005d636

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in a month

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha b31f2f0295dcf2b40141beef280b87a509a204dd

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in a month

startedDiggsey/spanr

started time in a month

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 4394b215ca79cbc87ce3bf6e4bd9e152a2dc2603

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in a month

starteduutils/coreutils

started time in a month

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 8abaa142de48b0967ee2ef9991686dde7f402c1b

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in a month

pull request commenttox-rs/tox

perf: Replace blocking Mutex

Look there are lots of places we can groom our code like with 'return move async {}vs async fn. Do you want to do it or shall we?

0623forbidden

comment created time in a month

Pull request review commenttox-rs/tox

perf: Replace blocking Mutex

 impl Server {         let payload = PingRequestPayload {             id: request_queue.new_ping_id(node.pk),         };-        let ping_req = Packet::PingRequest(PingRequest::new(-            &self.precomputed_keys.get(node.pk),-            &self.pk,-            &payload-        ));-        self.send_to(node.saddr, ping_req)+        let server = self.clone();+        let node = *node;+        async move {

this one can be async fn too

0623forbidden

comment created time in a month

PullRequestReviewEvent

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha bc4774feebcad10c0fb535be75e04244e5864824

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in a month

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha f37cc722bf2c425f5013377825597a79d9d567d3

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in a month

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 27262ff683482ff47d30416abda0657bb14e6f16

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in a month

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha a9f1ed0967a850e6e8ebd5419c9c4d7bf91ed79b

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in a month

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha dce025248e948519cca6e1b6e337745d1bf7cd6f

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in a month

pull request commentsuhr/sana

Format code using 'cargo fmt'

@Atul9 thank you for your PR

Atul9

comment created time in a month

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha bd8cfa9515dde9a50e8d973696b6a33c384f8361

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in a month

startedfancy-regex/fancy-regex

started time in a month

issue openedrust-lang/rust

Add an option to exclude source code from docs

<!-- Thanks for filing a 🙋 feature request 😄! -->

Describe the problem you are trying to solve <!-- A clear and concise description of the problem this feature request is trying to solve. -->

I ship a proprietary cdylib which I build from Rust code. I want to document the API using doc comments. However at the moment cargo doc puts the source code into target/doc/src/ which is not an option. I know I can rm target/doc/src/ however there is [src](goto source code) button left in the top right corner of the docs.

Describe the solution you'd like <!-- A clear and concise description of what you want to happen. -->

cargo doc --exclude-source

Notes <!-- Any additional context or information you feel may be relevant to the issue. -->

created time in a month

issue openedrust-lang/cargo

Add an option to exclude source code from docs

<!-- Thanks for filing a 🙋 feature request 😄! -->

Describe the problem you are trying to solve <!-- A clear and concise description of the problem this feature request is trying to solve. -->

I ship a proprietary cdylib which I build from Rust code. I want to document the API using doc comments. However at the moment cargo doc puts the source code into target/doc/src/ which is not an option. I know I can rm target/doc/src/ however there is [src](goto source code) button left in the top right corner of the docs.

Describe the solution you'd like <!-- A clear and concise description of what you want to happen. -->

cargo doc --exclude-source

Notes <!-- Any additional context or information you feel may be relevant to the issue. -->

created time in a month

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 1cae75e1b43ca19886c8ebe12ccc0f29e3694079

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in a month

create barnchkpp/sana

branch : tests

created branch time in a month

issue commenttox-rs/tox

Replace blocking Mutex with future Mutex

Yes

kpp

comment created time in 2 months

startedbevyengine/bevy

started time in 2 months

delete branch kpp/sana

delete branch : more_tests

delete time in 2 months

PR opened suhr/sana

Add more tests

Add test for Logos issue https://github.com/maciejhirsz/logos/issues/166.

+25 -0

0 comment

1 changed file

pr created time in 2 months

create barnchkpp/sana

branch : more_tests

created branch time in 2 months

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha d3dccce854d14edde7359d9508ba526c60ee35b3

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 2 months

delete branch kpp/sana

delete branch : repo_url

delete time in 2 months

PR closed suhr/sana

Add repo url to Cargo.tomls
+3 -0

0 comment

3 changed files

kpp

pr closed time in 2 months

create barnchkpp/sana

branch : repo_url

created branch time in 2 months

PR opened suhr/sana

Add repo url to Cargo.tomls
+3 -0

0 comment

3 changed files

pr created time in 2 months

Pull request review commentRustCrypto/hashes

Update streebog documentation

 pub use digest::{self, Digest}; #[cfg(feature = "std")] use digest::Update; -/// Streebog256+/// Streebog-256 cryptographic hash function pub type Streebog256 = streebog::Streebog<U32>; -/// Streebog512+/// Streebog-256 cryptographic hash function

Streebog-512?

newpavlov

comment created time in 2 months

delete branch kpp/sana

delete branch : more_tests

delete time in 2 months

delete branch kpp/sana

delete branch : optional_dot

delete time in 2 months

Pull request review commentsuhr/sana

Prepare to release

 fn build_spec(source: ItemEnum) -> SanaSpec { /// /// # Attributes ///-/// - `#[error]`: Marks the given variant as the error variant. There must be+/// - `#[backend(be)]`: set the lexer backend. Valid values are `rust` and `vm`.+/// This attribute must be placed after before the enum definiton.

After or before?

suhr

comment created time in 2 months

PR opened suhr/sana

Add dot feature
+8 -1

0 comment

2 changed files

pr created time in 2 months

create barnchkpp/sana

branch : optional_dot

created branch time in 2 months

push eventkpp/sana

Roman Proskuryakov

commit sha 7b0ee1f27e120e76ab15a938b08a2dc499868686

Add tests for extended regex

view details

Roman Proskuryakov

commit sha b18078fa363374eca8ee4798b4986cb2da6c5582

Fix unreachable warning for a loop ending with halt stmt

view details

push time in 2 months

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha dafaa76bd2d5aad4a53a0e3aa2b499bd269504c8

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 2 months

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 2093551d3b74821345a67fcbf8eaf83b41044cd6

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 2 months

Pull request review commentRustCrypto/AEADs

Add Multilinear Galois Mode

+//! Generic implementation of [Multilinear Galous Mode][1] [AEAD] construction.+//!+//! # Example+//! ```+//! # #[cfg(feature = "alloc")]+//! # {+//! use mgm::Mgm;+//! use kuznyechik::Kuznyechik;+//! use mgm::aead::{Aead, NewAead, generic_array::GenericArray};+//!+//! let key = GenericArray::from_slice(b"an example very very secret key.");+//! let cipher = Mgm::<Kuznyechik>::new(key);;

double ;; at the end of the list

newpavlov

comment created time in 2 months

push eventtox-rs/book

Deployment Bot (from Travis CI)

commit sha 03aa34fb920d03a39c28638435f7fdc02e3b0489

Deploy tox-rs/book to github.com/tox-rs/book.git:gh-pages

view details

push time in 2 months

more