summaryrefslogtreecommitdiff
path: root/c/wasmtime-basic/test.c
blob: f6e87234631475a12b76579f6fff2caa60b1da75 (plain) (blame)
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
/*
 * test.c
 */

#include <stdint.h>

typedef uint32_t u32;
typedef uint8_t   u8;

__attribute__((import_module("env"), import_name("imported_func")))
void imported_func(void);

__attribute__((export_name("exported_func")))
int exported_func(u8 *addr, u32 mem_size)
{
	(void)addr;
	(void)mem_size;
	imported_func();

	return 0;
}

int main(void)
{
	return 0;
}