forked from plusgiant5/runluau
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexecute.h
More file actions
21 lines (16 loc) · 821 Bytes
/
execute.h
File metadata and controls
21 lines (16 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once
#include <optional>
#include <unordered_set>
#include <luau.h>
#include "file.h"
namespace runluau {
struct settings_run_build {
uint8_t O = 1;
uint8_t g = 1;
std::optional<std::vector<std::string>> script_args = std::nullopt;
std::optional<std::vector<std::string>> plugins = std::nullopt;
};
void execute_bytecode(const std::string& bytecode, settings_run_build& settings, std::optional<fs::path> path = std::nullopt, std::optional<std::unordered_set<std::string>> plugins_to_load = std::nullopt);
void execute(const std::string& source, settings_run_build& settings, std::optional<fs::path> path = std::nullopt, std::optional<std::unordered_set<std::string>> plugins_to_load = std::nullopt);
std::string compile(const std::string& source, const int O, const int g);
}