Questions tagged [rust-cargo]
Cargo is the official package manager for the Rust programming language.
rust-cargo
2,366
questions
0
votes
0
answers
32
views
Unable to connect to newrelic using Opentelemetry
I am trying to send tracing data to newrelic using opentelemetry-otlp via http
Below is code snippet that I am using
fn main() -> {
let result = init_tracer_provider();
globa::...
0
votes
0
answers
31
views
How to set up warp::serve to use tls in Rust
Warp Crate issue.
So I'm having some issues setting up my server using warp. How do we set up the server using warp to be tls? Am I doing it right?
warp::serve(routes)
.tls()
.cert_path(...
0
votes
1
answer
34
views
Warp crate error. Trying to configure server in Rust for HTTPS, but "Identity PEM is missing"
So I'm applying my certificates to my server, but a runtime error is occurring:
thread 'tokio-runtime-worker' panicked at /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/warp-0.3.7/...
-2
votes
1
answer
48
views
Why is 'cargo flamegraph' running about 45x faster than cargo run (after cargo build --release)?
Until this morning, 'cargo flamegraph' was a bit slower than 'cargo run' after 'cargo build --release'.
I made a small change, swapping out:
std::collections::{HashMap, HashSet};
with:
rustc_hash::{...
0
votes
0
answers
26
views
Problem using with_metadata from TonicExporterBuilder [duplicate]
I am using this to build tracer_provider using below code snippet, but it gives me an error while using with_metadata(map). The error says that
found tonic::metadata::MetadataMap but expects tonic::...
0
votes
1
answer
45
views
cargo lambda build--arm64 not working on al2023
I'm trying to build Rust for Lambda runtime with Amazon Linux 2023(al2023), so everything is running on Docker as below
# Use cargo-lambda as the build environment
FROM ghcr.io/cargo-lambda/cargo-...
1
vote
0
answers
31
views
Difference between panic = "abort" in Cargo.toml profile and "panic-strategy": "abort" in Rust target spec file
I'm working on a small embedded Rust project based on the https://github.com/Rahix/avr-hal-template.git for AVR cpus.
I want to add some unit tests, so I removed the test = false line from the Cargo....
0
votes
1
answer
50
views
How can I add a "std=c99" flag to cc when compiling using cargo?
I'm trying to install ripgrep (link to repo) with the pcre2 feature from source.
To do so I run the command cargo build --release --feature 'pcre2' to build the exec.
When doing so, cargo tries to ...
0
votes
1
answer
34
views
Pass environment variables to tests but not the cargo binary
For example, I want to run the test with MALLOC_CONF="prof:true,prof_active:false", so I could just do
LD_PRELOAD=jemalloc-5.2.1/lib/libjemalloc.so.2 MALLOC_CONF="prof:true,prof_active:...
-1
votes
1
answer
67
views
cargo build causes linking with cc failed because (maybe) openssl and reqwest
new to rust, I am trying to build a dummy reverse proxy with tokio and axum, you can find it here. While putting things together, I stumble in this error:
error: linking with `cc` failed: exit status: ...
0
votes
0
answers
39
views
Unable to run project on regular terminal after running it an a devcontainer
I have created a new rust hello world project. From vscode, I load the project and 'open in remote container'. After I do this step, the project works on the remote container, but no longer works on ...
-1
votes
0
answers
29
views
How come the Rust Compiler says Glutin doesn't have glutin::window::WindowBuilder
I tried using use glutin::window::WindowBuilder and extern crate glutin and the compiler still says that Glutin doesn't have glutin::window::WindowBuilder.
After installing the latest version (with ...
1
vote
1
answer
70
views
Why does using `extern` allow for runtime linking?
I have this code snippet:
extern crate blas;
extern crate openblas_src;
pub fn eigen_decompose_symmetric_tri_diagonal(
main_diag: &Vec<f64>,
sub_diag: &Vec<...
2
votes
0
answers
23
views
Cross Compilation with custom Linker fails
I have to build my Rust program within a container, where I have all the build-essentials for i586 available (my target architecture is also i586).
For that reason, I have added the i586 target
rustup ...
1
vote
1
answer
54
views
Compiling Raylib-Rust game to WASM
I've successfully compiled my game to WASM with the flags:
EMCC_CFLAGS="-sUSE_GLFW=3 -sGL_ENABLE_GET_PROC_ADDRESS -sASYNCIFY -sASSERTIONS --preload-file src/resources" cargo build --release -...