Implementing Rust Language Algorithms for Image Processing

View at publisher
Authors: Eric P. Lam, Christopher Leung, Isaam Khan, Hanh Nguyen, John Teano, Nelly Dzul Chi
Cited by: 0

Abstract

Rust, a relatively young programming language when compared to other languages like C/C++, Ada, and FORTRAN, began its main focus on memory safety. The preferred approach is to use “safe” programming languages that can reject unsafe programs at compile time, thereby preventing the emergence of memory safety issues. After more than two decades of grappling with memory safety issues in C and C++, the software engineering community found that using bug-finding tools is time-consuming. Finding memory leaks using bug-finding tools can take away time that can otherwise be used for new code development. The safety of the Rust is due to its ability to prevent errors like buffer overflows and integer number overrun. Rust’s ownership-based system determines memory allocations/de-allocation at compile time, thus improving run-time performance. While programming languages like C/C++ and Java have mechanisms for management memory, Rust’s ownership system prevents programming errors such as use of a variable after memory de-allocation operations. Over time, Rust’s advantages would outweigh its learning curve due to its reduced number of run-time errors. Run-time errors are costly due to the debugging time that is required to understand the problem. In this paper, we present the lessons learned during our conversion of common algorithms used image and computer vision from C/C++ code to Rust. Our team consisted of experienced software engineers with various backgrounds in C/C++ and Java, which are currently taught at the university level for engineering and science majors. We conducted a study to translate a given set of C code to safe Rust code. We highlight the lessons learned during this translation effort.

Fields of Study & Subjects

Logic programming and type systems Parallel Computing and Optimization Techniques Software Engineering Research

Publication details

Journal / source
AIAA SciTech Forum
Publication date
8 January 2026