Extension Publishing Guidelines¶
This document provides comprehensive guidelines for publishing extensions to the Anya Core extension marketplace.
Overview¶
Publishing high-quality extensions requires following established guidelines to ensure consistency, security, and usability across the Anya Core ecosystem.
Pre-Publication Requirements¶
1. Code Quality Standards¶
- Documentation: Complete documentation including README, API docs, and examples
- Testing: Comprehensive test coverage (minimum 80%)
- Code Review: Peer review by at least two developers
- Security Audit: Security review completed and documented
2. Technical Requirements¶
# Example Cargo.toml for extension
[package]
name = "anya-extension-example"
version = "1.0.0"
edition = "2021"
authors = ["Your Name <email@example.com>"]
description = "Brief description of the extension"
license = "Apache-2.0"
repository = "https://github.com/username/anya-extension-example"
documentation = "https://docs.rs/anya-extension-example"
[dependencies]
anya-core = "1.0"
serde = { version = "1.0", features = ["derive"] }
tokio = { version = "1.0", features = ["full"] }
3. Compatibility Matrix¶
Anya Core Version | Extension Version | Status |
---|---|---|
1.0.x | 1.0.x | ✅ Supported |
1.1.x | 1.1.x | ✅ Supported |
1.2.x | 1.2.x | ✅ Current |
Publication Process¶
Step 1: Preparation¶
- Version Management
- Follow semantic versioning (SemVer)
- Update CHANGELOG.md
-
Tag releases appropriately
-
Documentation Review
- Ensure all documentation is current
- Verify examples work with current version
-
Update any outdated screenshots or references
-
Final Testing
```bash # Run comprehensive test suite cargo test --all-features
# Run integration tests cargo test --test integration
# Run benchmarks cargo bench
# Check code formatting cargo fmt --check
# Run clippy lints cargo clippy -- -D warnings ```
Step 2: Security Review¶
- Automated Security Scanning
```bash # Run security audit cargo audit
# Check for known vulnerabilities cargo deny check advisories
# Validate dependencies cargo deny check licenses ```
- Manual Security Review
- Review all external dependencies
- Validate input sanitization
- Check for potential security vulnerabilities
- Ensure secure defaults
Step 3: Submission¶
- Package Creation
```bash # Create distributable package cargo package
# Verify package contents cargo package --list ```
- Metadata Validation
- Verify all required metadata is present
- Ensure description is clear and accurate
- Validate license information
- Check repository links
Step 4: Review Process¶
The extension review process includes:
- Automated Checks
- Build verification
- Test execution
- Security scanning
-
License validation
-
Manual Review
- Code quality assessment
- Documentation review
- Functionality testing
-
Security evaluation
-
Community Review
- Peer feedback period
- Public comment phase
- Expert evaluation
Publishing Standards¶
1. Naming Conventions¶
- Use descriptive, clear names
- Follow
anya-extension-{category}-{name}
pattern - Avoid trademark conflicts
- Use lowercase with hyphens
2. Documentation Requirements¶
README.md Structure¶
# Extension Name
Brief description of what the extension does.
## Installation
Instructions for installing the extension.
## Usage
Basic usage examples and common use cases.
## API Reference
Link to detailed API documentation.
## Examples
Practical examples demonstrating key features.
## Contributing
Guidelines for contributing to the extension.
## License
License information and attribution.
API Documentation¶
- Document all public APIs
- Include usage examples
- Specify parameter types and return values
- Document error conditions
3. Version Management¶
// Example: Extension version info
#[derive(Debug, Clone)]
pub struct ExtensionInfo {
pub name: String,
pub version: semver::Version,
pub anya_core_version: semver::VersionReq,
pub description: String,
pub author: String,
pub license: String,
}
impl ExtensionInfo {
pub fn is_compatible(&self, core_version: &semver::Version) -> bool {
self.anya_core_version.matches(core_version)
}
}
Quality Metrics¶
1. Performance Benchmarks¶
Extensions must meet minimum performance standards:
- Startup Time: < 100ms
- Memory Usage: < 50MB baseline
- API Response Time: < 10ms for simple operations
- Resource Cleanup: Proper cleanup on shutdown
2. Test Coverage¶
# Generate coverage report
cargo tarpaulin --out Html --output-dir coverage/
# Minimum coverage requirements:
# - Unit tests: 80%
# - Integration tests: 60%
# - Documentation tests: 100%
3. Code Quality Metrics¶
- Cyclomatic Complexity: < 10 per function
- Documentation: All public APIs documented
- Error Handling: Comprehensive error handling
- Type Safety: Use of type-safe patterns
Marketplace Guidelines¶
1. Category Classification¶
- Core: Essential functionality extensions
- Productivity: Development and workflow tools
- Security: Security and privacy enhancements
- Analytics: Data analysis and monitoring tools
- Integration: Third-party service integrations
- Utility: General utility functions
2. Pricing Guidelines¶
- Free/Open Source: No restrictions
- Freemium: Core features free, premium features paid
- Paid: Full-featured paid extensions
- Enterprise: Enterprise-specific licensing
3. Support Requirements¶
- Issue Tracking: Public issue tracker required
- Response Time: 48-hour response for critical issues
- Documentation: Maintained and up-to-date docs
- Community: Active community engagement
Maintenance and Updates¶
1. Update Schedule¶
- Security Updates: Immediate (within 24 hours)
- Bug Fixes: Weekly release cycle
- Feature Updates: Monthly release cycle
- Major Versions: Quarterly planning cycle
2. Deprecation Policy¶
// Example: Deprecation warning
#[deprecated(since = "1.2.0", note = "Use new_function() instead")]
pub fn old_function() -> Result<(), Error> {
warn!("old_function is deprecated, use new_function instead");
self.new_function()
}
3. Migration Support¶
- Provide migration guides for breaking changes
- Support previous version for at least 6 months
- Offer automated migration tools where possible
Legal and Compliance¶
1. License Requirements¶
- Compatible Licenses: Apache-2.0, MIT, BSD-3-Clause
- License Headers: Required in all source files
- Third-Party Licenses: Document all dependencies
- Contributor License Agreement: Required for contributions
2. Intellectual Property¶
- Ensure all code is original or properly licensed
- Respect trademark and copyright laws
- Attribute third-party components appropriately
Troubleshooting¶
Common Issues¶
- Build Failures
- Check Rust version compatibility
- Verify dependency versions
-
Review build configuration
-
Test Failures
- Ensure test environment is clean
- Check for race conditions
-
Verify mock configurations
-
Documentation Issues
- Validate markdown syntax
- Check link accuracy
- Ensure examples compile
Resources¶
See Also¶
This documentation is part of the Anya Extensions project. For more information, see the main documentation.