Skip to content

Comments

feat: Replaced generated code with stellar-xdr#17

Merged
bjorn merged 1 commit intoaurora-rs:masterfrom
bjorn:use-stellar-xdr
Nov 19, 2025
Merged

feat: Replaced generated code with stellar-xdr#17
bjorn merged 1 commit intoaurora-rs:masterfrom
bjorn:use-stellar-xdr

Conversation

@bjorn
Copy link
Collaborator

@bjorn bjorn commented Jun 14, 2025

Removed the dependencies xdr-rs-serialize and xdr-rs-serialize-derive, since serialization is already provided by stellar-xdr.

For compatibility reasons and convenience, the existing XDRSerialize and XDRDeserialize traits are now implemented on top of the WriteXdr and ReadXdr traits from stellar-xdr.

Added a bunch of new data types and enum values. Removed enum types where they added nothing beyond the same type in stellar-xdr. Not all new types have been wrapped. For example, the inner data of the new LedgerKey values instead refers directly to the types from the stellar-xdr crate. This can be changed when there is demand, but it seems futile to wrap all these types in verbose API and to keep this updated.

No support was added for Preconditions::V2 and TransactionExt::V1, both part of the new stellar_xdr_curr::Transaction type. When trying to convert transactions which use these values an UnsupportedFeature error is returned for now.

Closes #10

@bjorn
Copy link
Collaborator Author

bjorn commented Jun 14, 2025

@fracek I think I'm going a little crazy doing this change.

Removed the dependencies xdr-rs-serialize and xdr-rs-serialize-derive,
since serialization is already provided by stellar-xdr.

For compatibility reasons and convenience, the existing XDRSerialize and
XDRDeserialize traits are now implemented on top of the WriteXdr and
ReadXdr traits from stellar-xdr.

Added a bunch of new data types and enum values. Removed enum types
where they added nothing beyond the same type in stellar-xdr. No support
was added for Preconditions::V2 and TransactionExt::V1, both part of the
new stellar_xdr_curr::Transaction type. When trying to convert
transactions which use these values an UnsupportedFeature error is
returned for now.

Also, not all new types have been wrapped. For example, the inner data
of the new LedgerKey values instead refers directly to the types from
the stellar-xdr crate. This can be changed when there is demand, but it
seems futile to wrap all these types in verbose API and to keep this
updated.

Closes aurora-rs#10

Signed-off-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
@bjorn
Copy link
Collaborator Author

bjorn commented Nov 19, 2025

OMG, it compiles and all tests pass!

@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 209 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.53%. Comparing base (98f7202) to head (4f4279d).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/operations/invoke_host_function.rs 45.61% 31 Missing ⚠️
src/transaction.rs 51.61% 30 Missing ⚠️
src/claim.rs 25.00% 24 Missing ⚠️
src/operation_result.rs 78.84% 22 Missing ⚠️
src/crypto/signature.rs 63.82% 17 Missing ⚠️
src/asset.rs 60.52% 15 Missing ⚠️
src/transaction_result.rs 42.30% 15 Missing ⚠️
src/operations/revoke_sponsorship.rs 39.13% 14 Missing ⚠️
src/operations/change_trust.rs 43.75% 9 Missing ⚠️
src/operations/mod.rs 70.96% 9 Missing ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #17      +/-   ##
==========================================
- Coverage   65.77%   65.53%   -0.24%     
==========================================
  Files          43       45       +2     
  Lines        3795     3839      +44     
==========================================
+ Hits         2496     2516      +20     
- Misses       1299     1323      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bjorn bjorn merged commit 0c13858 into aurora-rs:master Nov 19, 2025
3 checks passed
@bjorn bjorn deleted the use-stellar-xdr branch November 19, 2025 19:57
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.

Try to use upstream xdrgen

1 participant