JSweet407 is a Java-to-JS transpiler implementation that builds upon Jsweet, adding support for Java concurrency features.
JSweet407 consists of two main components:
- Transpiler Extension
- JS Multithreading Runtime
ThreadclassRunnableinterfacesynchronizedkeyword- Thread methods from the standard library, such as:
joinsleep
The current design architecture also allows for the easy implementation of various lock classes from the Java standard library. Examples implemented in the project include:
ReentrantLockReadWriteLockStampedLock
The file technical-report.pdf in the root directory provides a detailed explanation of the project's design, architecture, implementation, and limitations, along with relevant data visualizations.
The example.mkv video file in the root directory demonstrates how to run this project using the compiled JAR package.
- JDK 16+
- TSC (TypeScript Compiler)
We provide a bash script run.sh to compile files and view the results.
- The script uses the precompiled JAR package in the
artifactsdirectory to compile files from theexamplefolder. - Note: Only one file should be placed in the
examplefolder at a time to avoid potential conflicts. - During execution,
run.shstores intermediate compilation results in thetsoutdirectory and copies the final compiled JavaScript code toruntime/src/compiled.js.
Users can view the execution results by accessing runtime/src/test.html through an HTTP server. For detailed steps, refer to the demo video example.mkv.
All test cases are located in the benchmark folder in the project root directory.
- Wenzhang Yang
- Junjie Zhong
- Lianzuo Wang
- Shiping Zhang
- Yuhang Ye
- Ao Chen