Runestone is a performant plain text editor framework for iOS that provides code editing features including syntax highlighting, line numbers, and invisible character display.
The tool solves the problem of building a responsive code editor on iOS by leveraging GitHub's Tree-sitter parser to build syntax trees from code. This approach enables features that require understanding code structure, such as syntax highlighting and range highlighting. The framework is designed for speed, using Tree-sitter's incremental parsing and a line management strategy adapted from AvalonEdit to handle large documents efficiently. The README emphasizes that release-configuration builds are necessary to see the performance benefits from compiler optimizations.
Runestone suits developers building code editing applications for iPhone and iPad who need a feature-rich editor without building from scratch. The framework offers customization of colors and fonts, line wrapping toggles, adjustable line heights, page guides, and regular expression search. It automatically detects indentation style and line endings in files, and supports manual specification of line endings when inserting breaks. Catalyst support exists but is not fully tested or considered complete. The README does not compare the tool to alternatives.
The project accepts pull requests for bugfixes and new features that align with Runestone's vision and provide generally useful functionality. The framework is actively used in a companion Runestone app available on the App Store, demonstrating real-world application of the tool. Documentation is comprehensive and generated from Swift code using Apple's DocC compiler, with tutorials and getting-started guides available at the project's documentation site.