Skip to content

Conversation

@fernandodeluret
Copy link
Contributor

@fernandodeluret fernandodeluret commented May 8, 2025

Overview

The render now generates code needed to support proto feature of Vixen. Simplification of end-user API.

Changes

  • Generate rust sdk within the vixen since always required and able to remove top level config. You can access the rust SDK from the Vixen crate.
  • Support proto feature of Vixen.
  • Generate open telemetry traces for parsing
  • Handle more variants of IDL (primarily shank flavor).
  • Regenerate e2e parsers and re-test.
  • Expand unit test coverage based on changes to the render.

@changeset-bot
Copy link

changeset-bot bot commented May 8, 2025

🦋 Changeset detected

Latest commit: ec06b88

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@codama/renderers-vixen-parser Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@lorisleiva lorisleiva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a first pass on this PR, I can see this is a better approach than before. My main issue here is that this PR does way too much. It's tricky to review and make sure no bugs or misuse of the standard are being introduced.

Since this seems to add a new Codama to Protobuf generator, how would you feel about creating a @codama/renderers-protobuf package that only does this. Then you could use this package as a dependency for the vixen parser and only focus on the parts that are unique to vixen. Would that make sense or is the protobuf conversion too opinionated to be extracted as a generic tool?

@kespinola kespinola changed the title Add support to generate protobuf files and rust parsing logic for grpc stream server in renderers-vixen-parser Proto generation for Vixen Render May 19, 2025
Copy link
Contributor

@kespinola kespinola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this seems to add a new Codama to Protobuf generator, how would you feel about creating a @codama/renderers-protobuf package that only does this. Then you could use this package as a dependency for the vixen parser and only focus on the parts that are unique to vixen. Would that make sense or is the protobuf conversion too opinionated to be extracted as a generic tool?

@lorisleiva for now the proto is an extension of Vixen for its stream feature. There are likely pieces that could be isolated but don't want to split out too early. It is cool that this generates a proto def for the IDL that may be useful in other situations like a grpc based RPC stack that returns parsed results.

Overall, @lorisleiva all these changes are isolated to the renderers-vixen-parser and we have 10+ new parsers based on these updates so we are happy with its capabilities right now and would like to get a release out so we can update community and our docs.

@lorisleiva
Copy link
Member

Thanks for the update Kyle, I'm happy to get that merged if you guys are happy with the PR. Just need to get CI to green first and I'll approve. 🙏

@fernandodeluret
Copy link
Contributor Author

Thanks for the update Kyle, I'm happy to get that merged if you guys are happy with the PR. Just need to get CI to green first and I'll approve. 🙏

Thanks @lorisleiva! 🙏 This is done, just updated the branch and the tests. Also now that we have the shank discriminators merged in, I updated the e2e script here to showcase that here eeb0198#diff-b9cdaef35149142caeaf31a6606a6891e1c88d37cb45e2c240549810487c0fa9

Copy link
Contributor

@sonicfromnewyoke sonicfromnewyoke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall looks great to me.

if you don't mind, implementing the next changes, which are described in this solana-sdk-crate-migration-guide

this migration should drastically reduce compilation time and resulting binary size

@kespinola
Copy link
Contributor

overall looks great to me.

if you don't mind, implementing the next changes, which are described in this solana-sdk-crate-migration-guide

this migration should drastically reduce compilation time and resulting binary size

Great suggestions @sonicfromnewyoke and I agree with removing solana-program as a dependency. @fernandodeluret can you gather this info into a follow up issue for use to address. There is a mix requests for changes to the rust SDK and Vixen parser renderers.

Copy link
Member

@lorisleiva lorisleiva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I can see there are some ongoing comments but feel free to merge whenever you're happy with the state of the PR.

@kespinola kespinola enabled auto-merge (squash) May 22, 2025 18:11
@kespinola kespinola merged commit ab29a96 into codama-idl:main May 22, 2025
4 checks passed
@github-actions github-actions bot mentioned this pull request May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants