rust-polyglot-conventions

Solid

Rust conventions for a core that backs multiple language bindings: stable-edition tooling, typed Result errors with no panics in library paths, rustdoc with error docs, isolated unsafe, Send futures, FFI-friendly DTOs, and single-source version syncing. Load when writing or reviewing a Rust core exposed through polyglot bindings.

Data & Documents 137 stars 13 forks Updated today MIT

Install

View on GitHub

Quality Score: 84/100

Stars 20%
71
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
43
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

- Use the current stable Rust edition, `cargo fmt`, and `clippy -D warnings` for Rust core and binding crates. - Library code returns `Result<T, E>` with typed errors. Do not `unwrap`, panic, or exit in library paths. - Public APIs have rustdoc, error documentation, and examples that use `?` instead of `unwrap`. - Unsafe code has `SAFETY` comments and should be isolated behind small, tested abstractions. - Async public futures are `Send` where host runtimes may move them across threads. - Public DTOs that cross binding boundaries are FFI-friendly or have explicit binding-safe equivalents. - Keep binding-safe DTOs separate from integration-specific request and response types. - Avoid Rust-only API shapes that cannot be represented naturally in target languages. - Use one source of truth for version numbers and sync binding manifests from it during release.

Details

Author
Goldziher
Repository
Goldziher/ai-rulez
Created
1 years ago
Last Updated
today
Language
Go
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Solid

rust-conventions

Rust code conventions covering edition 2024, cargo fmt/clippy, Result-based error handling, unsafe discipline, async with tokio, API-guideline naming, trait implementations, benchmarking, and security scanning. Load when writing or reviewing Rust code.

137 Updated today
Goldziher
AI & Automation Listed

lang-rust

Use when writing or reviewing Rust (.rs) code or crates — idiomatic style, cargo fmt/clippy, Result/Option error handling (thiserror/anyhow), ownership/borrowing, minimal justified unsafe, and Rust's top safety/security pitfalls. Triggers on Cargo.toml/Cargo.lock, tokio, axum/actix projects.

1 Updated 2 weeks ago
StielChancellor
AI & Automation Listed

polyglot-core-standard

Enforce a strict, drift-free, AI-navigable standard for polyglot repos built around a shared native core (typically a Rust core) consumed by host languages (Swift, Kotlin, Python, …) through generated (UniFFI/cbindgen/protobuf) or hand-written (PyO3/JNI) bindings. It governs the seams between languages — not each language's internals, which it delegates to rust/swift/python- project-standard. The non-negotiables: one canonical core owns all shared logic + the data model; the cross-language contract is declared exactly once and bindings are derived, never hand-mirrored; the FFI boundary is the typed, fallible, parse-don't-validate seam and no panic ever crosses it; generated bindings are vendored artifacts excluded from gates while hand-written binding layers are governed core code; binding freshness is drift-guarded; one composed repo-level zero-warning gate runs every sub-tree's gate; the toolchain + binding-generator matrix is pinned; the AI provider seam lives in exactly one sub-tree; and a CLAUDE.md routi

1 Updated 2 weeks ago
VoldemortGin