Recently when I was learning Type Layout in Rust, I saw that struct in Rust supports the #[repr(C)] directive, so I want to to see the difference between the de
I am trying to build a basic application for the Adafruit CLUE using Rust. When using the peripheral access crate (PAC) everything works fine, but I would like
A library I'm working on stores various data structures in a graph-like manner. I'd like to let users store metadata ("annotations") in nodes, so they can retri
How do I set a Cargo project to build & run using nightly by default (i.e. cargo build is actually cargo +nightly build) without setting nightly as the glob
I am trying flatten a bezier path (remove all intersections and replace with end points) as part of the implementation of the rendering algori
Right now I'm doing this tutorial for WebAssembly with Rust. The task is to implement Conways Game of Life in Rust. Writing a low-level language like Rust is ne
Code like this: pub fn sample_from_categorical_logits(prob_logits: Tensor) -> (Tensor, Tensor) { let prob_obj = match prob_logits.size().len() {
rustc is not outputting anything to terminal when using println!. Code: fn main() { println!("Hello, world!"); } Running it: me@mclaptop:~ > rustc he
I'm trying to update my document, if I don't pass a field it is being deleted. my document is { "_id":"27fc47a4-0730-446c-8acd-41aa6e227406", "user_id":"a
I have a "sys" crate that links statically to a library: Cargo.toml: [package] links = "foo-1.0" build.rs: fn main() { println!("cargo:rustc-link-lib=d
This is a pretty specific question related to the Rocket crate. I'm not sure if this is an issue with the crate or if I'm just doing something plain wrong. I'm
Consider this Config struct which contains a vector of Host structs: use serde::Deserialize; use std::net::IpAddr; #[derive(Debug, Deserialize)] struct Config
I'm trying to get the max number of digits in an i32 array. I'm using log10(n) + 1 as my formula to calculate how many digits an i32 has and I thought I would j
Looking at implementation of Deref trait for Box: impl<T: ?Sized, A: Allocator> const Deref for Box<T, A> { type Target = T;
I'm using the Actix framework to create a simple server and I've implemented a file upload using a simple HTML frontend. use actix_web::web::Data; use actix_we
I'm trying to follow the Rust WebAssembly book and I'm stuck at the exercise in section 4.2. I changed everything as described in the answer, but the given &
I have installed Rust on windows from Rust installation page. After installation I tried running the "hello world" program but got the following error. >car
How can I do this: auto fn1 = bind(func, _1, 2, 3); (C++ function binding with placeholders) in Rust (possibly without an intermediate closure)?
When error occurs in Rust, most Rust standard and 3rd party libraries (e.g. anyhow) would simply print the error message to stdout/stderr. What I need is to ove
My algorithm needs to iteratively shrink a set by removing an element, and do something with the element removed and with the shrinking set in each iteration. A