Feedback for adding zyn to a work in progress macro crate #24
Replies: 1 comment
-
|
Hello @antonWetzel and thanks for the feedback, I have similar feelings on almost all fronts and am working on a v1 that will be a more complete version of this api, it will add support for more rust syntax, work with references/values interchangeably, and yes also the context issue. One thing to note is your question on panic!, the diagnostics equivalent (return early unrecoverable failure) is Once I have something to share for the v1, which should likely be in the next month or two, ill let you know here! Please also share any more feedback you have if you continue using zyn and think of anything in the meantime, feedback is a critical part of the process as we all know! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Good morning ^^
I added
zynto a personal project and wanted to share my feedback.Source: https://github.com/antonWetzel/wgsl-gpu/tree/main/wgsl-gpu-macros/src
These are mostly my notes what did not work at first, so this is a lot more negative than my experience. Overall
zynfeels better as puresyn + quotemacro crates.Good
{{ <rust> }}feels very nice, especially using{{ value.member }}@foror other@nodesreduces code for simple casesHiccups
@foronly allows identifiers, not patterns (@for (index, value) in ...)zyn::deriveexpects<derive_name>, <arguments>[element]@element(name = name, value = value, ...)zyn::TokenStreamzyn::OutputSomeNotExistingTypeworks)Pipes
usize -> Index, which would introduce some conversionsError handling
zyn::OutputDiagnostic, so usingResultfeels wrong?, but this would requireResultat the momentpanic!syn::Error as zyn::Diagnostic as zyn::OutputArg/Argshandlingzyn::Attributeto parse the attributes for every member in a structVec<syn::Attribute>Design questions
synandquoteis available inzyn::<name>, but also aszyn::syn::<name>synorquotewithzyn(syn/quotejust for internals) seems infeasibleStructItemto aFieldin a nested elementBeta Was this translation helpful? Give feedback.
All reactions