# help

**URL:** https://users.rust-lang.org/c/help/5.md?page=2

[Latest](https://users.rust-lang.org/latest.md) · [Categories](https://users.rust-lang.org/categories.md)

**Page:** 3

---

## [Questions about HashMap's get\_key\_value](https://users.rust-lang.org/t/questions-about-hashmaps-get-key-value/142983)

<div class="topic-metadata">

**Author:** [@AConfusedDeveloper](https://users.rust-lang.org/u/AConfusedDeveloper)\
**Replies:** 4\
**Last updated:** [October 12, 2026, 11:55pm UTC](https://users.rust-lang.org/t/questions-about-hashmaps-get-key-value/142983 "2026-10-12T23:55:55Z")

</div>

So I'm doing a silly thingy, with a HashMap keys of Vectors of references. I probably shouldn't, but am. During the program I wanted to get user input, find the key in the hashmap that matches, and store a reference to …

---

## [Serde: I got lost between MapAccess, DeserializeSeed and PhantomData](https://users.rust-lang.org/t/serde-i-got-lost-between-mapaccess-deserializeseed-and-phantomdata/142976)

<div class="topic-metadata">

**Author:** [@domma](https://users.rust-lang.org/u/domma)\
**Replies:** 2\
**Last updated:** [October 12, 2026, 8:42pm UTC](https://users.rust-lang.org/t/serde-i-got-lost-between-mapaccess-deserializeseed-and-phantomdata/142976 "2026-10-12T20:42:12Z")

</div>

I try to implement my own Serde deserializer for my non-default parsing problem. It is an educational project to sharpen my Rust skill, which means that I have real world use case, but my focus is on really understanding…

---

## [Help needed about tokio-rustls usage](https://users.rust-lang.org/t/help-needed-about-tokio-rustls-usage/142512)

<div class="topic-metadata">

**Author:** [@cheese\_space](https://users.rust-lang.org/u/cheese_space)\
**Replies:** 6\
**Last updated:** [October 12, 2026, 4:22pm UTC](https://users.rust-lang.org/t/help-needed-about-tokio-rustls-usage/142512 "2026-10-12T16:22:29Z")

</div>

Hi fellow rust users! I want to use the tokio-rustls crate for encrypting traffic between client and sever for my chat-server client project 8080\_msg. However I can't figure out how you go from a regular async TcpStrea…

---

## [Column width interaction of ansi\_term and tabled crates](https://users.rust-lang.org/t/column-width-interaction-of-ansi-term-and-tabled-crates/142955)

<div class="topic-metadata">

**Author:** [@jhanarato](https://users.rust-lang.org/u/jhanarato)\
**Replies:** 2\
**Last updated:** [October 12, 2026, 12:29am UTC](https://users.rust-lang.org/t/column-width-interaction-of-ansi-term-and-tabled-crates/142955 "2026-10-12T00:29:24Z")

</div>

I've run into a problem formatting terminal output. I'm using the ansi\_term and tabled crates together. Here's a minimal example: use ansi\_term::Style; use tabled::{Table, Tabled}; #\[derive(Tabled)\] struct Row { co…

---

## [Nested #\[repr(c)\] in rust struct](https://users.rust-lang.org/t/nested-repr-c-in-rust-struct/142965)

<div class="topic-metadata">

**Author:** [@MusicalNinjaDad](https://users.rust-lang.org/u/MusicalNinjaDad)\
**Replies:** 3\
**Last updated:** [October 11, 2026, 2:13pm UTC](https://users.rust-lang.org/t/nested-repr-c-in-rust-struct/142965 "2026-10-11T14:13:25Z")

</div>

I have the following struct which I receive via ffi #\[repr(C)\] #\[derive(Clone, Copy)\] pub struct CDROM\_TOC { pub Length: \[u8; 2\], pub FirstTrack: u8, pub LastTrack: u8, pub TrackData: \[TRACK\_DATA; 100\], …

---

## [Why would \`as\_ref()\` be required here rather than a reference?](https://users.rust-lang.org/t/why-would-as-ref-be-required-here-rather-than-a-reference/142941)

<div class="topic-metadata">

**Author:** [@jhanarato](https://users.rust-lang.org/u/jhanarato)\
**Replies:** 4\
**Last updated:** [October 10, 2026, 4:27am UTC](https://users.rust-lang.org/t/why-would-as-ref-be-required-here-rather-than-a-reference/142941 "2026-10-10T04:27:36Z")

</div>

After playing around with newtypes a bit, I'm curious about this use of the AsRef trait: impl PaliSearcher { pub fn new(index: &PaliIndex) -\> Result\<Self\> { let reader = Self::reader(index.as\_ref())?; …

---

## [Render pipeline error wgpu](https://users.rust-lang.org/t/render-pipeline-error-wgpu/142913)

<div class="topic-metadata">

**Author:** [@LordVagous](https://users.rust-lang.org/u/LordVagous)\
**Replies:** 5\
**Last updated:** [October 9, 2026, 11:48pm UTC](https://users.rust-lang.org/t/render-pipeline-error-wgpu/142913 "2026-10-09T23:48:11Z")

</div>

let render\_pipeline\_layout = device.create\_pipeline\_layout(&PipelineLayoutDescriptor { label: None, bind\_group\_layouts: &\[Some(&default\_bgl), Some(&camera\_bgl)\], immediate\_size: 0, …

---

## [Correct format to use on a 'scene' file](https://users.rust-lang.org/t/correct-format-to-use-on-a-scene-file/142931)

<div class="topic-metadata">

**Author:** [@1nuxiuz](https://users.rust-lang.org/u/1nuxiuz)\
**Replies:** 2\
**Last updated:** [October 9, 2026, 11:44pm UTC](https://users.rust-lang.org/t/correct-format-to-use-on-a-scene-file/142931 "2026-10-09T23:44:50Z")

</div>

Just got me wondering, similar to Godot's scene (.tscn) what existing format would be just as convenient when implementing a similar thing, which is to handle 'Node' trees and instancing another scene instead of writing …

---

## [Convert ref-to-raw-pointer to ref-to-NonNull without transmute?](https://users.rust-lang.org/t/convert-ref-to-raw-pointer-to-ref-to-nonnull-without-transmute/142914)

<div class="topic-metadata">

**Author:** [@rhansen](https://users.rust-lang.org/u/rhansen)\
**Replies:** 6\
**Last updated:** [October 9, 2026, 7:03am UTC](https://users.rust-lang.org/t/convert-ref-to-raw-pointer-to-ref-to-nonnull-without-transmute/142914 "2026-10-09T07:03:08Z")

</div>

Consider this toy function: fn ptr\_as\_nonnull\<T: ?Sized\>(input: &\*mut T) -\> Option\<&NonNull\<T\>\> { if input.is\_null() { None } else { // Is it possible to implement this without transmute? …

---

## [Trait object with associated types in field - requires generic param?](https://users.rust-lang.org/t/trait-object-with-associated-types-in-field-requires-generic-param/142889)

<div class="topic-metadata">

**Author:** [@RobertN](https://users.rust-lang.org/u/RobertN)\
**Replies:** 9\
**Last updated:** [October 9, 2026, 6:08am UTC](https://users.rust-lang.org/t/trait-object-with-associated-types-in-field-requires-generic-param/142889 "2026-10-09T06:08:44Z")

</div>

I currently have: trait ListModel { fn get\_stuff(&self, row: i) -\> Stuff; ... } struct List { model: Rc\<dyn ListModel\>, ... } I think I want to change my model to use row IDs instead of usize indices. I…

---

## [Why no Dependent Matrix Type?](https://users.rust-lang.org/t/why-no-dependent-matrix-type/142907)

<div class="topic-metadata">

**Author:** [@SuperNove02](https://users.rust-lang.org/u/SuperNove02)\
**Replies:** 6\
**Last updated:** [October 9, 2026, 1:55am UTC](https://users.rust-lang.org/t/why-no-dependent-matrix-type/142907 "2026-10-09T01:55:55Z")

</div>

Hello, I don't really know how to really introduce this topic. Background: I want to implement compile time safe matrix multiplication. For that i want to have a struct with const generics for the number of columns an…

---

## [Shadows in wgpu](https://users.rust-lang.org/t/shadows-in-wgpu/142538)

<div class="topic-metadata">

**Author:** [@LordVagous](https://users.rust-lang.org/u/LordVagous)\
**Replies:** 14\
**Last updated:** [October 8, 2026, 2:06am UTC](https://users.rust-lang.org/t/shadows-in-wgpu/142538 "2026-10-08T02:06:25Z")

</div>

How does one get started on learning how to implement shadows into their game engine using wgpu?

---

## [Rust abstractions for kernel sources](https://users.rust-lang.org/t/rust-abstractions-for-kernel-sources/142894)

<div class="topic-metadata">

**Author:** [@pawndown](https://users.rust-lang.org/u/pawndown)\
**Replies:** 0\
**Last updated:** [October 8, 2026, 12:47am UTC](https://users.rust-lang.org/t/rust-abstractions-for-kernel-sources/142894 "2026-10-08T00:47:43Z")

</div>

Hi, I just got my my kernel Rust enabled and have compiled a working minimal LKM, but see that I now need access to some of the kernel calls under the net framework. Which leads me to believe I need to create some Rust …

---

## [Any thin wrapper around the Web Worker API?](https://users.rust-lang.org/t/any-thin-wrapper-around-the-web-worker-api/142888)

<div class="topic-metadata">

**Author:** [@iFrostizz](https://users.rust-lang.org/u/iFrostizz)\
**Replies:** 0\
**Last updated:** [October 7, 2026, 3:33pm UTC](https://users.rust-lang.org/t/any-thin-wrapper-around-the-web-worker-api/142888 "2026-10-07T15:33:44Z")

</div>

Hi, I'm currently writing some audio decoding pipeline targeting wasm32-unknown-unknown. In the queue / jittering part, I wanna be able to have one task that pushes data as it comes (with all the network uncertainties),…

---

## [Are there any guarantees about where COPYRIGHT-library.html will be located?](https://users.rust-lang.org/t/are-there-any-guarantees-about-where-copyright-library-html-will-be-located/142869)

<div class="topic-metadata">

**Author:** [@Jayman2000](https://users.rust-lang.org/u/Jayman2000)\
**Replies:** 1\
**Last updated:** [October 7, 2026, 9:49am UTC](https://users.rust-lang.org/t/are-there-any-guarantees-about-where-copyright-library-html-will-be-located/142869 "2026-10-07T09:49:11Z")

</div>

I’m currently trying to write a Python program. The Python program that I’m working on seems to work fine on Linux, but it sometimes breaks when I run it on Windows. Specifically, it breaks breaks because it sometimes tr…

---

## [Crate async\_trait - error future created by async block is not Send](https://users.rust-lang.org/t/crate-async-trait-error-future-created-by-async-block-is-not-send/142831)

<div class="topic-metadata">

**Author:** [@clarice](https://users.rust-lang.org/u/clarice)\
**Replies:** 3\
**Last updated:** [October 6, 2026, 10:10am UTC](https://users.rust-lang.org/t/crate-async-trait-error-future-created-by-async-block-is-not-send/142831 "2026-10-06T10:10:55Z")

</div>

I was experimenting with the async\_trait crate and stumble upon the following error: future created by async block is not Send by the following code: #\[async\_trait::async\_trait\] trait DatabaseManagerGetConnection { …

---

## [Strategies for dyn trait objects with optional behavior?](https://users.rust-lang.org/t/strategies-for-dyn-trait-objects-with-optional-behavior/142852)

<div class="topic-metadata">

**Author:** [@rhansen](https://users.rust-lang.org/u/rhansen)\
**Replies:** 5\
**Last updated:** [October 6, 2026, 8:16am UTC](https://users.rust-lang.org/t/strategies-for-dyn-trait-objects-with-optional-behavior/142852 "2026-10-06T08:16:23Z")

</div>

I have a trait with optional behavior, and I'm trying to figure out how to use it behind a trait object. trait Trait { fn required\_behavior(&self); fn optional\_behavior(&self) where Self: Optional; …

---

## [Array initialization post declaration](https://users.rust-lang.org/t/array-initialization-post-declaration/142851)

<div class="topic-metadata">

**Author:** [@beni-f90](https://users.rust-lang.org/u/beni-f90)\
**Replies:** 5\
**Last updated:** [October 6, 2026, 6:16am UTC](https://users.rust-lang.org/t/array-initialization-post-declaration/142851 "2026-10-06T06:16:58Z")

</div>

Hello, this is my first forum post. I've been reading through the rust book and trying to work on some basic implementations of linear algebra stuff in rust and came across this code that doesn't compile fn main() { …

---

## [Confused on the Rust Reference, about Visitem](https://users.rust-lang.org/t/confused-on-the-rust-reference-about-visitem/142740)

<div class="topic-metadata">

**Author:** [@wadeio](https://users.rust-lang.org/u/wadeio)\
**Replies:** 5\
**Last updated:** [October 5, 2026, 6:02pm UTC](https://users.rust-lang.org/t/confused-on-the-rust-reference-about-visitem/142740 "2026-10-05T18:02:52Z")

</div>

According to the the reference, a VisItem consists of a Visibility (optional, such as pub) followed by, for example, an Implementation. However, pub is not permitted in front of impl. This seems to conflict with the refe…

---

## [About Bevy textbook](https://users.rust-lang.org/t/about-bevy-textbook/142842)

<div class="topic-metadata">

**Author:** [@A\_Wei](https://users.rust-lang.org/u/A_Wei)\
**Replies:** 1\
**Last updated:** [October 5, 2026, 2:00pm UTC](https://users.rust-lang.org/t/about-bevy-textbook/142842 "2026-10-05T14:00:39Z")

</div>

Does anyone know some books about how to program Bevy? I don't want to read source code, it's so difficult and I'll go bananas

---

## [Type erasure and dyn lifetime in a NonNull/Box struct field](https://users.rust-lang.org/t/type-erasure-and-dyn-lifetime-in-a-nonnull-box-struct-field/142830)

<div class="topic-metadata">

**Author:** [@rhansen](https://users.rust-lang.org/u/rhansen)\
**Replies:** 7\
**Last updated:** [October 5, 2026, 4:16am UTC](https://users.rust-lang.org/t/type-erasure-and-dyn-lifetime-in-a-nonnull-box-struct-field/142830 "2026-10-05T04:16:50Z")

</div>

I'm new to Rust, and I am trying to understand dyn object lifetimes when inside a Box or NonNull. My goal is to write an adapter for a C API. I have a few C struct types: #\[repr(C)\] struct ConcreteA { // generated…

---

## [Limitations of \`min\_specialization\` when specializing a generic implementation?](https://users.rust-lang.org/t/limitations-of-min-specialization-when-specializing-a-generic-implementation/142822)

<div class="topic-metadata">

**Author:** [@rhansen](https://users.rust-lang.org/u/rhansen)\
**Replies:** 3\
**Last updated:** [October 4, 2026, 11:38pm UTC](https://users.rust-lang.org/t/limitations-of-min-specialization-when-specializing-a-generic-implementation/142822 "2026-10-04T23:38:05Z")

</div>

I'm trying to understand #!\[feature(specialization)\] vs. #!\[feature(min\_specialization)\] to inform the design of my types, but I haven't been able to find any novice-accessible documentation. How do the two differ? Spe…

---

## [Arena's and alignment](https://users.rust-lang.org/t/arenas-and-alignment/142824)

<div class="topic-metadata">

**Author:** [@cheese\_space](https://users.rust-lang.org/u/cheese_space)\
**Replies:** 4\
**Last updated:** [October 4, 2026, 9:27pm UTC](https://users.rust-lang.org/t/arenas-and-alignment/142824 "2026-10-04T21:27:37Z")

</div>

Hi rustaceans! I wanted to build an arena allocator as a little exercise for myself and I came up with this: use std::{alloc::{Layout, alloc, dealloc, handle\_alloc\_error}, ptr::NonNull}; use std::cell::Cell; pub struct…

---

## [Do i need to bundle licenses of my project's dependencies even if my project is open source](https://users.rust-lang.org/t/do-i-need-to-bundle-licenses-of-my-projects-dependencies-even-if-my-project-is-open-source/142800)

<div class="topic-metadata">

**Author:** [@Monochrotec](https://users.rust-lang.org/u/Monochrotec)\
**Replies:** 5\
**Last updated:** [October 2, 2026, 8:06pm UTC](https://users.rust-lang.org/t/do-i-need-to-bundle-licenses-of-my-projects-dependencies-even-if-my-project-is-open-source/142800 "2026-10-02T20:06:12Z")

</div>

hello my project has quite a lot of dependencies. about 500 of them. I looked for a few posts but they old. I was wondering if I'm publishing both the source code and the binary. do i still need to have to bundle all o…

---

## [Trait with associated type with covariant lifetime parameter](https://users.rust-lang.org/t/trait-with-associated-type-with-covariant-lifetime-parameter/142736)

<div class="topic-metadata">

**Author:** [@vincent-sparks](https://users.rust-lang.org/u/vincent-sparks)\
**Replies:** 2\
**Last updated:** [October 1, 2026, 1:57am UTC](https://users.rust-lang.org/t/trait-with-associated-type-with-covariant-lifetime-parameter/142736 "2026-10-01T01:57:36Z")

</div>

trait SomeTrait { type AssociatedType\<'a\>; } fn shorten\<'short, 'long: 'short, T: SomeTrait\>(value: T::AssociatedType\<'long\>) -\> T::AssociatedType\<'short\> { value } This doesn't compile, because the lifetime par…

---

## [How to think about deallocation when you have graph + slotmap?](https://users.rust-lang.org/t/how-to-think-about-deallocation-when-you-have-graph-slotmap/142735)

<div class="topic-metadata">

**Author:** [@RobertN](https://users.rust-lang.org/u/RobertN)\
**Replies:** 2\
**Last updated:** [September 30, 2026, 11:27pm UTC](https://users.rust-lang.org/t/how-to-think-about-deallocation-when-you-have-graph-slotmap/142735 "2026-09-30T23:27:10Z")

</div>

I have some code that uses a tree of widgets stored in a slotmap. Well, it's technically a graph, not a tree, because I can walk up to parent: Option\<WidgetId\> or down to children: Vec\<WidgetId\>. These properties are sto…

---

## [Where can I find developers to test a small Rust UI language?](https://users.rust-lang.org/t/where-can-i-find-developers-to-test-a-small-rust-ui-language/142719)

<div class="topic-metadata">

**Author:** [@hawerz](https://users.rust-lang.org/u/hawerz)\
**Replies:** 4\
**Last updated:** [September 30, 2026, 2:28pm UTC](https://users.rust-lang.org/t/where-can-i-find-developers-to-test-a-small-rust-ui-language/142719 "2026-09-30T14:28:14Z")

</div>

Hi everyone, I’ve built a small programming language for UI development in Rust, but I’m not sure where to find developers who might be interested in trying it. I’ve mostly tested it on my own examples so far, includin…

---

## [IPC alternatives in Rust](https://users.rust-lang.org/t/ipc-alternatives-in-rust/142669)

<div class="topic-metadata">

**Author:** [@rogerara](https://users.rust-lang.org/u/rogerara)\
**Replies:** 9\
**Last updated:** [September 30, 2026, 9:52am UTC](https://users.rust-lang.org/t/ipc-alternatives-in-rust/142669 "2026-09-30T09:52:19Z")

</div>

Over last days, I’ve considered many options to add Python, PHP and Rhai scripting support to my webserver project. Several alternatives to approach a solution for this came up at first, the #1 is over static linking, bu…

---

## [Which rule does it regulate that \`dyn Trait + AutoTrait\` can be coerced to \`dyn Trait\`?](https://users.rust-lang.org/t/which-rule-does-it-regulate-that-dyn-trait-autotrait-can-be-coerced-to-dyn-trait/142511)

<div class="topic-metadata">

**Author:** [@xmh0511](https://users.rust-lang.org/u/xmh0511)\
**Replies:** 9\
**Last updated:** [September 29, 2026, 8:47am UTC](https://users.rust-lang.org/t/which-rule-does-it-regulate-that-dyn-trait-autotrait-can-be-coerced-to-dyn-trait/142511 "2026-09-29T08:47:05Z")

</div>

Consider this example: use std::error::Error; fn invoke()-\>Box\<dyn Error + Send + Sync\>{ todo!() } fn main(){ let b:Box\<dyn Error\> = invoke(); } I tried to find the relevant rules in Type coercions - The Rust Ref…

---

## [Dependencies for other (unused) platforms](https://users.rust-lang.org/t/dependencies-for-other-unused-platforms/142676)

<div class="topic-metadata">

**Author:** [@tdelmas](https://users.rust-lang.org/u/tdelmas)\
**Replies:** 4\
**Last updated:** [September 28, 2026, 5:12pm UTC](https://users.rust-lang.org/t/dependencies-for-other-unused-platforms/142676 "2026-09-28T17:12:16Z")

</div>

When building an app for Linux (for example), I try to ignore/exclude dependencies that are specify to other targets (android, windows, wasm, ...). The goals are multiples: Reduce the risk of supply chain attacks Redu…

[Previous page](https://users.rust-lang.org/c/help/5.md?page=1)

[Next page](https://users.rust-lang.org/c/help/5.md?page=3)
