I'm new to Rust and have created REST API in Rust using Warp. I created a dummy grocery list API by following the tutorial from LogRocket Blog which u ...
I'm new to Rust and have created REST API in Rust using Warp. I created a dummy grocery list API by following the tutorial from LogRocket Blog which u ...
I'm trying to build some libraries using the wasm32-unknown-unknown and I get I can build using the wasm32-unknown-emscripten but it is not support ...
I don't understand how rotation works in Bevy. I just want to rotate a sprite to follow my cursor position. What is the piece of code to make it work ...
I'm trying to compile my game engine for WebAssembly with Emscripten. The engine is powered by Rust and SDL2. The config.toml file says: [target.was ...
I think I'm missing something very basic. My expectation is that when tick.tick() completes and starts the sleep loop, tokio::time::sleep(...).await s ...
In this example I'm trying to pass a BufWriter to some functions but don't understand generic type syntax enough to figure out whats missing. Instead ...
I am working with a struct that looks more or less like this: Now, I would like to have MyStruct implement serde's Serialize and Deserialize. Intui ...
In this code: Why is a valid and b not valid ("temporary value dropped while borrowed [E0716]")? It would make sense to me if they were both probl ...
I'm using gtk-rs to take the value of an input and use it to execute a command with xdotool: I'm getting this compiling error: So I tried this: ...
I have a problem accessing my warp api from react, even though I have my vite proxy set up like so: The warp api is set to allow any origins: If ...
I want to build a no_std static library with rust. I got the following: lib.rs: Despite setting the panic behaviour for both dev and release to ...
Here's my src/main.rs file: use chrono_tz::Tz; use chrono::FixedOffset; use chrono::{NaiveDateTime, TimeZone, NaiveDate}; fn my_func(from_tz: Tz, n ...
My code is: The error it gives me is ...
I'm trying to work with fixed-size arrays. I want to transform an array of Option values [Option<T>; N] to an Option<[T ; N]> such that I ...
I have an enum that holds variants which contain certain types. I want to write a get method that automatically returns the right type if the enum var ...
As a learning exercise I'm trying to implement a parameterised decorator function in pyo3 using closures. The pyo3 documentation contains an example o ...
I use rust to open a file and parse its contents. I then iterate over each line: at this point item is of type &str. I now need only a slice ...
I have a local playground setup with a bunch of experiment files (each with a main()), where my Cargo.toml looks like this: [package] name = "playgro ...
There are some way to get any file or directory ico use rust in windows? I can't find any solution in google and stackoverflow. ...
let datetime = frame.column("datetime_nano")?.cast(&DataType::Datetime(TimeUnit::Nanoseconds, None))?; let date = datetime.cast(&DataType::Dat ...