-
Notifications
You must be signed in to change notification settings - Fork 64
Proto generation for Vixen Render #589
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
Merged
kespinola
merged 28 commits into
codama-idl:main
from
abklabs:vix-77-add-support-to-generate-impl-for-proto-structs-and-rust
May 22, 2025
Merged
Changes from 20 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
cc5ff52
feat : add proto structs and types generation
Nagaprasadvr 163ad7e
wip : add all proto structs
Nagaprasadvr 0dab9cf
fix : nested enum types for protobuf
Nagaprasadvr 73471f1
fix : lint
Nagaprasadvr 675aa37
fix : proto gen
Nagaprasadvr 8382daa
`feat` Handle Ixs without args and exclude discriminators
fernandodeluret 9a4071e
chore : cleanup
Nagaprasadvr 8a22fa6
wip : impl stream parser
Nagaprasadvr 4241056
`feat`: Add proto oneof msgs for program & allow folder structure change
fernandodeluret a007035
Merge pull request #2 from abklabs/vix-71b-add-proto-oneof-msgs
Nagaprasadvr 5969b38
chore : cleanup
Nagaprasadvr 3856239
`feat` Add implementation for into_proto transforms
fernandodeluret e46b6f7
Merge pull request #3 from abklabs/vix-71c-add-implementations-for-in…
Nagaprasadvr e8a45cf
chore : fix proto imports
Nagaprasadvr a989788
Squashed commit of the following:
fernandodeluret 5cf5283
`feat` Add proto impl & Support for enums and abstract discriminators
fernandodeluret 1172e17
`feat` Update support for inner option structs
fernandodeluret 2cfecab
`feat` Replace proto bytes for arrays of numbers and strings
fernandodeluret 7071119
Merge branch 'main' into vix-77-add-support-to-generate-impl-for-prot…
fernandodeluret bf7189a
`chore` Update changeset
fernandodeluret 76aa6f4
`chore` Remove changes to renderers-rutst e2e example & not needed if…
fernandodeluret ecaf12a
`chore` Fix idl example identation
fernandodeluret b1ef53b
`feat` Simplify config options accepted for parser generation
fernandodeluret c051599
Merge branch 'main' into vix-77-add-support-to-generate-impl-for-prot…
fernandodeluret eeb0198
`fix` Update tests to match latest api changes
fernandodeluret 5244242
`chore` remove not needed devDep
fernandodeluret 2578ee6
Merge branch 'main' into vix-77-add-support-to-generate-impl-for-prot…
fernandodeluret ec06b88
Merge branch 'main' into vix-77-add-support-to-generate-impl-for-prot…
fernandodeluret File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@codama/renderers-vixen-parser': patch | ||
| --- | ||
|
|
||
| Add support for proto generation for `renderers-vixen-parser` parsers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,149 +1,212 @@ | ||
| { | ||
| "kind": "rootNode", | ||
| "program": { | ||
| "kind": "programNode", | ||
| "pdas": [], | ||
| "accounts": [], | ||
| "instructions": [ | ||
| { | ||
| "kind": "instructionNode", | ||
| "name": "instruction1", | ||
| "optionalAccountStrategy": "programId", | ||
| "docs": ["Testing instructions with no accounts or arguments"], | ||
| "accounts": [], | ||
| "arguments": [], | ||
| "remainingAccounts": [] | ||
| }, | ||
| { | ||
| "kind": "instructionNode", | ||
| "name": "instruction2", | ||
| "optionalAccountStrategy": "programId", | ||
| "docs": ["Testing instructions with remaining accounts only"], | ||
| "accounts": [], | ||
| "arguments": [], | ||
| "remainingAccounts": [ | ||
| "kind": "programNode", | ||
| "pdas": [], | ||
| "accounts": [ | ||
| { | ||
| "kind": "instructionRemainingAccountsNode", | ||
| "value": { | ||
| "kind": "argumentValueNode", | ||
| "name": "remainingAccounts" | ||
| }, | ||
| "isOptional": true, | ||
| "isSigner": false | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "kind": "instructionNode", | ||
| "name": "instruction3", | ||
| "optionalAccountStrategy": "programId", | ||
| "docs": ["Testing instructions with discriminator only"], | ||
| "accounts": [], | ||
| "arguments": [ | ||
| "kind": "accountNode", | ||
| "data": { | ||
| "kind": "structTypeNode", | ||
| "fields": [ | ||
| { | ||
| "kind": "structFieldTypeNode", | ||
| "name": "discriminator", | ||
| "type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }, | ||
| "docs": [], | ||
| "defaultValue": { | ||
| "kind": "numberValueNode", | ||
| "number": 0 | ||
| } | ||
| }, | ||
| { | ||
| "kind": "structFieldTypeNode", | ||
| "name": "dummyField", | ||
| "type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }, | ||
| "docs": [] | ||
| } | ||
| ] | ||
| }, | ||
| "name": "dummyAccount1", | ||
| "idlName": "DummyAccount1", | ||
| "docs": [], | ||
| "size": 9 | ||
| }, | ||
| { | ||
| "kind": "instructionArgumentNode", | ||
| "name": "discriminator", | ||
| "type": { | ||
| "kind": "numberTypeNode", | ||
| "format": "u32", | ||
| "endian": "le" | ||
| }, | ||
| "docs": [], | ||
| "defaultValue": { "kind": "numberValueNode", "number": 42 }, | ||
| "defaultValueStrategy": "omitted" | ||
| "kind": "accountNode", | ||
| "data": { | ||
| "kind": "structTypeNode", | ||
| "fields": [ | ||
| { | ||
| "kind": "structFieldTypeNode", | ||
| "name": "discriminator", | ||
| "type": { "kind": "numberTypeNode", "format": "u8", "endian": "le" }, | ||
| "docs": [], | ||
| "defaultValue": { | ||
| "kind": "numberValueNode", | ||
| "number": 1 | ||
| } | ||
| }, | ||
| { | ||
| "kind": "structFieldTypeNode", | ||
| "name": "dummyField1", | ||
| "type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }, | ||
| "docs": [] | ||
| }, | ||
| { | ||
| "kind": "structFieldTypeNode", | ||
| "name": "dummyField2", | ||
| "type": { "kind": "numberTypeNode", "format": "u64", "endian": "le" }, | ||
| "docs": [] | ||
| } | ||
| ] | ||
| }, | ||
| "name": "dummyAccount2", | ||
| "idlName": "DummyAccount2", | ||
| "docs": [], | ||
| "size": 17 | ||
| } | ||
| ], | ||
| "discriminators": [ | ||
| ], | ||
| "instructions": [ | ||
| { | ||
| "kind": "fieldDiscriminatorNode", | ||
| "name": "discriminator", | ||
| "offset": 0 | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "kind": "instructionNode", | ||
| "name": "instruction4", | ||
| "optionalAccountStrategy": "programId", | ||
| "docs": ["Testing instructions with arguments only"], | ||
| "accounts": [], | ||
| "arguments": [ | ||
| "kind": "instructionNode", | ||
| "name": "instruction1", | ||
| "optionalAccountStrategy": "programId", | ||
| "docs": ["Testing instructions with no accounts or arguments"], | ||
| "accounts": [], | ||
| "arguments": [], | ||
| "remainingAccounts": [] | ||
| }, | ||
| { | ||
| "kind": "instructionArgumentNode", | ||
| "name": "myArgument", | ||
| "type": { | ||
| "kind": "numberTypeNode", | ||
| "format": "u64", | ||
| "endian": "le" | ||
| }, | ||
| "docs": [] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "kind": "instructionNode", | ||
| "name": "instruction5", | ||
| "optionalAccountStrategy": "programId", | ||
| "docs": ["Testing instructions with optional arguments only"], | ||
| "accounts": [], | ||
| "arguments": [ | ||
| "kind": "instructionNode", | ||
| "name": "instruction2", | ||
| "optionalAccountStrategy": "programId", | ||
| "docs": ["Testing instructions with remaining accounts only"], | ||
| "accounts": [], | ||
| "arguments": [], | ||
| "remainingAccounts": [ | ||
| { | ||
| "kind": "instructionRemainingAccountsNode", | ||
| "value": { | ||
| "kind": "argumentValueNode", | ||
| "name": "remainingAccounts" | ||
| }, | ||
| "isOptional": true, | ||
| "isSigner": false | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "kind": "instructionArgumentNode", | ||
| "name": "myArgument", | ||
| "type": { | ||
| "kind": "numberTypeNode", | ||
| "format": "u64", | ||
| "endian": "le" | ||
| }, | ||
| "defaultValue": { "kind": "numberValueNode", "number": 42 }, | ||
| "docs": [] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "kind": "instructionNode", | ||
| "name": "instruction6", | ||
| "optionalAccountStrategy": "programId", | ||
| "docs": ["Testing instructions with accounts only"], | ||
| "accounts": [ | ||
| "kind": "instructionNode", | ||
| "name": "instruction3", | ||
| "optionalAccountStrategy": "programId", | ||
| "docs": ["Testing instructions with discriminator only"], | ||
| "accounts": [], | ||
| "arguments": [ | ||
| { | ||
| "kind": "instructionArgumentNode", | ||
| "name": "discriminator", | ||
| "type": { | ||
| "kind": "numberTypeNode", | ||
| "format": "u32", | ||
| "endian": "le" | ||
| }, | ||
| "docs": [], | ||
| "defaultValue": { "kind": "numberValueNode", "number": 42 }, | ||
| "defaultValueStrategy": "omitted" | ||
| } | ||
| ], | ||
| "discriminators": [ | ||
| { | ||
| "kind": "fieldDiscriminatorNode", | ||
| "name": "discriminator", | ||
| "offset": 0 | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "kind": "instructionAccountNode", | ||
| "name": "myAccount", | ||
| "isWritable": true, | ||
| "isSigner": false, | ||
| "isOptional": false, | ||
| "docs": [] | ||
| } | ||
| ], | ||
| "arguments": [] | ||
| }, | ||
| { | ||
| "kind": "instructionNode", | ||
| "name": "instruction7", | ||
| "optionalAccountStrategy": "programId", | ||
| "docs": ["Testing instructions with optional accounts only"], | ||
| "accounts": [ | ||
| "kind": "instructionNode", | ||
| "name": "instruction4", | ||
| "optionalAccountStrategy": "programId", | ||
| "docs": ["Testing instructions with arguments only"], | ||
| "accounts": [], | ||
| "arguments": [ | ||
| { | ||
| "kind": "instructionArgumentNode", | ||
| "name": "myArgument", | ||
| "type": { | ||
| "kind": "numberTypeNode", | ||
| "format": "u64", | ||
| "endian": "le" | ||
| }, | ||
| "docs": [] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "kind": "instructionNode", | ||
| "name": "instruction5", | ||
| "optionalAccountStrategy": "programId", | ||
| "docs": ["Testing instructions with optional arguments only"], | ||
| "accounts": [], | ||
| "arguments": [ | ||
| { | ||
| "kind": "instructionArgumentNode", | ||
| "name": "myArgument", | ||
| "type": { | ||
| "kind": "numberTypeNode", | ||
| "format": "u64", | ||
| "endian": "le" | ||
| }, | ||
| "defaultValue": { "kind": "numberValueNode", "number": 42 }, | ||
| "docs": [] | ||
| } | ||
| ] | ||
| }, | ||
| { | ||
| "kind": "instructionNode", | ||
| "name": "instruction6", | ||
| "optionalAccountStrategy": "programId", | ||
| "docs": ["Testing instructions with accounts only"], | ||
| "accounts": [ | ||
| { | ||
| "kind": "instructionAccountNode", | ||
| "name": "myAccount", | ||
| "isWritable": true, | ||
| "isSigner": false, | ||
| "isOptional": false, | ||
| "docs": [] | ||
| } | ||
| ], | ||
| "arguments": [] | ||
| }, | ||
| { | ||
| "kind": "instructionAccountNode", | ||
| "name": "myAccount", | ||
| "isWritable": true, | ||
| "isSigner": false, | ||
| "isOptional": true, | ||
| "docs": [] | ||
| "kind": "instructionNode", | ||
| "name": "instruction7", | ||
| "optionalAccountStrategy": "programId", | ||
| "docs": ["Testing instructions with optional accounts only"], | ||
| "accounts": [ | ||
| { | ||
| "kind": "instructionAccountNode", | ||
| "name": "myAccount", | ||
| "isWritable": true, | ||
| "isSigner": false, | ||
| "isOptional": true, | ||
| "docs": [] | ||
| } | ||
| ], | ||
| "arguments": [] | ||
| } | ||
| ], | ||
| "arguments": [] | ||
| } | ||
| ], | ||
| "definedTypes": [], | ||
| "errors": [], | ||
| "name": "dummy", | ||
| "prefix": "", | ||
| "publicKey": "Dummy11111111111111111111111111111111111111", | ||
| "version": "3.0.1", | ||
| "origin": "shank" | ||
| ], | ||
| "definedTypes": [], | ||
| "errors": [], | ||
| "name": "dummy", | ||
| "prefix": "", | ||
| "publicKey": "Dummy11111111111111111111111111111111111111", | ||
| "version": "3.0.1", | ||
| "origin": "shank" | ||
| }, | ||
| "additionalPrograms": [], | ||
| "standard": "codama", | ||
| "version": "1.0.0" | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.