Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [rust]

Rust is a systems programming language without a garbage collector focused on three goals: safety, speed, and concurrency. Use this tag for questions about code written in Rust. Use an edition specific tag for questions that refer to code which requires a particular edition, like [rust-2018]. Use more specific tags for subtopics like [rust-cargo] and [rust-macros].

rust
-1 votes
0 answers
9 views

Face cull implementation attempt in voxel engine. Some faces are not rendered

So basically I am making a voxel engine, that renders voxels wherever a voxel is solid in a chunk. As you can imagine, having 1.2m cubes in a mediocre sized world, my fps barely is above 20fps. I ...
Kingdawnage's user avatar
0 votes
0 answers
7 views

reinstalling rustlings to go from 6.0.1 to 6.1.0 and starting over again to complete without looking at solutions

I am having a problem reinstalling rustlings so I can complete it again without cheating. How do you reinstall rustlings so newbies like me can complete it again with the 6.1.0 version and not looking ...
David Queen's user avatar
0 votes
1 answer
19 views

Rust generic lifetime elision issue

I am trying to a implement generic observable collections for use with a UI framework I'm writing. I'm currently having an issue with lifetimes not being elidable in generics. For brevity the ...
Jacob Green's user avatar
0 votes
0 answers
30 views

How to use a Rust type with no apparent conversions in Python

I am making a Rust based library for Python using Pyo3 and maturin which implements different cryptographic protocols, and I'm having trouble working with the following crate pqc_kyber_edit, as I need ...
AthraelBB's user avatar
0 votes
0 answers
26 views

Call PathCompactPathExW from Rust using windows crate [duplicate]

I am trying to call the PathCompactPathExW function from Rust using the windows crate. Function signature: windows::Win32::UI::Shell pub unsafe fn PathCompactPathExW<P0>(pszout: &mut [u16], ...
Ozegazu's user avatar
3 votes
1 answer
38 views

How to add traces/spans to async function?

I'm having trouble adding tracing to a particular function in my rust project. Here are the relevant files // chain/ethereum/src/ingestor.rs #[tracing::instrument(skip(self), name = "...
Paymahn Moghadasian's user avatar
0 votes
0 answers
23 views

Properly implementing Drop for nested struct in Rust exposed to C

I have the following structs /// potentials #[repr(C)] pub struct Potential { pub len: usize, pub data: *const c_void, pub scalar: ScalarType, } /// ...
foobar's user avatar
  • 121
1 vote
0 answers
45 views

Why Rust thinks that value is borrowed as mutable twice? [duplicate]

In the following code (Playground here) use std::collections::HashMap; #[derive(Debug)] pub struct Node { pub children: HashMap<char, Node>, } pub struct Trie { root: Node, } impl ...
Roman Rodionov's user avatar
0 votes
1 answer
34 views

Rust pie chart graph divider issue

I'm trying to create a pie chart using the crate plotter. The issue I'm having is adding the black dividers to match. The sample output does not match. The code in question is in the file: ...
adviner's user avatar
  • 3,469
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::...
Anshul's user avatar
  • 425
0 votes
1 answer
23 views

Directory Modules not recognized by Library

Libraries are imported as dependencies in main.toml file,however in this case the submodules are not imported as expected. Existing Modules(output_0.rs/mod_1/output_1.rs) are not recognized as part of ...
srt111's user avatar
  • 1,375
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(...
Jamie Laden's user avatar
-1 votes
0 answers
18 views

Rust Actix-Web docker container not shows up logs

I am creating an API server using the Rust actix-web framework. I am creating and checking logs (using log4rs) in the local environment without any problems. After Dockerizing, Docker runs without a ...
이경서's user avatar
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/...
Jamie Laden's user avatar
0 votes
0 answers
64 views

Why can't I seem to prove via programming that a png created from a jpeg is identical for any given pixel? [duplicate]

So png's are lossless - meaning they are compressed in a manner so that no data they represent is lost. A png created from a jpeg should therefore be pixel identical, assuming the same color depth ...
John's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
2799