| 12 | namespace ValdiLinux { |
| 13 | |
| 14 | int valdiLinuxMain(const char* rootComponentPath, int argc, const char** argv) { |
| 15 | auto runtime = createLinuxRuntime(/* enableDebuggerService */ false, |
| 16 | /* disableHotReloader */ true); |
| 17 | |
| 18 | runtime->getResourceLoader().addModuleSearchDirectory(STRING_LITERAL(".")); |
| 19 | |
| 20 | std::vector<Valdi::StringBox> jsArguments; |
| 21 | for (int i = 1; i < argc; ++i) { |
| 22 | jsArguments.push_back(Valdi::StringBox::fromCString(argv[i])); |
| 23 | } |
| 24 | |
| 25 | runtime->evalScript(Valdi::StringBox::fromCString(rootComponentPath), jsArguments); |
| 26 | |
| 27 | return runtime->getMainQueue()->runIndefinitely(); |
| 28 | } |
| 29 | |
| 30 | } // namespace ValdiLinux |
nothing calls this directly
no test coverage detected