Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New schema format #2206

Draft
wants to merge 57 commits into
base: main
Choose a base branch
from
Draft

New schema format #2206

wants to merge 57 commits into from

Conversation

aumetra
Copy link
Member

@aumetra aumetra commented Aug 12, 2024

Closes #1502

This is a PR adding a new schema MVP that intends to encode Rust types a little better than JSON schema does.

The biggest differences are:

  • Full support for all kinds of enums Rust supports (tuple, named, unit) and enums without cases (so non-constructable types such as core::convert::Infallible)
  • Full support for all kinds of structs Rust supports (named, tuple, unit)
  • Full support for tuples
  • Dedicated HexBinary, Timestamp, Optional, Checksum, Binary, and Address types
  • Slightly more compact representation through using numeric indices vs. path names
  • Support for arbitrary-size integers by encoding their precision and whether they are signed
  • Support for arbitrary-size decimals by encoding their precision and wehther they are signed

@aumetra aumetra marked this pull request as draft August 12, 2024 14:57
@aumetra
Copy link
Member Author

aumetra commented Aug 20, 2024

God those warnings I added.. they're really "we have compiler warnings at home" material

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.

Support import alias in cosmwasm-schema
2 participants