TranspileJS, an Intelligent Framework for Transpiling JavaScript to WebAssembly
WebAssembly (Wasm) has emerged as a powerful binary format, enabling the seamless integration of languages like C and Rust into web applications. JavaScript (JS), the dominant language for client-side web development, has its code susceptible to tampering and intellectual property theft due to its transparency in browser environments. We introduce TranspileJS, a novel tool designed to enhance code security by automatically selecting and translating JS snippets into Wasm. TranspileJS leverages a multi-stage architecture that converts JS to TypeScript, which is compiled into Wasm using the AssemblyScript compiler. TranspileJS addresses the challenges posed by the fundamental differences between JS and Wasm, including dynamic typing, runtime behaviour mismatches, and standard library discrepancies, ensuring that the original behaviour of the code is preserved while maximising the amount of code transpiled. Our experiments show that TranspileJS successfully transpiles approximately one-third of the code in our dataset, with a performance impact of up to a 12.3% increase in execution time. The transpilation process inherently obfuscates code, creating effects similar to standard obfuscation techniques, and generates a stealthy and resilient output. Furthermore, combining transpilation with WebAssembly-specific obfuscation techniques opens new possibilities for code protection and resistance against reverse engineering.
Thu 12 JunDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
13:30 - 15:00 | SLE Session 2: Language and Framework DesignSLE 2025 at M 001 Chair(s): Elizabeth Scott Royal Holloway University of London | ||
13:30 22mTalk | A Model-Driven Approach to Design, Generation, and Deployment of GUI Component Libraries SLE 2025 Arkadii Gerasimov RWTH Aachen University, Nico Jansen Software Engineering, RWTH Aachen University, Judith Michael University of Regensburg, Bernhard Rumpe RWTH Aachen University, Sebastian Will RWTH Aachen Link to publication DOI | ||
13:52 22mTalk | TranspileJS, an Intelligent Framework for Transpiling JavaScript to WebAssembly SLE 2025 José Pedro Ferreira University of Porto, Portugal, João Bispo Faculdade de Engenharia e Universidade do Porto, Susana Lima | ||
14:15 22mTalk | Optimal Language Design is Hard: A Case Study in ECMAScript (JavaScript) Standardization SLE 2025 Philipp Riemer Leipzig University, Yury Nikulin University of Turku, Ashley Claymore , Mikhail Barash University of Bergen | ||
14:37 22mTalk | AnyText: Incremental, left-recursive Parsing and Pretty-Printing from a single Grammar Definition with first-class LSP support SLE 2025 Georg Hinkel RheinMain University of Applied Sciences, Wiesbaden, Germany, Alexander Hert RheinMain University of Applied Sciences, Wiesbaden, Germany, Niklas Hettler RheinMain University of Applied Sciences, Wiesbaden, Germany, Kevin Weinert RheinMain University of Applied Sciences, Wiesbaden, Germany |