# For C++ it generates cxxsettings-generated.cc containing support for old style
# settings plus conversion from old style to new style.
#
-# For Ruopenst it generates rust/src/lib.rs, containing the structs with
+# 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
# bridge module in the generated lib.rs. Header files generated by CXX
gendir = '.'
print(len(sys.argv))
if len(sys.argv) == 3:
- print("using ARGS!")
+ print("Using srcdir and gendir from argumens")
srcdir = sys.argv[1]
gendir = sys.argv[2]
- print("cwd: " + os.getcwd())
- print("srcdir: " + srcdir + " = " + os.path.realpath(srcdir))
- print("gendir: " + gendir + " = " + os.path.realpath(gendir))
+ print("Generate cwd: " + os.getcwd())
+ print("Generate srcdir: " + srcdir + " = " + os.path.realpath(srcdir))
+ print("Generate gendir: " + gendir + " = " + os.path.realpath(gendir))
#os.makedirs(gendir + '/rust/src', exist_ok=True)
# read table
dupcheck1[entry['oldname']] = True
dupcheck2[entry['section'] + '.' + entry['name']] = True
# And generate C++, Rust and docs code based on table
+ # C++ code goes int build dir
gen_cxx(gendir, entries)
+ # Generate Rust code into src dir, as I did not manage to figure out the Cargo stuff
+ # with mixed sources both in build and src dir
gen_rust(srcdir, entries)
# Avoid generating doc files in a sdist based build
if os.path.isdir('../docs'):