# Efficient Data Exchange between WebAssembly Modules
## 6 Conclusions and Future Work  
Karmem represents an innovation in data communication within WASM and demonstrates the ability to overcome challenges of efficiency and interoperability. This project developed its own IDL and an optimized communication protocol to facilitate interaction between WASM modules. Karmem contributes to WASM development by offering solutions for data communication between modules in different programming languages. The innovations have practical implications for distributed applications based on WASM, making them more efficient and interoperable. With the implementation of a code generator that supports multiple programming languages, Karmem mitigates one of WASM's inefficiencies. This paves the way for a wide range of applications, from games to complex systems. The main limitation faced by the project is the inherent complexity of supporting different programming languages and the need for continuous optimization to maintain security and efficiency. Therefore, future research should focus on enhancing security and performance and investigating the possibility of expanding to more programming languages. The impact of Karmem on WASM application development is significant and marks an important step toward more efficient and secure data interaction in constrained execution environments. However, there are additional aspects that require more in-depth study related to usability and testing. First, Karmem uses a custom IDL. Therefore, to improve the user experience, the Language Server Protocol (LSP) should be developed. It could greatly assist developers by providing features such as autocomplete, syntax highlighting, and error detection within Integrated Development Environments (IDEs). This would streamline the coding process and reduce errors, especially for those unfamiliar with KarmemIDL. Second, Karmem already uses continuous integration/continuous deployment (CI/CD) processes with tests written for both the code generator and individual language implementations. However, improving test coverage is crucial, especially because Karmem uses unsafe features, bypasses type protection, and uses type punning, which depends on the specific memory layout of each language. These techniques are often employed to enhance performance and usability, but we acknowledge that they introduce potential security risks. Continuous testing is not solely in response to updates in the Karmem source code, but it is also crucial for maintaining compatibility with evolving languages and compilers. Regular tests are conducted using known good, malicious, and malformed data to ensure that the system behaves as expected under various conditions. These tests are designed to verify that the guest does not read data out of bounds, modify read-only memory, or cause resource exhaustion. Additionally, they ensure that all modules are correctly initialized and mitigation techniques (timeouts, memory size limits) function as intended. Continuous fuzzing must be implemented to identify potential security vulnerabilities, and the usage of limited memory and WASM runtime can help identify issues previously described. Additionally, Karmem runtime relies on an existing WASM runtime, Karmem runtime is responsible for memory management mapping and invoking WASM functions. This separation of responsibilities reduces the attack surface by delegating complex execution tasks to a well-tested runtime, thereby minimizing the potential for vulnerabilities within Karmem itself. To facilitate quick experimentation with Karmem, a dedicated website will be developed. The existing code generator is already compatible with WASM, enabling users to generate code from IDL directly in the browser without the need for any additional software. At present, Karmem is a prototype that does not have all of its features implemented due to time constraints and the need for viability validation. Therefore, it is still necessary to implement all the features described in this document and review the existing implementations.