Community stream
Community
How to build expanding include_str!("__index.js") expanded to literal r#"<index.js raw text>"# in main.rs?
How to expand something like this, Rust source code referencing a file is src directory, in src/main.rs source code let js_code = include_str!("__index.js"); into this // Actual source code raw text of `__index.js` let js_code = r#" function…
Error in installation dotenvy
Hello everyone when i try install dotenvy en me project, the cli appears this error. I don't know how to fix this. Can anyone help me? ❯ cargo install dotenvy Updating crates.io index Installing dotenvy v0.15.7 Updating crates.io index Compiling…
Help me XY: How can I call pthread_kill without TOCTOU risk
I really hope this can be XY-ed into something else (as that will likely also provide options for better UX in the future). I need to kill some background threads that I spawned. I don't want to risk TOCTOU between JoinHandle::is_finished() and…
Redis Pooling With Fred
Hello! I have more of an architectural question but more in the context of rust. I have been using fred.rs and I noticed that it has pool support which is very different from the redis client prefers to offer multiplexing support. Additionally I…
Sharing textures between iced (wgpu) and Vulkano
Hi all. I'm starting on a Vulkan-compute heavy project and am using Vulkano for my work. However, I want to be able to display the results of this work in a widget inside a UI, and want to use Iced, as I enjoy using it. Iced's main backend is wgpu,…
Image does not fill window correctly, when rotating
It should show the images not being stretched out, I am unsure why this happens. This is specifically only about mode 3 main.rs (click for more details) lib.rs (click for more details) 11 posts - 4 participants Read full topic
"Unconstrained generic constant" encountered when using generic constant in `pattern_type!`
The code snippet is as follows: #![feature( const_trait_impl, pattern_type_macro, pattern_types, pattern_type_range_trait, generic_const_exprs, generic_pattern_types, const_range, const_range_bounds )] #![allow(internal_features,…
Deleted help post
(topic deleted by author) 1 post - 1 participant Read full topic
Shadows in wgpu
How does one get started on learning how to implement shadows into their game engine using wgpu? 8 posts - 4 participants Read full topic
Modelling interconnected structures
Hi, I am trying to parse a file that contains serialized C++ objects, and represent them within Rust. The file starts with a list of every object, then the objects themselves can also refer to one another. Ideally, I think I'd like something like…
How to use Rust-for-Linux?
I am wanting to develop some out-of-tree LKM's in Rust and have just finished enabling Rust Support in my kernel (enabling CONFIG_RUST) and I've also cloned rust-for-linux, though I don't understand how this directory enables the kernel and am…
Help understanding BufReader
Currently, I am building a custom StreamRecorder struct that records bytes read from a stream. While implementing it, I experimented with two different wrapping orders: putting the BufReader inside my struct versus wrapping my input reader in a…
What and when to unit test?
I'm currently making a TUI wrapper for flatpak using Ratatui, and I know it is a good practice to do unit tests on your code, but I genuinely have no idea what to even test. Like almost everything I know that could bug I already test manually when…
444 items available