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

  1. Version Management
  2. Follow semantic versioning (SemVer)
  3. Update CHANGELOG.md
  4. Tag releases appropriately

  5. Documentation Review

  6. Ensure all documentation is current
  7. Verify examples work with current version
  8. Update any outdated screenshots or references

  9. 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

  1. Automated Security Scanning

```bash # Run security audit cargo audit

# Check for known vulnerabilities cargo deny check advisories

# Validate dependencies cargo deny check licenses ```

  1. Manual Security Review
  2. Review all external dependencies
  3. Validate input sanitization
  4. Check for potential security vulnerabilities
  5. Ensure secure defaults

Step 3: Submission

  1. Package Creation

```bash # Create distributable package cargo package

# Verify package contents cargo package --list ```

  1. Metadata Validation
  2. Verify all required metadata is present
  3. Ensure description is clear and accurate
  4. Validate license information
  5. Check repository links

Step 4: Review Process

The extension review process includes:

  1. Automated Checks
  2. Build verification
  3. Test execution
  4. Security scanning
  5. License validation

  6. Manual Review

  7. Code quality assessment
  8. Documentation review
  9. Functionality testing
  10. Security evaluation

  11. Community Review

  12. Peer feedback period
  13. Public comment phase
  14. 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

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

  1. Build Failures
  2. Check Rust version compatibility
  3. Verify dependency versions
  4. Review build configuration

  5. Test Failures

  6. Ensure test environment is clean
  7. Check for race conditions
  8. Verify mock configurations

  9. Documentation Issues

  10. Validate markdown syntax
  11. Check link accuracy
  12. Ensure examples compile

Resources

See Also


This documentation is part of the Anya Extensions project. For more information, see the main documentation.