A from-scratch experimental ahead-of-time JS engine
Porffor is a unique JS engine/compiler/runtime, compiling JS code to WebAssembly or native ahead-of-time.
It is limited for now; intended for research, not serious use!
Wasm compilation
Porffor's WebAssembly output is much faster and smaller compared to existing JS -> Wasm projects. This is because Porffor compiles JS AOT instead of bundling an interpreter.
- Wasm size: 32x smaller than Javy (~1.3MB -> ~40KB)
- Wasm perf: 18x faster than Javy (~70m -> ~4m)
Native compilation
Due to compiling JS ahead-of-time, Porffor can compile to real native binaries without just packaging a runtime like existing solutions. This leads to:
- Binary sizes over 1000x smaller (~90MB -> <50KB)
- Memory usage over 40x less (~50MB -> ~1MB)
- Performance up to 3x faster
Plus...
Porffor is safe as it compiles to Wasm (and then native). It is also written in a memory safe language (JS).
Porffor is written from the ground-up with AOT in mind instead of being based on any existing JS engine. The only dependency is a JS parser.
Porffor supports TypeScript input, no clunky transpiler step needed: just feed it a TS file.