Towards an End-to-End Metamodeling Approach Using Rust

Léo Olivier, Marcos Didonet Del Fabro, Chokri Mraidha, Sébastien Gérard · 2023

Domain-Specific Languages (DSLs) refer to specialized languages designed for specific application domains. Among DSL development frameworks, the Eclipse Modeling Framework (EMF) stands out as the most popular one. Its metamodel is Ecore and its code generator targets the Java language. Ecore's translation and subsets of EMF functionalities have been implemented for various languages. One language that arouses interest is Rust, thanks to its ability to produce reliable and secure programs that are energy efficient and executable in a variety of environments, including a web browser via WebAssembly. In this paper, we present an end-to-end metamodeling approach using Rust. Our solution integrates a code generator from Ecore to Rust and an interpreter for Ecore metamodels, which enables performing model manipulation operations (CRUD and serialization) within a Rust environment. We present a DSL of Behavioral Trees realized with our solution, allowing us to evaluate our approach and discuss the main advantages and challenges related to our methodology.

Read the paper · More papers on PaperTik