CrossLua Reader Development Guide
CommunityBuild safe, efficient plugins for Xteink X4 e-reader.
System Documentation
What problem does it solve?
Developing for the Xteink X4 e-reader requires navigating strict embedded hardware constraints (380KB RAM, no PSRAM, RISC-V alignment rules), adhering to precise C coding standards, and following safe SDK bridge patterns to avoid bricking devices or causing runtime instability, which is challenging for new contributors without a centralized guide.
Core Features & Use Cases
- Embedded C Development Rules: Enforces resource discipline (heap/stack safety, flash placement, fixed-point math) and RISC-V-specific safety protocols (alignment, IRAM usage, ISR shared state) tailored to the ESP32-C3 hardware powering the Xteink X4.
- Lua Plugin System Specifications: Defines the complete lifecycle, API binding patterns, and safety guardrails for building extensible e-reader features (readers, tools, services) that load from the SD card without modifying core firmware.
- HAL and Build Workflow Guidance: Provides clear patterns for hardware abstraction layer usage, PlatformIO build commands, and debugging techniques for heap/stack monitoring to streamline firmware and plugin development.
- Use Case: A developer can use this guide to build a custom RTL-aware Bible reader plugin for the Xteink X4 that handles Hebrew text reordering and stores reading progress on the SD card, without reflashing the core runtime.
Quick Start
Follow this development guide to write a compliant Lua plugin for the CrossLua Reader that adds a custom note-taking feature to your unlocked Xteink X4 e-reader.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: CrossLua Reader Development Guide Download link: https://github.com/dcherrera/CrossLuaReader/archive/main.zip#crosslua-reader-development-guide Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 537,000+ vetted skills library on demand.