{"library":"porffor","title":"Porffor","description":"An experimental from-scratch AOT JavaScript/TypeScript compiler that compiles to WebAssembly or native binaries. Current version 0.61.13, with rapid development. Unlike JIT-based engines, it is fully ahead-of-time compiled with zero runtime prelude, and generates Wasm without using Binaryen. It supports limited JS features and is a research project not intended for production use. Key differentiators: custom Wasm binary generation, sub- and super-set of JavaScript, and ability to compile to C via its 2c sub-engine.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install porffor"],"cli":{"name":"porffor","version":null}},"imports":["import Porffor from 'porffor'","import { compile } from 'porffor'","import type { CompileOptions } from 'porffor'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import Porffor from 'porffor';\n\nconst compiler = new Porffor();\nconst code = 'console.log(\"Hello, world!\");';\ntry {\n  const wasmBytes = await compiler.compile(code, { target: 'wasm' });\n  // wasmBytes is Uint8Array\n  console.log('Compilation succeeded, wasm size:', wasmBytes.length);\n} catch (err) {\n  console.error('Compilation failed:', err);\n}","lang":"typescript","description":"Demonstrates programmatic compilation of a JavaScript snippet to WebAssembly using Porffor's API.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}