Category "rust-cargo"

Why doesn't the rust create openssl-sys compile?

error: failed to run custom build command for `openssl-sys v0.9.72` Caused by: process didn't exit successfully: `C:\Users\REBERE~1\AppData\Local\Temp\cargo-

Why is rust-analyzer not finding dependencies in workspace member?

I have a cargo workspace with one library "./raytracing" and one binary "./cli". The two workspace members have different dependencies. ./raytracing/Cargo.toml:

note: /usr/bin/ld: cannot find -lpq Rust

il" "-ldl" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil" = note: /usr/bin/ld: cannot find -lpq colle

Building rust with LLVM Fork

Following the instructions here, I have tried building rust with a fork of LLVM which has a back-end for a new target. I have: Recursively cloned the Rust repos

Rust build error: unknown `--json` option `future-incompat`

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

Set a project to use nightly by default

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

How to build the docs.rs documentation of an FFI crate when the native library is not present?

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

How to fix Rust diesel cli link libpq.lib error on install

I'm trying (for hours now) to install the cargo crate diesel_cli for postgres. However, every time I run the recommended cargo command: cargo install diesel_cli

Anchor build error versions of anchor-spl and anchor-lang

I'm using the following repository of rust: https://github.com/SmartCodeBlockchainDev/Nelson-NFT-stacking when I try to do an anchor build I get the following e

How to use the mold linker with cargo?

I'm using lld as my linker currently for Rust, but recently encountered the mold project, which is faster than lld. I'd like to try it for Rust compilation, but

How to setup default rust compilation target on CI using rustup command on github actions?

I need to compile my code for both 32 and 64 bit windows. As far as I understand, I basically need to configure my CI so that this command: rustup default print

error: component 'clippy' for target {target} is unavailable for download

When using a custom rust-toolchain file with a pinned version 1.59.0 and running cargo clippy in 1.59.0, I get error: the 'cargo-clippy' binary, normally provi

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 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