summaryrefslogtreecommitdiff
path: root/components/rust/tools/feature_config_component.py
diff options
context:
space:
mode:
authorzhang san <[email protected]>2025-12-08 18:34:25 +0800
committerGitHub <[email protected]>2025-12-08 18:34:25 +0800
commit69980f8b9d29b38dbd4ddf6373b4b45f3a138409 (patch)
tree21dd9a8ce80e3d30192e9ffa56ea39a199bae309 /components/rust/tools/feature_config_component.py
parentcd1d47b87c5d47e131730e5506eb3ad77d357653 (diff)
Adding Rust Language Support for RT-Thread #10910
Diffstat (limited to 'components/rust/tools/feature_config_component.py')
-rw-r--r--components/rust/tools/feature_config_component.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/components/rust/tools/feature_config_component.py b/components/rust/tools/feature_config_component.py
new file mode 100644
index 0000000000..221d529abe
--- /dev/null
+++ b/components/rust/tools/feature_config_component.py
@@ -0,0 +1,30 @@
+import sys
+import os
+from building import *
+cwd = GetCurrentDir()
+sys.path.append(os.path.join(cwd, 'tools'))
+from build_component import CONFIG_COMPONENT_FEATURE_MAP
+
+def setup_all_component_features():
+ """
+ Setup all component feature mappings.
+ This function configures which RT-Thread configurations should enable which component features.
+ """
+
+ CONFIG_COMPONENT_FEATURE_MAP.update({
+ 'RUST_LOG_COMPONENT': {
+ 'feature': 'enable-log',
+ 'dependencies': ['em_component_log'],
+ 'description': 'Enable Rust logging component integration'
+ },
+ })
+
+ print("All component feature mappings have been configured!")
+
+
+if __name__ == "__main__":
+ setup_all_component_features()
+ print(f"Total component configurations: {len(CONFIG_COMPONENT_FEATURE_MAP)}")
+ print("Available component configurations:")
+ for config, info in CONFIG_COMPONENT_FEATURE_MAP.items():
+ print(f" {config}: {info['feature']} - {info['description']}") \ No newline at end of file