≈ the.bay.news

Procedural Macro to create SoA version of a struct

The Rust Programming Language Forum
Procedural Macro to create SoA version of a struct
Hello, I want to make a derive macro that creates an struct of array version of a struct. I'm just having trouble figuring out how to make it nicely work especially with the methods. For instance a get(idx: usize) method would return an instance of the base struct from the values in its SoA version's Vec's at the specified index. I don't know how to go about doing so. Here is my macro: use proc_macro::TokenStream; use quote::{format_ident, quote}; use syn::{parse_macro_input, DeriveInput, Fie...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.