Make a bindings.h header file with the declarations, so that other projects can reuse the declared structs.

Add parseXMLString overload that supports passing in an MjVFS.

PiperOrigin-RevId: 940579266
Change-Id: I8294988bc4279e80795fab21024f64562a9e6743
This commit is contained in:
Google DeepMind
2026-06-30 11:55:24 -07:00
committed by Copybara-Service
parent e2d7955437
commit 095608ef5f
7 changed files with 7965 additions and 7813 deletions
+5 -2
View File
@@ -31,10 +31,13 @@ class BindingsDiffTest(absltest.TestCase):
self.generated_src = f.read()
self.template_path_cc = SCRIPT_DIR / 'templates/bindings.cc'
self.builder = binding_builder.BindingBuilder(self.template_path_cc)
self.builder = binding_builder.BindingBuilder()
generator_output = (
self.builder.set_enums().set_structs().set_functions().to_string()
self.builder.set_enums()
.set_structs()
.set_functions()
.build_string(self.template_path_cc)
)
self.assertEqual(
generator_output,