mirror of
https://github.com/fluencelabs/c-template
synced 2025-04-24 14:22:12 +00:00
introduce sdk.h
This commit is contained in:
parent
112bfdfee8
commit
78c38133ac
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@
|
||||
|
||||
# compiled wasm files
|
||||
*.wasm
|
||||
*.wat
|
||||
|
@ -24,4 +24,4 @@ void *allocate(size_t size);
|
||||
*/
|
||||
void deallocate(void *ptr, size_t size);
|
||||
|
||||
#endif //FLUENCE_C_SDK_ALLOCATOR_H
|
||||
#endif // FLUENCE_C_SDK_ALLOCATOR_H
|
||||
|
@ -12,4 +12,4 @@
|
||||
*/
|
||||
void log_utf8_string(const char *str, int len) __LOGGER_IMPORT(log_utf8_string);
|
||||
|
||||
#endif //FLUENCE_C_SDK_LOGGER_H
|
||||
#endif // FLUENCE_C_SDK_LOGGER_H
|
||||
|
8
sdk/sdk.h
Normal file
8
sdk/sdk.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef FLUENCE_C_SDK_H
|
||||
#define FLUENCE_C_SDK_H
|
||||
|
||||
#include "allocator.h"
|
||||
#include "logger.h"
|
||||
#include "side_module_api.h"
|
||||
|
||||
#endif // FLUENCE_C_SDK_H
|
@ -1,5 +1,5 @@
|
||||
#ifndef C_TEMPLATE_SIDE_MODULE_API_H
|
||||
#define C_TEMPLATE_SIDE_MODULE_API_H
|
||||
#ifndef FLUENCE_C_SDK_SIDE_MODULE_API_H
|
||||
#define FLUENCE_C_SDK_SIDE_MODULE_API_H
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@ -59,4 +59,4 @@ char * module_name ## _call(const char *ptr, int length) { \
|
||||
return result_out;\
|
||||
}
|
||||
|
||||
#endif //C_TEMPLATE_SIDE_MODULE_API_H
|
||||
#endif // FLUENCE_C_SDK_SIDE_MODULE_API_H
|
||||
|
@ -1,6 +1,4 @@
|
||||
#include "../sdk/allocator.h"
|
||||
#include "../sdk/logger.h"
|
||||
#include "../sdk/side_module_api.h"
|
||||
#include "../sdk/sdk.h"
|
||||
|
||||
char *invoke(const char *str, int length) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user