0xMiden / 0xMiden/protocol

Allow users to extend `SchemaTypeRegistry`

オープン
#2,210 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
standards
主要言語
Rust
スター
132
フォーク
167
平均マージ
1日 23時間
マージ済み PR(30日)
110

説明

`SchemaTypeRegistry` provides a way to register data types (either `Word` or `Felt` sized) that can later be parsed from string or displayed in a human readable form. This is mostly based on whether the types implement a specific trait which defines this functionality.

[Currently](https://github.com/0xMiden/miden-base/blob/next/crates/miden-protocol/src/account/component/storage/type_registry.rs#L20), types are hardcoded and the registry itself is not extensible. We need to find a way to let users extend the registry with their own types so that applications can interpret storage data and display it accordingly. Some things to keep in mind:

- We'll need to pass a reference to `SchemaTypeRegistry` around when serializing/deserializing account component metadata
- Not sure whether leveraging https://github.com/0xMiden/compiler/issues/789 is possible, but for user-compiled types this would be great to have

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。