Consolidate WASM bindings into a single C++ file.

PiperOrigin-RevId: 827850819
Change-Id: I23e099d4e72557d79354339953246ac4eeee7ca3
This commit is contained in:
Matija Kecman
2025-11-04 01:36:22 -08:00
committed by Copybara-Service
parent 7d7648f7ed
commit 10130297c0
9 changed files with 6969 additions and 7111 deletions
+1 -1
View File
@@ -420,7 +420,7 @@ MJDATA_SIZES = [
]
# Dictionary where keys are the struct names and the values are lists of the
# fields that are manually specified in the structs.h template file.
# fields that are manually specified in the bindings.cc template file.
MANUALLY_ADDED_FIELDS_FROM_TEMPLATE = {
# go/keep-sorted start
"MjData": ["solver", "timer", "warning", "contact"],
@@ -77,7 +77,8 @@ def _build_struct_header_internal(
builder.line("")
builder.line("private:")
builder.line(f"{struct_name}* ptr_;")
builder.line("bool owned_ = false;")
if not is_mjs:
builder.line("bool owned_ = false;")
if is_mjs and fields_with_init:
builder.line("")