Re: [PATCH v2] rust: alloc: allow coercion from `Box<T>` to `Box<dyn U>` if T implements U

From: Alexandre Courbot
Date: Fri Apr 11 2025 - 21:55:29 EST


On Fri Apr 11, 2025 at 11:22 PM JST, Danilo Krummrich wrote:
> On Fri, Apr 11, 2025 at 10:26:23PM +0900, Alexandre Courbot wrote:
>> On Fri Apr 11, 2025 at 10:10 PM JST, Danilo Krummrich wrote:
>> > On Fri, Apr 11, 2025 at 09:07:26PM +0900, Alexandre Courbot wrote:
>> >> This enables the creation of trait objects backed by a Box, similarly to
>> >> what can be done with the standard library.
>> >>
>> >> Suggested-by: Benno Lossin <benno.lossin@xxxxxxxxx>
>> >> Signed-off-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
>> >
>> > I assume you have a specific use-case in nova-core for this? For this cycle, can
>> > you get away without having this in nova-core?
>>
>> That's correct, and our next nova-core iteration will likely depend on
>> this to provide some basic HAL. If this cannot make it for this cycle, I
>> guess I can always use Arc temporarily.
>
> I'd prefer to take this through the alloc tree (for this cycle), but this also
> means you can't use it until the next cycle in nova. I assume that's just a
> minor inconvinience?

Yes, taking it through the alloc tree is fine, I will just work things
around (or delay the Falcon HAL, it's not like nova-core is going to be
anything useful in 6.16 anyway ^_^;) for the next cycle.

Thanks!
Alex.