anchor
anchor copied to clipboard
docs: documentation redesign
@armaniferrante and I have been discussing a plan for anchor's new documentation. This issue is to gather feedback before we proceed.
Here's the initial plan:
- three docs
- the guide: this is where we explain topics (https://v3.vuejs.org/guide/introduction.html / the rust book), maintained by very small group, 1-2 people, in order to keep writing and teaching style consistent
- the reference: =docs.rs, most up to date, maintained by everyone, if you commit sth, you update the reference
- the cookbook: https://vuejs.org/v2/cookbook/index.html, a little bit similar to what the anchor tutorials are right now, although instead of focusing on how specific anchor features work it is more focused on showing how specific patterns independent from anchor can be implemented in anchor (e.g. how do I set up global admin settings for a program in anchor). I'd prefer the core team not to maintain this at all except maybe in the beginning and then hope anchor users contribute. This might work because contributing to the cookbook does not require you to get familiar with how anchor works under the hood, you just need to know how to use it well. might not be necessary at all if solanacookbook.com is good enough
One thing I'd add is that I really love when it's easy to run and play around with complete examples (this is what the current docs attempt to do). So for the first and last doc types, it'd be great to allow that either in browser or via github.
Reference Checklist:
- [x] Contributing.md
- [x] Readme.md
- [x] Accounts (https://github.com/project-serum/anchor/pull/1208)
- [x] Account (basic parts done but lacks section about out-of-the-box-types, e.g. ProgramData) (https://github.com/project-serum/anchor/pull/1231)
- [x] SystemAccount (https://github.com/project-serum/anchor/pull/1231)
- [x] AccountInfo(https://github.com/project-serum/anchor/pull/1231)
- [x] Box(https://github.com/project-serum/anchor/pull/1231)
- [x] AccountLoader(https://github.com/project-serum/anchor/pull/1231)
- [x] Signer(https://github.com/project-serum/anchor/pull/1231)
- [x] Sysvar(https://github.com/project-serum/anchor/pull/1231)
- [x] UncheckedAccount(https://github.com/project-serum/anchor/pull/1231)
- [x] Program(https://github.com/project-serum/anchor/pull/1231)
- [x] ProgramData (add this to Account reference)(https://github.com/project-serum/anchor/pull/1231)
- [x] BpfUpgradableState (add this to Account reference)(https://github.com/project-serum/anchor/pull/1231)
- [x] Context (https://github.com/project-serum/anchor/pull/1247)
- [x] Constraints (https://github.com/project-serum/anchor/pull/1210)
- [x] Anchor Errors (https://github.com/project-serum/anchor/pull/1204)
- [x] require! macro (needs real example)
- [x] Custom Errors
- [ ] Account discriminator
- [ ] Instruction Sighash
- [ ] Access Control macro
- [ ] Interface macro
- [ ] Zero-Copy macro
- [ ] Constant macro
- [ ] Cross Program Invocations (cpi module generation)
- [ ] Events
Wanna help! already have one open PR for ts client documentation.
hey @Necmttn sorry for the late reply. Are you still interested in writing ts documentation? One thing that would be really helpful is a section in the book that shows how all the different rust types are mapped to ts types. e.g. u64 -> BN
Hey @paul-schaaf, Noah and I putting together a PR to add events
to the docs:
https://github.com/coral-xyz/anchor/pull/2008
Let us know if there's another section you think is a high priority to write next. Thanks, Ash
Will look at it @ashpoolin!
Hi , is this issue still open ? I would love to join you guys.