Cargo Features

[dependencies]
fresh-editor = { version = "0.2.14", default-features = false, features = ["plugins", "embed-plugins", "dev-bins", "runtime", "schema-only", "wasm", "tempfile"] }
default = embed-plugins, plugins, runtime

These default features are set whenever fresh-editor is added without default-features = false somewhere in the dependency tree.

plugins default embed-plugins

Enables ts-rs

TypeScript type generation from Rust structs

and fresh-parser-js, fresh-plugin-api-macros, and fresh-plugin-runtime

fresh-plugin-api-macros:

Plugin API proc macros for type-safe bindings

embed-plugins default = plugins

Embed plugins into the binary as a fallback when no disk plugins are found

Enables include_dir and trash

include_dir:

Embedded plugins support (optional)

Affects plugins::embedded

dev-bins

Feature for optional development binaries (generate_schema, event_debug)
Includes ratatui for theme type definitions needed by schema generation

Enables ratatui

ratatui with default-features=false is WASM-compatible (no crossterm backend)
Runtime feature adds the crossterm backend for native terminal rendering

Affects fresh-editor::view

Required by event_debug and generate_schema binaries

runtime default

Runtime feature includes all heavy dependencies needed for the actual editor

Enables sha2, tokio, tracing-subscriber, trash, ureq, and url, crossterm of ratatui and plist, portable-pty, and pulldown-cmark

plist:

plist for parsing/generating TextMate grammar files

and alacritty_terminal, arboard, async-trait, chrono, and clap

alacritty_terminal:

Terminal emulation (optional)

and crossterm, fresh-languages, ignore, libc, libloading, lru, lsp-types, nix, and open

crossterm:

Runtime dependencies (optional, enabled by "runtime" feature)

and default-syntaxes, default-themes, dump-create, dump-load, parsing, regex-onig and yaml-load of syntect

syntect with default-features=false so we can choose regex engine per build target runtime uses onig (faster), wasm uses fancy-regex (pure Rust, WASM-compatible)

Affects config::generate_dynamic_items, fresh-editor::config_io, fresh-editor::state, fresh-editor::workspace, fresh-editor::app, fresh-editor::input, fresh-editor::services, fresh-editor::client, fresh-editor::server, primitives::detected_language, primitives::highlight_engine, primitives::highlighter, primitives::indent, primitives::reference_highlighter, view::bracket_highlight_overlay, view::calibration_wizard, view::event_debug, view::file_browser_input, view::file_tree, view::keybinding_editor

Required by event_debug and fresh binaries

schema-only

GUI mode - native window with GPU-accelerated rendering via wgpu Schema-only feature for minimal builds (just schema generation)

wasm

WASM browser build - shared editor core without native dependencies Enables the same pure Rust modules as runtime but without platform-specific deps

Enables crossterm, plist, and ratatui, default-syntaxes, default-themes, dump-load, parsing, regex-fancy and yaml-load of syntect

Affects fresh-editor::wasm, primitives::ansi, primitives::ansi_background, primitives::visual_layout, primitives::grammar, primitives::highlight_types, primitives::indent_pattern, primitives::reference_highlight_text, primitives::textmate_engine, view::color_support, view::composite_view, view::conceal, view::controls, view::dimming, view::folding, view::margin, view::overlay, view::scroll_sync, view::soft_break, view::ui

Features from optional dependencies

tempfile implicit feature

Enables tempfile

tempfile:

A library for managing temporary files and directories