TRUST matters

April 2024

Rust-Proofing Future Programmers

Rust may conjure images of corrosion and decay, but in the world of programming, it’s anything but detrimental. In fact, it’s quite the opposite. Trust Lab recently hosted a two-day RUST Workshop in February exclusively for students of IIT Bombay, proving that rust can bring about excitement and innovation in the space of software development.

Led by Prof. Saravanan Vijayakumaran, this workshop introduced to budding programmers to the wonders of Rust, a language known for its performance, memory safety, and a touch of quirky charm.

Rust, unlike its oxidized namesake, has become a favorite of the tech world over the past decade. Its rise to fame is no accident, as it boasts developer-friendly features that make systems programming a breeze. From its expressive syntax to its extensive package ecosystem, automatic type inference, and convenient tools for building, testing, and packaging libraries, Rust has garnered a following among major tech companies like Microsoft, Amazon, and Google. It has been used to build diverse applications such as web servers, front-end frameworks, operating systems, databases, game engines, video encoders, and verifiable computation SDKs.

The Trust Lab workshop comprised two sessions, each lasting about two hours.

The first session provided an introduction to Rust, covering essentials such as variables, data types, functions, control flow, structures, generic types, traits, iterators, and project organization.

The second session was an introduction to bellpepper, a Rust-based library for expressing verifiable computation. This session began with a brief overview of arithmetic circuits, rank-1 constraint systems (R1CS), and proof systems for R1CS. Then, the various primitives in bellpepper were described followed by a code walk-through of the SHA256 gadget implementation. The session ended with a general strategy for writing and proving circuits using bellpepper.