Project Title: Rust Samples
One-liner: New Implementation of NCD.L1–samples using Rust and Near-sdk-rs
Project Summary: : Each NCD.L1–samples projects should have branches with the same contract implemented using other programming languages. I’m currently working in creating a “near-sdk-rs” version for each of the 10 samples.
Project Members: Lucas Lemos
Extra: Anyone good with rust or contracts wanting to help me finish this faster, contact me on discord On0n0k1#3800
Period: Jan 08 → Jan 31 (Brazil)
Week 2:
- “Thanks” repository, finished. link:
https://github.com/On0n0k1/NCD.L1.sample--thanks/tree/near-sdk-rs
- “Library” repository, finished.
https://github.com/On0n0k1/NCD.L1.sample--library/tree/near-sdk-rs
- “Promises” repository. Unfinished, didn’t send a pull request yet. Link:
https://github.com/On0n0k1/temporary_sample_promises
Week 3:
-
Art Demo repository, finished. Link:
https://github.com/On0n0k1/NCD.L1.sample--art-demo/tree/near-sdk-rs
-
Meme Museum repository has 2 contracts, meme and museum . Built the workspace for the contracts. meme contract is finished and tested. museum contract code is implemented, but unit tests still to be implemented. Link:
https://github.com/On0n0k1/NCD.L1.sample--meme-museum/tree/near-sdk-rs
- Currently, creating tests in rust for near-sdk-rs usually take 3 to 5 lines of code for each function call. Therefore, I started implementing a macro that would allow developers to run each function test in a single line of code, using the least amount of arguments needed. A macro like that would simplify testing and make it easier for learners to create their first rust contracts. After implementing the macro, will turn it into a unique module and send a pull request for near-sdk-rs. Then finish implementing museum unit tests.
Week 4:
- Studied
macro_rules
in rust. - Implemented the macro. Link:
https://github.com/On0n0k1/near-sdk-rs/commit/cd833c592b8b7c89973e3340eea68e9eb6396067
. - Tested the macro locally.
- Implemented documentation.
- Sent a pull request.
- Back to implementing samples projects into rust now.