1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00
RIOT/examples/wasm/wasm_sample/hello.c
Karl Fessel 4cc9bd9e4e example/wasm: a basic wamr example
* using makefile blobs
* improve usability of example
* add sample with memory saving Makefile
2022-02-11 13:09:50 +01:00

16 lines
410 B
C

/* a native printf is provided by the builtin libc of wamr */
#ifdef __cplusplus
extern "C" int printf( const char * ,...);
#define WASM_EXPORT __attribute__((visibility("default"))) extern "C"
#else
extern int printf( const char * ,...);
#define WASM_EXPORT __attribute__((visibility("default")))
#endif
WASM_EXPORT int main(int argc, char **argv)
{
printf("Hello RIOT %i\n" , 2001);
return 2468;
}