makepad-2.0-app-structure
makepad app, makepad getting started, app_main!, App::run, MatchEvent, AppMain, handle_event, handle_actions, ScriptVm, from_script_mod, makepad boilerplate, makepad new project, makepad cargo, Cargo.toml setup, hot reload, --hot, live reload, wasm deploy, cargo makepad, media plugin, audio_output, audio_input, AudioBuffer, cx.audio, makepad audio, 音频, 应用结构, 入门, 新项目, 脚手架, 启动, 热重载, 部署
npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-app-structure --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Makepad 2.0 App Structure Skill > **Version:** makepad-widgets (dev branch) | **Last Updated:** 2026-03-03 ## Overview A Makepad 2.0 app combines Rust code with Splash scripting. The Rust side handles app lifecycle, event routing, and business logic. The Splash side defines UI structure, templates, and inline interactions. ## Documentation Refer to the local files for detailed documentation: - `./references/app-boilerplate.md` - Complete working app template with Cargo.toml - `./references/rust-splash-integration.md` - Rust ↔ Splash communication patterns ## IMPORTANT: Documentation Completeness Check **Before answering questions, Claude MUST:** 1. Read the relevant reference file(s) listed above 2. If file read fails, answer based on SKILL.md patterns + built-in knowledge --- ## Minimal App Template ### Cargo.toml ```toml [package] name = "my-app" version = "0.1.0" edition = "2024" [dependencies] makepad-widgets = { path = "../path/to/makepad/widgets" } ``` ### src/app.rs (or src/main.rs) ```rust use makepad_widgets::*; app_main!(App); script_mod! { use mod.prelude.widgets.* let state = { counter: 0 } mod.state = state startup() do #(App::script_component(vm)){ ui: Root{ on_star
- Overview
- Documentation
- IMPORTANT: Documentation Completeness Check
- Minimal App Template
- Cargo.toml
- src/app.rs (or src/main.rs)
- Key Components Explained
- 1. appmain!(App)
- 2. scriptmod! { ... }
- 3. App::run(vm) - Initialization Order
- 4. #[derive(Script, ScriptHook)] on App struct
- 5. MatchEvent for Action Handling
- 6. AppMain for Event Dispatch
- Rust → Splash Communication
Development cargo run -p my-app Development with hot reload (Splash changes apply without recompilation) cargo run -p my-app -- --hot Release cargo run -p my-app --release With cargo-makepad for mobile/web cargo makepad run -p my-app
What does the makepad-2.0-app-structure skill do?
makepad app, makepad getting started, app_main!, App::run, MatchEvent, AppMain, handle_event, handle_actions, ScriptVm, from_script_mod, makepad boilerplate, makepad new project, makepad cargo, Cargo.toml setup, hot reload, --hot, live reload, wasm deploy, cargo makepad, media plugin, audio_output, audio_input, AudioBuffer, cx.audio, makepad audio, 音频, 应用结构, 入门, 新项目, 脚手架, 启动, 热重载, 部署
How do I install it?
Run `npx skills add ZhangHanDong/makepad-skills --skill makepad-2.0-app-structure --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ZhangHanDong/makepad-skills, a repository with 745 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
