Category "rust-cargo"

How to Use String instead of ObjectId in "wither" Rust?

I have this code here: pub struct Account { #[serde(rename = "_id", skip_serializing_if = "Option::is_none")] pub id: Option<ObjectId>, pub em

How do you run the main binary and then run tests based on it in Rust?

I have written a webserver which requires some complicated setup and teardown, and am trying to write unit tests. Axum does provide examples using the Tower One

How do I separate the execution of tests via cargo test?

I'm working on a Rust project that has many units test (almost 200). About 20 of those tests are really heavy and they create problems when executed with the ot

Use rust cargo to run tests in workspace root

I've got the following rust project layout: project_name ├── crate_1 │ ├── src │ │ ...

I cant install cargo afl due to conflict libc in build

i run this command for installing afl but got this error :slight_smile: cargo install --force afl --verbose Updating crates.io index Installing afl v0.12.2 Comp

How do I automatically run "cargo fix" on save in VSCode?

Currently, I use VSCode as my IDE when programming Rust. I use the rust-analyzer VSCode extension, since it seems to be the best one out there for Rust (as of 2

Why does vscode's "Run Doctest" helper filter all of my crate's Doctests?

Expected Behavior: Clicking "Run doctest" in vscode should execute one test from doctest snippets. Terminal output SHOULD say ("1 passed;" or "1 failed;"), and

Mozilla Synstorage-rs installation / make fails under RHEL8

I'm currently trying to install mozilla synstorage-RS on a RockyLinux machine, and step by step I could reduce the amount of errors, but now I got stuck. I foun

What does the asterisk / star (*) at the end of a cargo tree output represent?

What does the asterisk / star (*) at the end of a cargo tree output represent? How and where is it used?

Crate p12 rust - Error [E0599]: no method name `decrypt_padded_vec`found for struct `Decryptor` - in docker build

my docker builds started failing today and I can't seem to figure out exactly how to fix it. Compiling locally is still working. When I try to create a containe

Does Cargo support custom profiles?

I often want to compile in release mode with debug = true so that I can read the generated assembly a bit easier. I am currently doing this: [profile.release]

debugging multiple threads with visual studio code

I am setting some breakpoints in some async threaded code and I can't seem to figure out how to tell visual studio code to catch any threads in this code path.

How to get a release build with debugging information when using cargo?

The following command $ cargo build produces a non-optimized build with debugging information. On the contrary, $ cargo build --release produces an optimi

Is there a command to update Cargo to the latest official release?

I seem to have diverging versions of rustc and cargo (I think), $ rustc -V rustc 1.9.0 (e4e8b6668 2016-05-18) $ cargo -V cargo 0.10.0-nightly (10ddd7d 2016-04

Ambiguous name when using three_d and egui

recently I am using three_d this crate in my project, but when I use three_d and egui in the same script it causes an ambiguous name error use three_d::*; use e

rustup gives command not found error with zsh even after installing with brew

I installed rustup with brew command but still says that rustup command is not found. I am not sure if I am missing any installation step. Any help would be app

Rust compilation error " failed to run custom build command for `freetype-sys v0.13.1' " win 10

I am trying to build a Rust program on Windows 10 having a GUI. When trying to compile a Rust file with gtk dependency on Windows 10 I keep getting the followin

using iodbc in Rust

I'm trying to connect to FileMaker through a Rust application (don't ask me why...) - and I run into the wall of the FM ODBC driver being built against iodbc an

How do we install rustc, cargo for all the users in the same linux machine?

I have a ubuntu machine with multiple users some of whom have and have not root privileges. Above that I have a limited storage for the same machine. I really d

How do we install rustc, cargo for all the users in the same linux machine?

I have a ubuntu machine with multiple users some of whom have and have not root privileges. Above that I have a limited storage for the same machine. I really d