File tree Expand file tree Collapse file tree 4 files changed +27
-1
lines changed Expand file tree Collapse file tree 4 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ Generates a crate for cross-program invocations to an Anchor program from a JSON
66
77In a new crate, write:
88
9- ``` rust
9+ ``` skip
1010anchor_gen::generate_cpi_crate!("../../examples/govern-cpi/idl.json");
1111
1212declare_id!("GjphYQcbP1m3FuDyCTUJf2mUMxKPE3j6feWU1rxvC7Ps");
@@ -16,4 +16,6 @@ This will generate a fully functional Rust CPI client for your IDL.
1616
1717More examples can be found in the [ examples/] ( https://github.com/saber-hq/anchor-gen/tree/master/examples ) directory.
1818
19+ Note: This does not work on legacy IDLs. To migrate a legacy IDL, use ` anchor idl convert idl.json ` .
20+
1921License: Apache-2.0
Original file line number Diff line number Diff line change 1+ # anchor-gen
2+
3+ Generates a crate for cross-program invocations to an Anchor program from a JSON IDL.
4+
5+ ## Usage
6+
7+ In a new crate, write:
8+
9+ ``` skip
10+ anchor_gen::generate_cpi_crate!("../../examples/govern-cpi/idl.json");
11+
12+ declare_id!("GjphYQcbP1m3FuDyCTUJf2mUMxKPE3j6feWU1rxvC7Ps");
13+ ```
14+
15+ This will generate a fully functional Rust CPI client for your IDL.
16+
17+ More examples can be found in the [ examples/] ( https://github.com/saber-hq/anchor-gen/tree/master/examples ) directory.
18+
19+ Note: This does not work on legacy IDLs. To migrate a legacy IDL, use ` anchor idl convert idl.json ` .
20+
21+ License: Apache-2.0
Original file line number Diff line number Diff line change 1313//! This will generate a fully functional Rust CPI client for your IDL.
1414//!
1515//! More examples can be found in the [examples/](https://github.com/saber-hq/anchor-gen/tree/master/examples) directory.
16+ //!
17+ //! Note: This does not work on legacy IDLs. To migrate a legacy IDL, use `anchor idl convert idl.json`.
1618
1719pub use anchor_generate_cpi_crate:: generate_cpi_crate;
1820pub use anchor_generate_cpi_interface:: generate_cpi_interface;
Original file line number Diff line number Diff line change 2727 rustup
2828 anchor
2929 cargo-expand
30+ cargo-readme
3031 ] ;
3132 } ;
3233 }
You can’t perform that action at this time.
0 commit comments