Due to how the LGPL works, compiling Rust code to an object file without linking would be useful to be able to do. However, I cannot find any documentation on h
I'm building a web API service with Rust and actix_web. I want to test a route and check if the received response body is what I expect. But I'm struggling with
I'm building a web API service with Rust and actix_web. I want to test a route and check if the received response body is what I expect. But I'm struggling with
I want to write test cases that depend on parameters. My test case should be executed for each parameter and I want to see whether it succeeds or fails for each
I am building my first app with Tauri framework. Basically, I would like to open as embedded "subviews" (as for "IFrame", just to be clear), inside the main pag
I'm trying to use a rustc crate in my program. #[macro_use] extern crate rustc; extern crate rustc_typeck; extern crate syntax; extern crate syntax_pos; use ru
I want to persist the contents of a struct created in one Rust file into a different Rust file. In this minimal reproduction, command line arguments are used to
Like the rust code below: the while loop compiles and runs fine, but for iter version does not compile, due to error: error[E0502]: cannot borrow `v` as mutabl
I am getting this error running an actix-web based server ERROR actix_http::h1::dispatcher] stream error: Request parse error: Invalid Header provided The hand
Code Playground (Stable Rust 1.45.0, 2018 edition) No external crates needed for example. type Error = Box<dyn std::error::Error>; type Result<R=()>
use anchor_lang::prelude::*; use rand::Rng; use solana_program::{declare_id, pubkey::Pubkey}; declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"); #[pr
I have let my_vec = (0..25).collect::<Vec<_>>() and I would like to split my_vec into iterators of groups of 10: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; [1
I need to find an index of an element in a vector of strings. This is what I got so far: fn main() { let test: Vec<String> = vec![ "one".to_s
Here is how I start my app and remove the window frame: let app = RustClicker::default(); let mut native_options = eframe::NativeOptions::default();
How do I include a file with the full path my_project/src/include_me.rs in main.rs? I've checked the dependencies guide, and all of them appea
I have the following menu item fn update(&mut self, ctx: &egui::Context, frame: &epi::Frame) { //let Self { label, value } = self; // Exam
I'm trying to programmatically listen to multiple signals and a ticking interval. To clear things up, here is the code I have currently: use std::time::Duration
To be able to use C library, I need to give a *mut c_char parameter to a function. But I don't find a way to have it from a str. I converted my str to a CStrin
I have this file hierarchy: main.rs protocol/ protocol/mod.rs protocol/struct.rs In struct.rs: pub struct Struct { members: i8 } impl Struct { pub
I just took the dive into Rust and want to make some basic math functions that are generic. I have the following is_prime function: fn is_prime(n: i64) -> b