* chore: add CLAUDE.md * chore: pr feedback * chore: contributing guideline rules * chore: pr feedback (cherry picked from commit fc30140e6ec313c94405e7ca4fbab8096dc1c6c7)
1.2 KiB
1.2 KiB
native/AGENTS.md
Rust code compiled into the mobile app. crates/codecs holds the image decoders (one feature each), crates/native_core the shared logic, and crates/native_core_ffi the C ABI whose header cbindgen writes to include/native_core.h. native_core/ is the Flutter package with the build hook that compiles the crates from source and the ffigen bindings.
Rules
- Every
unsafeblock needs a// SAFETY:comment; clippy deniesundocumented_unsafe_blocksandmise //native:lintruns with-D warnings. - The release profile keeps unwinding because the FFI boundary relies on
catch_unwind; do not setpanic = "abort". - When a crate dependency changes, update
native_core/NOTICESwith its license.
Skills
- Build, test and lint:
mise //native:build,mise //native:test,mise //native:lint,mise //native:fmt. The toolchain is pinned incrates/native_core_ffi/rust-toolchain.tomlandmise.toml; keep them in sync. - Change the FFI surface: edit
crates/native_core_ffi, then runmise //mobile:codegen:nativeto rebuild the C header and regenerate the Dart bindings innative_core/lib/src/bindings.g.dart. The Flutter build recompiles the crates on the nextflutter run.