feature_config_component.py 1016 B

123456789101112131415161718192021222324252627282930
  1. import sys
  2. import os
  3. from building import *
  4. cwd = GetCurrentDir()
  5. sys.path.append(os.path.join(cwd, 'tools'))
  6. from build_component import CONFIG_COMPONENT_FEATURE_MAP
  7. def setup_all_component_features():
  8. """
  9. Setup all component feature mappings.
  10. This function configures which RT-Thread configurations should enable which component features.
  11. """
  12. CONFIG_COMPONENT_FEATURE_MAP.update({
  13. 'RUST_LOG_COMPONENT': {
  14. 'feature': 'enable-log',
  15. 'dependencies': ['em_component_log'],
  16. 'description': 'Enable Rust logging component integration'
  17. },
  18. })
  19. print("All component feature mappings have been configured!")
  20. if __name__ == "__main__":
  21. setup_all_component_features()
  22. print(f"Total component configurations: {len(CONFIG_COMPONENT_FEATURE_MAP)}")
  23. print("Available component configurations:")
  24. for config, info in CONFIG_COMPONENT_FEATURE_MAP.items():
  25. print(f" {config}: {info['feature']} - {info['description']}")