I am writing a scripting language in rust, and I'm pretty new to the language.When I compile source into byte code I move the compiled symbols (Chunk) out of the function.I am also lazy and don't ...
I made an application that runs a very compute heavy operation when user clicks a button.This expensive operation is ran from a web assembly worker compiled with Rust. It can spawn multiple workers....
I'm using jsonref crate which internally uses rustls crate. When compiling rustls crate it fails in QNX platform, but builds successfully in Linux platform. Below is the error messageError2025-11-...
I am trying to develop a linear algebra library in rust. So, as part of it I am writing code that iterates through a n-dimensional array and returns mutable references. It's like writing a view for a ...
I want to write T::associated_function(..) but sometimes T is too verbose to write, like a long tuple.Is there any way to avoid writing the full T?pub trait Param { fn encode_type(out: &mut ...
I have a build.rs file in my project which contains code of library search paths and library linking. However, if I specify library search paths that doesn't exist in build.rs, it doesn't throw any ...
This is a pattern I want to be able to use in my code to have global variables that contain non-static references. Is it memory safe? If not, how can I make it so?use std::cell::Cell;pub struct ...
I want to load assets from a custom zip-like format, or even GoldSrc WAD3 files.My initial attempt was to use a custom AssetLoader, but I'm not feeling comfortable having to load the entire file's ...
I just started using neovim. I could get the lua language server to work but not the rust language server (rust-analyzer). When I open a rust file like hello.rs I get the errorLSP [rust_analyzer] ...
This is a follow up of my previous post. As suggested, I tried using jsonref crate to de-reference references present in a JSON file. Unfortunately, I'm not getting de-referenced output.main.rsuse ...
Let's say I've got a struct that contains a pinned pointer to a boxed T and is Drop:struct S<T> { t: Pin<Box<T>>,}impl<T> Drop for S<T> { // ...}How do I ...
I am trying to write a Rust program which generates random FX data and sends it to a Kafka topic.The code I have written so far is quite short. It does not currently compile.use rdkafka;use rand;...
tl;dr how do I get my project's build profile at build-time so I can branch on it?I have a custom profile for my rust project called myprofile. My Cargo.toml has[profile.myprofile]I build the ...
I'm facing an AlignmentMismatch error while trying to cast a Vec<u8> to Vec<T>, where T is a struct that uses repr(C) and Pod + Zeroable.I've also tried the slice road &[u8] -> &...