Adding a Rust-like memory ownership model to the classic C language
PDF
HTML
DOI

Keywords

C Language
Rust Language
Static analyzer

How to Cite

Costas Rodríguez, S. (2026). Adding a Rust-like memory ownership model to the classic C language. Ceres Journal, (2), 34–69. Retrieved from https://revistaceres.com/index.php/ceres/article/view/33

Abstract

RUST programming language is becoming an inter- esting alternative to C thanks to its memory ownership model, which allows to write safer code without a runtime system or a garbage collector. This increases the stability and speed without penalty in code size or CPU usage. Unfortunately, as a relatively new language, it forces developers to learn and master it before being able to take full advantage of such capabilities. In this paper we present a C static analyzer that allowsto implement some parts of thatsame memory ownership model in standard C code, allowing developers to create safer code (with less memory leaks and core dumps) without having to learn a new language or adding any kind of runtime code.

PDF
HTML
DOI

References

Matsakis, N. D. y Klock, F. S., II (2014). The rust language. Ada Lett., vol. 34, no. 3, pp. 103-104.

Mozilla Foundation. (s.f.). Mozilla foundation. https://foundation.mozilla.org

Rust Foundation. (s.f.). Rust foundation. https://rustfoundation.org

Anderson, B., Bergstrom, L., Herman, D., Matthews, J., McAllister, K., Goregaokar, M., Moffitt, J., y Sapin, S. (2015). Experience report: Developing the servo web browser engine using rust. CoRR, vol. abs/1505.07383. http://arxiv.org/abs/1505.07383

Redox Project. (s.f.). Redox project. https://www.redox-os.org/

Silicon Island Blog. (2016). Thoughts on DX: Gnome and rust. https://siliconislandblog.wordpress.com/2016/10/31/thoughts-on-dx-gnome-and-rust/

Mena, F. (s.f.). Federico mena section about rust. https://people.gnome.org/~federico/blog/tag/rust.html

De Icaza, M. (1997). Original mail from Miguel de Icaza about the Gnome project. https://mail.gnome.org/archives/gtk-list/1997-August/msg00123.html

GNOME Project. (s.f.). Vala - compiler using the GObject type system. https://wiki.gnome.org/Projects/Vala

GNOME Project. (s.f.). Vala's memory management explained. https://wiki.gnome.org/Projects/Vala/ReferenceHandling

Initial posts about librsvg's C to Rust conversion. (s.f.).

Thelin, J. (2007). Foundations of Qt Development. (J. Gilmore, Ed.). Apress.

GTK Project. (s.f.). GTK, the GIMP toolkit official website. https://www.gtk.org

Degener, J. (s.f.). ANSI C99 grammar, lex specification. http://www.quut.com/c/ANSI-C-grammar-l-1999.html

Degener, J. (s.f.). ANSI C99 grammar, yacc specification. http://www.quut.com/c/ANSI-C-grammar-y-1999.html

Dijkstra, E. W. (1968). Letters to the editor: Go to statement considered harmful. Commun. ACM, vol. 11, no. 3, pp. 147-148.

Linux Kernel Mailing List. (2003). Linux kernel mailing list discussion about gotos in linux source code. http://koblents.com/Ches/Links/Month-Mar-2013/20-Using-Goto-in-Linux-Kernel-Code/

Turing, A. M. (1937). On computable numbers, with an application to the entscheidungsproblem. Proceedings of the London Mathematical Society, vol. s2-42, no. 1, pp. 230-265.

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Copyright (c) 2026 Ceres Journal