Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tendermint/amino_rs
Rust implementation of Amino
https://github.com/tendermint/amino_rs
Last synced: 2 months ago
JSON representation
Rust implementation of Amino
- Host: GitHub
- URL: https://github.com/tendermint/amino_rs
- Owner: tendermint
- License: apache-2.0
- Created: 2018-03-11T22:09:42.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-06-23T13:37:28.000Z (over 4 years ago)
- Last Synced: 2024-10-19T14:00:51.451Z (3 months ago)
- Language: Rust
- Size: 7.31 MB
- Stars: 26
- Watchers: 11
- Forks: 16
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - Amino
README
# Rust Amino
This is a work in progress implementation of the Amino serialization for Tendermint/Cosmos in the Rust Language.
For details on amino, see: https://github.com/tendermint/go-amino.It is based on the Protocol Buffers implementation [prost!](https://github.com/danburkert/prost) by [@danburkert](https://github.com/danburkert).
Like prost! for protobuf, it uses Rust's type-directed metaprogramming to add support for amino's
[registered types](https://github.com/tendermint/go-amino/#registering-types).[Registered types](https://github.com/tendermint/go-amino/#registering-types) can be annotated via
`#[aminoName="registered/name/goes/here"]` to derive encoding and decoding.
As amino allows to register type aliases of primitive types (e.g.
[bytes](https://github.com/tendermint/tendermint/blob/013b9cef642f875634c614019ab13b17570778ad/crypto/ed25519/ed25519.go#L40-L41) via
[ed25519.Pubkey](https://github.com/tendermint/tendermint/blob/013b9cef642f875634c614019ab13b17570778ad/crypto/encoding/amino/amino.go#L26-L27)), you can also annotate fields.You can find a complete example which uses both, a registered type (or message) and a registered scalar type
(`bytes` or `Vec`) in the [kms repository](https://github.com/tendermint/kms/blob/9344e3411676ff4e27e139b2033697fe48a7e87a/src/types/ed25519msg.rs#L8-L13).