Build and try

Run Fe on your Mac.在 Mac 上运行 Fe。

Build the native macOS app or terminal editor from a clean checkout.

从干净检出构建原生 macOS 应用或终端版。

Before you build

Use an Apple silicon Mac with Rustup, Python 3.9+, GNU awk, GNU Texinfo and pkg-config. For Cocoa bundling, use Xcode with Icon Composer support. The repository pins its Rust toolchain.

Follow the bootstrap guide for dependency details. Both builds generate resources from the checked-in sources.

Select the pinned Tree-sitter SDK

Run from the repository root. The install command prepares a separate prefix for Tree-sitter 0.27.1.

export FEMACS_TREE_SITTER_PREFIX="$PWD/build/tree-sitter-sdk"
python3 tools/toolchain-pins.py install --prefix "$FEMACS_TREE_SITTER_PREFIX"
export PKG_CONFIG_PATH="$FEMACS_TREE_SITTER_PREFIX/lib/pkgconfig"
pkg-config --modversion tree-sitter

Build and launch

Build and run the Cocoa app

Start with a clean profile using -Q.

cargo run -p xtask -- build-macos
dist/macos/Femacs.app/Contents/MacOS/Femacs -Q

Build and run the terminal editor

Launch inside your terminal without loading personal configuration.

cargo run -p xtask -- build-terminal
build/terminal/port/src/emacs -Q -nw

Verify existing builds

Build both products before running local acceptance. Choose a fresh result directory.

python3 tools/local-acceptance.py --out build/acceptance/local-run

Use the command-line launchers

After building or installing the Cocoa app, install the prebuilt launchers via npm, Homebrew (liuchong/tap/femacs), install.sh, or from crates.io. They use the app bundle in an Applications folder or the bundle selected by FEMACS_APP.

femacs passes all arguments directly to Fe. fe starts with a clean terminal preset. Use -1 for one file per session or -R to discard earlier arguments and the preset. fe --help lists these options before the macOS editor help, which shows the installed executable path.

Install and try

brew install liuchong/tap/femacs
# or: npm install -g femacs
# or: cargo install femacs --locked
femacs notes.org
fe -1 a.txt b.txt
fe -R -nw notes.org

From a source checkout, use cargo install --locked --path cli instead. See the command-line launcher guide.

Install standalone elisp CLI (v0.0.1)

To run scripts, use an interactive REPL, or embed No-GIL Lisp in Rust without building the Cocoa editor, install via Homebrew (brew install liuchong/tap/elisp), npm (npm install -g femacs), install.sh, or Cargo (elisp / lisp).

Standalone Lisp CLI

curl -fsSL https://femacs.com/install.sh | sh -s -- --only elisp
# or: brew install liuchong/tap/elisp  |  npm install -g femacs  |  cargo install elisp
elisp eval '(+ 20 22)'
elisp repl

See the Standalone Lisp & CLI guide for feature flags, pure-Rust std/* modules, and embedding examples.

Bundle and test

See the packaging guide for a movable app and local disk image. Local trial packages are ad hoc signed. See the testing guide for when to run Cocoa, input method and compatibility checks.