#include #include "esp_log.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" static const char* TAG = "RustApp"; extern void rust_app_main(); void rust_app_task(void* pvParameters) { ESP_LOGI(TAG, "Rust application task started"); rust_app_main(); } void rust_app_wrapper_init() { ESP_LOGI(TAG, "Initializing Rust application..."); // 创建一个新的任务来运行 Rust 应用 xTaskCreate(rust_app_task, "rust_app_task", 4096, NULL, 5, NULL); ESP_LOGI(TAG, "Rust application task created"); }