blob: 5bc37748fc3fdeb409a3af5968ec070d04095f63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/*
* Copyright (c) 2006-2025, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2025-09-20 foxglove First version
* 2025-10-10 foxglove Clear Rust component MSH command registration
*
* Description: Rust component MSH command registration
* Provides access interface to Rust modular APIs
*/
#include <rtthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <rtdbg.h>
extern int rust_init(void);
/* ============== Rust function declarations ============== */
/* Component initialization */
static int rust_component_init(void)
{
int ret = rust_init();
if (ret == 0)
{
printf("Hello RT-Thread Rust!\n");
}
return ret;
}
#ifdef RUST_INIT_COMPONENT
INIT_APP_EXPORT(rust_component_init);
#endif
|