We Solana smart contract auditors from Ackee Blockchain have decided to create a Rust testing client for the popular Solana framework Anchor. I hope it’s exciting news for all Anchor developers who prefer Rust to Javascript. Let’s talk about the motivation for writing such client and then about the details.

Solana is an awesome Rust blockchain. The top Solana priority is performance. However the tradeoff for speed and universality of the Solana API is pretty low-level smart contract (aka Solana program) API. Fortunately there is the Anchor framework. It’s an opinionated framework designed to mitigate many issues caused by error-prone Solana API and to reduce the developer cognitive load and the number of needed non-business decisions (e.g. choosing the most suitable account data encoding).

As a result a number of Solana projects based on Anchor is growing and we – auditors – have to adapt to this trend. And we want to be as efficient as possible to find all security issues and save our clients time and money. It means we need the best tooling for the job but the Solana eco-system and especially the Anchor’s one is super new so the required tools haven’t been developed yet. We decided to change that and the first step is writing the Rust testing client.

Anchor is able to generate Javascript/Typescript client program code. But I hope nobody wants to use Javascript where security, performance and reliability are priorities. Also the generated code doesn’t help you to start testing the Solana validator, deploy the program and run your scripts. The Rust testing client for Anchor will do all those things automatically for you. You can think of it as Brownie for Solana (for those who are familiar with Ethereum tooling). It’ll consist of a CLI tool and a library with test helpers and APIs for connecting various plugins. A fuzzer would be one of the plugins.

But the CLI tool and the library with helpers is only the beginning. I can imagine we can generate test scenarios and schemas from the Anchor IDL and program code. Or we can write a Rust/Wasm GUI layer for the client – basically Postman for Anchor/Solana on steroids. The project could also help us to remove the unnecessary Javascript layer and let us write Rust-only apps with Anchor. Let’s develop better decentralized apps together!

The Trdelnik client repository will be publicly accessible on GitHub when we think it’s ready for contribution or first users. Please join our Discord, follow us on Twitter or subscribe to blog posts to know when it’s published and to read other news from the blockchain world.

PS: You might ask – why Trdelnik? Well as we plan to write Brownie for Solana we looked for a similar name. Ackee Blockchain comes from Prague where the typical sweet everyone sells to tourists on the street is called Trdelnik. So we decided to accept it.