This is a Layer 3 domain constraint reference for building ML/AI applications in Rust. It maps ML requirements like memory efficiency and GPU utilization directly to Rust patterns, showing you why batching matters for GPUs, when to use tract versus candle versus tch-rs, and how to avoid copying giant tensors around. The code samples are practical: inference servers with OnceLock for model singletons, batched prediction pipelines, and async data loading to keep GPUs fed. It's narrow in scope but information-dense, assuming you already know the Layer 1 and Layer 2 fundamentals and just need the ML-specific constraints translated into concrete Rust decisions.

skills.sh installs
3K
GitHub stars
1.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add actionbook/rust-skills --skill domain-ml --agent claude-code

Installs into .claude/skills of the current project.

Files

Machine Learning Domain

Layer 3: Domain Constraints

Domain Constraints → Design Implications

Domain RuleDesign ConstraintRust Implication
Large dataEfficient memoryZero-copy, streaming
GPU accelerationCUDA/Metal supportcandle, tch-rs
Model portabilityStandard formatsONNX
Batch processingThroughput over latencyBatched inference
Numerical precisionFloat handlingndarray, careful f32/f64
ReproducibilityDeterministicSeeded random, versioning

Critical Constraints

Memory Efficiency

RULE: Avoid copying large tensors
WHY: Memory bandwidth is bottleneck
RUST: References, views, in-place ops

GPU Utilization

RULE: Batch operations for GPU efficiency
WHY: GPU overhead per kernel launch
RUST: Batch sizes, async data loading

Model Portability

RULE: Use standard model formats
WHY: Train in Python, deploy in Rust
RUST: ONNX via tract or candle

Trace Down ↓

From constraints to design (Layer 2):

Sponsors

Details

Repository
github.com/actionbook/rust-skills
Categories
Data Science & ML, Rust
First seen
Jun 3, 2026

More from actionbook/rust-skills

All 38
1anthropics avatarcontact-researchanthropics/knowledge-work-pluginsResearch a specific person using Common Room data. Triggers on 'who is [name]', 'look up [email]', 'research [contact]', 'is [name] a warm lead', or any contact2.9Kskills.sh installs
2bytedance avatargithub-deep-researchbytedance/deer-flowConduct multi-round deep research on any GitHub Repo. Use when users request comprehensive analysis, timeline reconstruction, competitive analysis, or in-depth 2.9Kskills.sh installs
3deanpeters avatarepic-hypothesisdeanpeters/product-manager-skillsFrame an epic as a testable hypothesis with target user, expected outcome, and validation method. Use when defining a major initiative before roadmap, discovery2.9Kskills.sh installs
4nvidia avataraiq-researchnvidia/skillsUse when asked to run deep research or AI-Q research through a reachable NVIDIA AI-Q Blueprint backend.2.9Kskills.sh installs
5nexu-io avatarswiss-user-research-video-templatenexu-io/open-designSwiss-style user-research narrative template in warm-paper editorial aesthetics. Use when users ask for a premium research deck or story-first live artifact wit2.9Kskills.sh installs
6phuryn avatardummy-datasetphuryn/pm-skillsGenerate realistic dummy datasets for testing with customizable columns, constraints, and output formats (CSV, JSON, SQL, Python script). Use when creating test2.8Kskills.sh installs