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.
Hey @akostylev0,
Thank you again for your great work!
I've noticed you've started to implement TL-B (de)serialization in
ton-types
crate lately. I have a proposal of using existingtoner
implementation for that. I had been working on it actively for last couple of months. I've actually used it for my personal project alongside withtonlibjson-client
and it was a great fit!Here is a PR that adds a new dependency for
toner
and illustrates how easy it can be to write Rust bindings for your smart-contracts and use already existing TL-B types and (de)serialization implementation written in a very modular and idiomatic way. In particular, it heavily utilizes Rust type system and allows to avoid writing wrapper types for (de)serialization thanks toBitPackAs
/BitUnpackAs
/CellSerializeAs
/CellDeserializeAs
traits (the idea was borrowed from serde_with crate)Please, ping me if you have any questions and feel free to add issues to toner repo.
PS:
toner
doesn't have an extensive documentation at the moment, but I'd be happy to add one, especially if you decide to use it in this project.Hope you'll find it useful!