The Rust code uses CXX for bridging between C++ and Rust.
At the moment of writing, we only call Rust code from C++ and not vice versa.
-Additionally, the Rust Serde crate (and specifically Serde-YAML) is used to generatec code to handle YAML.
+Additionally, the Rust Serde crate (and specifically Serde-YAML) is used to generate code to handle YAML.
The entry point for code generation is `generate.py`, which uses `table.py` to produce C++, Rust and .rst files.
-See `generate.sh` for some details about the generation process.
+See `generate.py` for some details about the generation process.
This directory also contains a couple of `*-in.*` files which are included into files generated by the generation process.
From the C++ point of view, several namespaces are defined:
#
# For Rust it generates rust/src/lib.rs, containing the structs with
# CXX and Serde annotations and associated code. rust-preamble-in.rs is
-# included before the generated code and rus-bridge-in.rs inside the
+# included before the generated code and rust-bridge-in.rs inside the
# bridge module in the generated lib.rs. Header files generated by CXX
# (lib.rs.h and cxx.h) are copied from deep inside the generated code
# hierarchy into the rust subdir as well.
RUNTIME = '*runtime determined*'
def generate():
- """Read table, validate and generate C++, Rst and .rst files"""
+ """Read table, validate and generate C++, Rust and .rst files"""
srcdir = '.'
gendir = '.'
if len(sys.argv) == 3: