Quick Install
The easiest way to install Porffor is via npm:porf command globally, making it available from anywhere on your system.
Verify Installation
After installation, verify that Porffor is working correctly:0.61.10.
Development Setup
If you want to contribute to Porffor or use the latest development version, you can clone and build from source:Using Alternative Runtimes
You can run Porffor with different JavaScript runtimes:All three runtimes (Node.js, Deno, and Bun) are supported and should work seamlessly with Porffor.
Native Binary Compilation Setup
To compile JavaScript to native binaries, you’ll need a C compiler installed:Supported Compilers
Porffor supports multiple C compilers:- Clang (default, recommended)
- GCC
- Zig
Installing Compilers
Specifying Compiler
Choose your compiler when compiling to native binaries:Clang is the default compiler and generally provides the best optimization and compatibility.
Optional Parser Installation
Porffor uses Acorn as the default parser, but supports alternative parsers that are installed as optional dependencies:@babel/parser- Required for TypeScript supportmeriyahhermes-parseroxc-parser
--parser flag:
Troubleshooting
Command Not Found
If you get a “command not found” error after installation:- Make sure npm’s global bin directory is in your PATH
- Run
npm config get prefixto find your global install location - Add
<prefix>/binto your PATH environment variable
Permission Errors on Linux/macOS
If you encounter permission errors during installation:Native Compilation Errors
If native binary compilation fails:- Verify your C compiler is installed and in your PATH
- Try a different compiler using
--compiler=gccor--compiler=zig - Check the compiler output for specific error messages
Next Steps
Now that you have Porffor installed, learn how to use it:Quick Start Guide
Learn how to compile and run your first JavaScript program with Porffor