Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metaplex-foundation/shank
Extracts IDL from Solana Rust contracts
https://github.com/metaplex-foundation/shank
blockchain metaplex nft rust solana
Last synced: 11 days ago
JSON representation
Extracts IDL from Solana Rust contracts
- Host: GitHub
- URL: https://github.com/metaplex-foundation/shank
- Owner: metaplex-foundation
- Created: 2022-01-24T16:10:27.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-02-29T14:35:46.000Z (8 months ago)
- Last Synced: 2024-10-20T02:25:29.253Z (21 days ago)
- Topics: blockchain, metaplex, nft, rust, solana
- Language: Rust
- Homepage: https://docs.rs/crate/shank_macro/latest
- Size: 566 KB
- Stars: 124
- Watchers: 4
- Forks: 24
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- solana-awesome - Link
- awesome-solana - Shank - foundation/shank.svg?style=social) Extracts IDL from Solana Rust contracts (written by Metaplex for Metaplex NFT standard) (Code / Frameworks)
README
# Shank [![Build+Test](https://github.com/metaplex-foundation/shank/actions/workflows/build+test.yml/badge.svg)](https://github.com/metaplex-foundation/shank/actions/workflows/build+test.yml)
Collection of shank crates used to annotate Rust programs in order to extract IDL via the
included CLI tool. This IDL is used by [solita](https://github.com/metaplex-foundation/solita) in order to generate program SDKs.![shank-logo](./shank/assets/shank-logo.gif)
## Installation
For _usage_ and _installation_ see the [shank-cli Readme](./shank-cli/README.md).
## Crates
- [shank](./shank) top level crate to be installed and included in your library to add macro
annotations
- [shank_cli](./shank-cli) the CLI tool that extracts IDL from a specified crate into a file
- [shank-macro](./shank-macro) provides the _derive_ macros shank uses
- [shank-macro-impl](./shank-macro-impl) implements and tests the _derive_ macros
- [shank-idl](./shank-idl) processes files of a crate in order to discover _shank_ macros
annotations and convert annotated types into an [solita](https://github.com/metaplex-foundation/solita) compatible IDL
- [shank-render](./shank-render) generates Rust `impl` blocks from specific annotations like
account `seeds`## Development
Fork the repo makes some changes and make sure that all is dandy by running `cargo test`. Then
provide a pull request.If you are a contributor with access to publish to crates.io do the below in order to publish a
new version. NOTE that this only works from the _master_ branch and should be performed _after_
merging a PR into master.```sh
cargo test && cargo release
```The above runs all tests and dry-runs the release process. You should verify closely what it is
about to do and then re-run the release command as shown below.```sh
cargo release --execute
```## LICENSE
Apache-2.0