You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m proposing a feature that involves integrating a C++ physics library with Lua and compiling the resulting code into WebAssembly (WASM). This integration will enable Lua scripts to utilize the functionalities of the C++ physics library and ensure that the code can run efficiently in a web environment.
This feature aims to enhance the usability of the physics library by integrating it into Lua scripts and expanding its reach to web applications through WASM32. The result will be a shared library for Lua and a WASM module for web deployment.
1. Create Lua Bindings for the C++ Physics Library
Objective: Develop Lua bindings for the existing C++ physics library to allow Lua scripts to access and use the library’s functionalities.
Tasks:
Use a Lua-C++ binding tool such as LuaBridge to create the bindings ( or write them manually ).
Expose key functions from the physics library to Lua.
Write wrapper functions to handle Lua’s garbage collection and memory management where necessary.
2. Compile the C++ Code and Lua Bindings into a Shared Library
Objective: Compile the C++ code and Lua bindings into a shared library (e.g., .so) that can be required by Lua scripts.
Tasks:
Ensure the shared library exports symbols visible to Lua.
Test the shared library by loading it in a Lua environment and verifying that functions can be called as expected.
3. Compile the Lua Files into WASM32
Objective: Compile the Lua scripts into WebAssembly 32 Bit (WASM32) format using the dev-cli to ensure compatibility with web environments.
Tasks:
Use the dev-cli toolchain for compiling Lua files into WASM32.
Test the resulting WASM module in a web environment to ensure correct functionality and performance.
Expected Outcome
Lua scripts should be able to seamlessly use the C++ physics library functions.
A shared library should be created that integrates well with Lua.
Lua files should compile successfully into WASM32 and function correctly in web environments.
Additional Information
The C++ physics library in question is JoltPhysics.
The Lua-C++ binding library to be used is LuaBridge.
Description
I’m proposing a feature that involves integrating a C++ physics library with Lua and compiling the resulting code into WebAssembly (WASM). This integration will enable Lua scripts to utilize the functionalities of the C++ physics library and ensure that the code can run efficiently in a web environment.
This feature aims to enhance the usability of the physics library by integrating it into Lua scripts and expanding its reach to web applications through WASM32. The result will be a shared library for Lua and a WASM module for web deployment.
1. Create Lua Bindings for the C++ Physics Library
2. Compile the C++ Code and Lua Bindings into a Shared Library
.so
) that can be required by Lua scripts.3. Compile the Lua Files into WASM32
dev-cli
to ensure compatibility with web environments.dev-cli
toolchain for compiling Lua files into WASM32.Expected Outcome
Additional Information
dev-cli
documentation can be found here.Benefits
The text was updated successfully, but these errors were encountered: