-
Notifications
You must be signed in to change notification settings - Fork 90
feat: add light account loader #2215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -12,8 +12,8 @@ rentfree/ | |||||
| │ ├── mod.rs # Entry point: derive_rentfree() | ||||||
| │ ├── parse.rs # Parsing #[light_account(init)], #[light_account(init)] attributes | ||||||
| │ └── codegen.rs # LightPreInit/LightFinalize trait generation | ||||||
| ├── program/ # #[rentfree_program] implementation | ||||||
| │ ├── mod.rs # Entry point: rentfree_program_impl() | ||||||
| ├── program/ # #[light_program] implementation | ||||||
| │ ├── mod.rs # Entry point: light_program_impl() | ||||||
| │ ├── instructions.rs # Instruction generation and handler wrapping | ||||||
| │ ├── crate_context.rs # Crate scanning for #[derive(Accounts)] structs | ||||||
| │ ├── variant_enum.rs # LightAccountVariant enum generation | ||||||
|
|
@@ -39,7 +39,7 @@ Implements `#[derive(LightAccounts)]` for Anchor Accounts structs: | |||||
|
|
||||||
| ### `program/` - RentFree Program Macro | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update section header to match the renamed macro. The section header still says "RentFree Program Macro," but line 42 correctly documents this as the 📝 Suggested section header update-### `program/` - RentFree Program Macro
+### `program/` - Light Program Macro📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| Implements `#[rentfree_program]` attribute macro: | ||||||
| Implements `#[light_program]` attribute macro: | ||||||
|
|
||||||
| - **instructions.rs** - Main macro logic, generates compress/decompress handlers | ||||||
| - **crate_context.rs** - Scans crate for `#[derive(Accounts)]` structs | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
Consider adding a language identifier to the fenced code block.
The macro hierarchy diagram uses a plain fenced code block. While it's an ASCII diagram (not executable code), adding a language identifier like
textor leaving it empty with triple backticks satisfies markdown linters and improves accessibility for screen readers.📝 Suggested fix
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
51-51: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents