Proposal: add Greenfield Rust SDK to BNBchain/awesome

note: as a newbie in here i cant add more than two links in the post. so original post with all links on my github

Hey BNBChain Community!

I hope you’re doing well. I’m reaching out to propose the addition of the Greenfield Rust SDK Proto to the awesome BNBChain. As a part of the bnb hackathon we had a task to write Greenfield-cmd in any different language other than GO for obvious reasons. We as a team of full Gopher devs decides to rewrite it in Rust with some benefits in mind like improved reliability, safety, performance, and also what is more important get experience with rust.
We’ve noticed that while there is Greenfield SDKs writen in GO and JavaScript, there’s no Rust SDK available yet. We spent a LOT of time to try figure out how to AVOID rewriting Greenfield SDK and cosmos SDK to rust by hands for our task specifically. We wasted so much time on that problem so not many time left to do main task… any way at the end we did build Protobufs defined by the greenfield SDK and proof it’s working in our project Greenfield Rust CMD (our project is not complete yet)… but anyone already can use Greenfield-Rust-SDK easy just by importing it in your project as a dependency inside cargo.toml file:

greenfield-sdk-proto = { git = "", branch = "main" }

I just wanted to add Greenfield Rust SDK Proto so other junior/mid devs can easily find solution and spent more time on building dapps on rust.
I did a PR to github/bnb-chain/awesome two weeks ago but main contributor of that repo is not active anymore… i went to discord BNBchain/dev-support and I was told to do a proposal here…

So can anyone help me to add our project to the awesome list if its worse it? or any advice?

Let’s make the BNBChain community even more awesome with Rust!


Thank you for your contribution. The github/bnb-chain/awesome repository is no longer maintained. We will review your code, which may take some time. After the review, we can reference your provided Rust SDK in our official documentation.

Hello @ive663, thank you for sharing your progress with your Rust implementation of Greenfield SDK.

From what I was able to see (GitHub - ive663/ChainSauce_task1 and GitHub - KRakenoZavr/greenfield-sdk-rust-v2: Rust crate for interacting with Protobufs defined by the greenfield SDK) you are working in two different tools.

  1. Greenfield Rust Protobuf: It’s worth noting that this isn’t a full SDK, as it lacks much of the required functionality. Instead, it’s simply the Rust code generated from protobuf.

  2. Greenfield Rust CMD: This component operates on top of the Rust greenfield protobuf to send calls only to the Tendermint RPC.

1 ) Regarding the Greenfield Rust Protobuf, it serves as a promising initial step, but it does not constitute a complete greenfield SDK since it lacks connectivity to the blockchain node and storage provider service.

You should aim to develop a Greenfield Rust SDK on top of this protobuf rust generated code. Also keep in mind that the Greenfield Rust SDK needs to connect to the Storage Provider API as well.

Additionally, the project could benefit from clear indications regarding which version of greenfield the protos files are targeted at or compatible with (e.g., greenfield v0.2.1, v0.2.2-alpha.2), especially given that protobuf files often change with each new version.

Some of the protos generated are not needed. Others are might be missing.

→ Actions required: Update and enhance content. Add proto files, not just the builded ones. Add documentation on how to build the rust code from the proto files.

2 ) Turning to the Rust greenfield CMD, it mirrors our go greenfield cmd, but with a missing connection to the storage provider.

Rather than directly implementing the code from the greenfield-go-sdk, you should initially create a greenfield-rust-sdk as mentioned before. And then import this package into the greenfield-rust-cmd, similar to the greenfield-cmd strategy that imports the greenfield-go-sdk.

→ Actions required: Address incorrect implementation by creating a correct sdk prior to the cmd, fix broken elements, and conduct further development, implement storage provider interactions as well.

With the current state of development it’s not advisable to link to your work/tools.

We could collaborate together further on to implement these rust packages for greenfield, but there is still tons of work to do.

Hello @urbano and @Keefe
thanks for your in-depth review and blueprint of what should be done.
will come back when more work done for further discussion.