You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current #[vlugin] interface is simple enough but needs some rework.
First, we won't have http messages, so on_request and the http dependency is deprecated. We will only have an on_message/on_msg that accepts a well known user defined message that implements Deserialize(on_create remains).
Current vlugin example:
Second, the macro is too magic, it requires a build.rs script to parse the source file as "temporary" workaround for custom inner attributes not being available but it adds friction and the feature doesn't look like it will land anytime soon. Instead we can be a bit more verbose and create a derive macro for the message that the user needs to define
Third, the WASM support means we trash what's currently being generated to support dynamic libraries and replace it with a wasm_bindgen interface that can be called by the host JS environment.
Last, to compensate for the new added verbosity we can add an optional cqrs feature that provides macros that generate the boilerplate necessary for this recommended pattern of separating commands and queries.
The current
#[vlugin]
interface is simple enough but needs some rework.First, we won't have http messages, so
on_request
and the http dependency is deprecated. We will only have anon_message
/on_msg
that accepts a well known user defined message that implementsDeserialize
(on_create
remains).Current vlugin example:
Second, the macro is too magic, it requires a
build.rs
script to parse the source file as "temporary" workaround for custom inner attributes not being available but it adds friction and the feature doesn't look like it will land anytime soon. Instead we can be a bit more verbose and create a derive macro for the message that the user needs to defineThird, the WASM support means we trash what's currently being generated to support dynamic libraries and replace it with a wasm_bindgen interface that can be called by the host JS environment.
Last, to compensate for the new added verbosity we can add an optional
cqrs
feature that provides macros that generate the boilerplate necessary for this recommended pattern of separating commands and queries.Nothing set in stone but good to start the conversation. @mrkaspa let me know what you think ;)
The text was updated successfully, but these errors were encountered: