Community stream
Community
Help needed about tokio-rustls usage
Hi fellow rust users! I want to use the tokio-rustls crate for encrypting traffic between client and sever for my chat-server client project 8080_msg. However I can't figure out how you go from a regular async TcpStream, to a tls connection. Could…
Which rule does it regulate that `dyn Trait + AutoTrait` can be coerced to `dyn Trait`?
Consider this example: use std::error::Error; fn invoke()->Box<dyn Error + Send + Sync>{ todo!() } fn main(){ let b:Box<dyn Error> = invoke(); } I tried to find the relevant rules in Type coercions - The Rust Reference The rules I think it might be…
Looking for examples of new protocol families?
Hi - I am looking to port an LKM over to Rust and it's been difficult getting started. What the LKM does is create a new address families at the application and transport layer. What I'm looking for are examples to help me move along with the same…
How to add binary I/O to boa engine?
I'm trying to add proper binary I/O capabilities to the boa engine (GitHub - boa-dev/boa: Boa is an embeddable Javascript engine written in Rust. · GitHub). This is what I have so far use boa_engine::{Context, Source, JsResult, JsValue, JsObject,…
PLT symbols with `cxx-build`
Hey folks, sorry if this is the wrong place to post this, but I can't really distinguish whether this problem is related to cxx, rustc, rust-lld, or gcc, static linking or something else entirely. I'm working on a project where I'm writing a plugin…
How to super-impose images?
The frame-buffer coordinates are larger than the image1 and image2. So they need to be wrapped around. I was instructed to cast my coordinate to a signed integer and use rem_euclid for this, but I am not sure how to continue. Like adding the pixels…
Best Way to Process a Large CSV Time-Series Dataset in Rust?
I’ve been experimenting with Rust for processing larger time-series datasets and I’m trying to figure out the most sensible approach once the files stop being small. The data itself is pretty simple: timestamp,symbol,price,volume…
Why doesn't the debugger stop on loop `break`?
I am debugging some Rust code, and inside an if condition, there was only a single line: break, which exits the loop. I couldn't confirm whether the condition was true because the debugger didn't step onto the break line. if e.kind() ==…
Features for sqlx for Cargo.toml
Hello, I’m posting here because I still don’t fully understand how to use SQLX to connect to different relational databases. I’m currently building the backend for a blog and my database will be PostgreSQL, so when I add the settings to Cargo.toml,…
Library providing a self-describing, byte format which works with serde?
Hello, I am looking for a serde format which, unlike postcard is self-describing, and unlike bincode, works well with serde and lets you use serde attributes like flatten, etc. It also needs to be self-describing because its important for me to…
Trait labels in std docs
Recently I noticed this: rustdoc apparently adds Read and Write labels at the top for types that implement std::io::Read and std::io::Write. Have I just not noticed this before, or is a somewhat new behavior? Regardless, I like it. It wouldn't have…
Close fantoccini client when an assertion fails inside an integration test
Hello, I'm new to Rust and I'm experimenting with it to do a personal web project. I'm at the stage where I want to implement integration tests. For this I've decided to use the fantoccini crate to drive the browser from my rust test code. This…
Cannot return value referencing local variable in closure
Hello! I am writing my pet app and spent a lot of time trying to figure out why this error occurs. I am building a future stream of ip's, which should ping each ip in parrallel, so I guess i must use buffer_unordered on a stream of futures. But…
444 items available