Instruction File Name
rust.instructions.mde
Scope
File-level (applies to specific file type)
Purpose
Summary
Add comprehensive Rust coding conventions to the coding-standards/ collection, following the same structure and depth as the existing C# instructions (coding-standards/csharp/).
Motivation
Rust is used across multiple projects for edge AI services, WASM operators, telemetry pipelines, and IoT connectors. A shared set of conventions ensures consistency, reduces review friction, and gives Copilot the context it needs to generate idiomatic code. The C# instructions already demonstrate value here — Rust deserves the same treatment.
Proposed Files
| File |
Location |
Purpose |
rust.instructions.md |
.github/instructions/coding-standards/rust/ |
Core Rust conventions (naming, error handling, async, observability, serialization, testing, etc.) |
Requirements
Scope
The instructions cover:
- Project structure and crate layout conventions
- Cargo.toml standards (dependency management, release profiles, feature flags)
- Naming conventions table with type suffix patterns (
*Error, *Config, *Builder)
- Error handling with
thiserror / anyhow split and custom Result type aliases
- Async patterns (Tokio runtime selection, concurrency with
select!/try_join!, async-trait)
- Observability via
tracing and optional OpenTelemetry integration
- Serialization with Serde patterns and defaults
- Configuration management (environment variables, file-based config,
OnceLock)
- Resilience patterns (retry with exponential backoff)
- Visibility rules and feature flag conventions
- Code documentation standards (
///, # Errors, # Examples)
- Clippy and formatting requirements
- Testing conventions (module placement, BDD-style naming, async tests)
- Patterns to avoid checklist
- Complete example demonstrating all conventions in a single file
Out of Scope
Project-specific patterns (Azure IoT Operations SDKs, WASM operator macros, private registries) belong in downstream repo instructions that reference hve-core, not in the shared coding standard itself.
Acceptance Criteria
Instruction File Name
rust.instructions.mde
Scope
File-level (applies to specific file type)
Purpose
Summary
Add comprehensive Rust coding conventions to the
coding-standards/collection, following the same structure and depth as the existing C# instructions (coding-standards/csharp/).Motivation
Rust is used across multiple projects for edge AI services, WASM operators, telemetry pipelines, and IoT connectors. A shared set of conventions ensures consistency, reduces review friction, and gives Copilot the context it needs to generate idiomatic code. The C# instructions already demonstrate value here — Rust deserves the same treatment.
Proposed Files
rust.instructions.md.github/instructions/coding-standards/rust/Requirements
Scope
The instructions cover:
*Error,*Config,*Builder)thiserror/anyhowsplit and customResulttype aliasesselect!/try_join!,async-trait)tracingand optional OpenTelemetry integrationOnceLock)///,# Errors,# Examples)Out of Scope
Project-specific patterns (Azure IoT Operations SDKs, WASM operator macros, private registries) belong in downstream repo instructions that reference hve-core, not in the shared coding standard itself.
Acceptance Criteria
rust.instructions.mdexists at.github/instructions/coding-standards/rust/applyTo: '**/*.rs'and attributioncoding-standards/csharp/csharp.instructions.md(sections, tables, XML-wrapped examples, complete example)