introduce sdk.h

This commit is contained in:
vms 2020-04-17 23:07:21 +03:00
parent 112bfdfee8
commit 78c38133ac
6 changed files with 15 additions and 8 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
# compiled wasm files
*.wasm
*.wat

View File

@ -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

View File

@ -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
View 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

View File

@ -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

View File

@ -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) {