Skip to content

feat: add #[sails_type] attribute macro to simplify dervive#1297

Merged
vobradovich merged 5 commits into
masterfrom
vo/sails-type-macros
Apr 15, 2026
Merged

feat: add #[sails_type] attribute macro to simplify dervive#1297
vobradovich merged 5 commits into
masterfrom
vo/sails-type-macros

Conversation

@vobradovich
Copy link
Copy Markdown
Member

@vobradovich vobradovich commented Apr 13, 2026

Resolves #1287

Two things to note:

  • syntax for v1: #[sails_type(no_reflect_hash)]
  • sails-macros is no longer an optional dep

@vobradovich vobradovich self-assigned this Apr 13, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the #[sails_type] attribute macro to streamline the derivation of standard traits (Encode, Decode, TypeInfo, ReflectHash) across the sails-rs ecosystem. The changes include the macro implementation, updates to client generators to utilize the new attribute, and extensive refactoring of examples and benchmarks to replace manual trait derivations. Feedback was provided to ensure consistency in documentation by using type_info::TypeInfo instead of scale_info::TypeInfo in the v1 client generator.

Comment thread rs/client-gen/src/lib.rs Outdated
vobradovich and others added 3 commits April 13, 2026 19:48
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@vobradovich vobradovich marked this pull request as ready for review April 14, 2026 11:53
@vobradovich vobradovich requested a review from m62624 April 14, 2026 11:53
@vobradovich vobradovich merged commit 7838c9f into master Apr 15, 2026
4 checks passed
@vobradovich vobradovich deleted the vo/sails-type-macros branch April 15, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add #[sails_type] attribute macro to simplify codec/type-info/reflect-hash boilerplate

2 participants