JSweet vs Transcrypt
JSweet
jsweet.orgTranscrypt
transcrypt.orgSide by side
| Figure | JSweet | Transcrypt |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | Yes | — |
| Web | Yes | Yes |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| iOS | Yes | — |
| Android | Yes | — |
| API | Yes | — |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 1 |
| Spec score · Code Transpilers | 8.7 (#1) | 8.0 (#9) |
| Debugging | A debug mode is provided for debugging Java code in a browser. | Transcrypt provides multi-level source maps so developers can debug generated JavaScript from Python source code. |
| Integrations | The project lists Eclipse, Maven, and Gradle plugins, and names Angular, Cordova, Node.js, and Three.js among example integrations. | The examples page includes integrations or demos involving jQuery, React, Fabric.js, D3.js, Plotly.js, and Riot. |
| JavaScript interoperability | Generated output is ordinary JavaScript intended to interoperate directly with JavaScript code and libraries. | Transcrypt applications can use JavaScript libraries and browser DOM functions. |
| Language features | Its listed features include Java-to-TypeScript syntax mapping, Java constructs, async/await, and ECMAScript targets from ES3 to ES6. | Listed features include multiple inheritance, async/await, comprehensions, modules, optional static type checking, source maps, and built-in minification. |
| What it does | JSweet transpiles Java source into TypeScript and JavaScript for browser, mobile-webview and Node.js applications. | Transcrypt compiles a fairly extensive subset of Python into compact, readable JavaScript. |
Plans
In their own words
JSweet
JSweet converts Java programs into TypeScript and JavaScript for browsers, mobile Web views, or Node.js. It uses Oracle's Java compiler alongside Microsoft's TypeScript compiler to generate type-checked JavaScript. The project describes the output as regular JavaScript that can work directly with JavaScript programs and libraries. Listed language features include Java-to-TypeScript syntax mapping, Java constructs, async/await, and ECMAScript targets from ES3 to ES6. JSweet lists support for more than 1,000 JavaScript libraries, frameworks, and plugins, packaged as Maven artifacts called candies. It provides Eclipse, Maven, and Gradle plugins, and names Angular, Cordova, Node.js, and Three.js among example integrations. Generated programs can use CommonJS, AMD, or UMD modules and run in browsers or Node.js. A debug mode supports debugging Java code in a browser. Setup instructions call for Git, Node.js, and Maven, then use Maven to generate JavaScript from a quickstart project. JSweet is open source and free, and is presented for Java developers building web and mobile HTML5 applications with JavaScript libraries and frameworks.
Transcrypt
Transcrypt compiles Python source code into JavaScript for browser applications. It converts a substantial subset of Python into JavaScript 6, with optional minification, and supports features including multiple inheritance, async/await, comprehensions, and modules. Developers can call JavaScript functions from Python and use browser DOM functions and JavaScript libraries. The distribution includes optional static type validation and consistency checks, plus multilevel source maps for tracing generated JavaScript back to the original Python. Transcrypt can also compile Python server code for Node.js and use Node libraries with require(). The project recommends installing it as a Python package with pip and documents testing on Windows, Linux, and OSX. Its focus is browser development and JavaScript libraries rather than desktop Python libraries. Because code is precompiled, Python exec and eval are unsupported, although JavaScript eval is supported. C and C++ libraries are not directly supported for browser use without special measures such as compiling them to asm.js. Transcrypt is free and open source under Apache 2.0.