Phasor
3.1.1
Stack VM based Programming Language
Loading...
Searching...
No Matches
NativeRuntime_static_main.cpp
Go to the documentation of this file.
1
2
3
#include <cstdint>
4
#include <cstdio>
5
#include <cstdlib>
6
#include <iostream>
7
#include <fstream>
8
#include <filesystem>
9
#include <string>
10
#include <vector>
11
#include <
Value.hpp
>
12
13
extern
"C"
void
exec
(
const
unsigned
char
embeddedBytecode[],
size_t
embeddedBytecodeSize,
const
char
*moduleName,
14
const
void
*nativeFunctionsVector,
const
int
argc,
const
char
*argv[]);
15
16
int
main
(
int
argc,
char
*argv[])
17
{
18
int
exitCode = 1;
19
20
try
21
{
22
exec
(embeddedBytecode, embeddedBytecodeSize, moduleName.c_str(),
nullptr
, argc, argv);
23
exitCode = 0;
24
}
25
catch
(
const
std::exception &e)
26
{
27
std::cerr <<
"Runtime Error: "
<< e.what() <<
"\n"
;
28
return
1;
29
}
30
31
return
exitCode;
32
}
main
int main()
Definition
LSP_main.cpp:121
exec
void exec(const unsigned char embeddedBytecode[], size_t embeddedBytecodeSize, const char *moduleName, const void *nativeFunctionsVector, const int argc, const char *argv[])
Value.hpp
src
Executable
Runtime
Phasor
NativeRuntime_static_main.cpp
Generated by
1.16.1