[Report] Implementation of NCD.L1--samples projects from Assemblyscript to Rust (Jan 24 -> Jan 31, 2022)

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 24 → Jan 31 (Brazil)

The following list are the results obtained by me:

  • Currently, creating tests in rust for near-sdk-rs usually take 3 to 5 lines of code for each function call. Therefore, I finished 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.
  • 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.