Bicameral Engine
GPU-resident engine for a magic-research open-world game
Loading...
Searching...
No Matches
luau_package.cpp File Reference
#include "script/luau_package.h"
#include <algorithm>
#include <format>
#include <fstream>
#include <iterator>
#include <set>
#include <utility>
#include "script/luau_sandbox.h"
Include dependency graph for luau_package.cpp:

Go to the source code of this file.

Classes

struct  bicameral::script::anonymous_namespace{luau_package.cpp}::Manifest
struct  bicameral::script::anonymous_namespace{luau_package.cpp}::OrderNode

Namespaces

namespace  bicameral
namespace  bicameral::script
namespace  bicameral::script::anonymous_namespace{luau_package.cpp}

Typedefs

using bicameral::script::anonymous_namespace{luau_package.cpp}::Contribution = std::map<std::string, std::map<std::string, ScriptValue>>

Enumerations

enum class  bicameral::script::anonymous_namespace{luau_package.cpp}::OrderState : uint8_t { bicameral::script::anonymous_namespace{luau_package.cpp}::Pending , bicameral::script::anonymous_namespace{luau_package.cpp}::Ordered , bicameral::script::anonymous_namespace{luau_package.cpp}::Rejected }

Functions

std::string bicameral::script::anonymous_namespace{luau_package.cpp}::ToUtf8String (const fs::path &path)
std::expected< std::string, std::string > bicameral::script::anonymous_namespace{luau_package.cpp}::ModulePath (std::string_view name)
ModuleResolver bicameral::script::anonymous_namespace{luau_package.cpp}::MakeResolver (const PackageSource &package)
std::expected< std::vector< std::string >, std::string > bicameral::script::anonymous_namespace{luau_package.cpp}::ReadNameList (const ScriptValue &list)
std::expected< Manifest, std::string > bicameral::script::anonymous_namespace{luau_package.cpp}::ParseManifest (const ScriptValue &table)
std::expected< Manifest, std::string > bicameral::script::anonymous_namespace{luau_package.cpp}::ReadManifest (LuauSandbox &sandbox, const PackageSource &package, const PackageLoadOptions &options)
bool bicameral::script::anonymous_namespace{luau_package.cpp}::DependsReady (const std::map< std::string, OrderNode > &nodes, const OrderNode &node, std::string *missingReason)
bool bicameral::script::anonymous_namespace{luau_package.cpp}::OrderStep (std::map< std::string, OrderNode > &nodes, std::vector< std::string > &order, PackageSetResult &result)
std::expected< Contribution, std::string > bicameral::script::anonymous_namespace{luau_package.cpp}::ReadContribution (const std::vector< ScriptValue > &values)
std::expected< Contribution, std::string > bicameral::script::anonymous_namespace{luau_package.cpp}::RunEntry (LuauSandbox &sandbox, const PackageSource &package, const Manifest &manifest)
std::string bicameral::script::anonymous_namespace{luau_package.cpp}::FindForbiddenOverrides (const PackageSetResult &result, const Contribution &contribution)
void bicameral::script::anonymous_namespace{luau_package.cpp}::MergeEntry (PackageSetResult &result, const std::string &category, const std::string &key, ScriptValue &&value, const std::string &package, MergeMode mode)
void bicameral::script::anonymous_namespace{luau_package.cpp}::Merge (PackageSetResult &result, const std::string &package, Contribution &&contribution, MergeMode mode)
std::string bicameral::script::anonymous_namespace{luau_package.cpp}::TypeCheckReason (std::vector< TypeDiagnostic > &&diagnostics, PackageSetResult &result)
std::string bicameral::script::anonymous_namespace{luau_package.cpp}::LoadOne (LuauSandbox &sandbox, const PackageSource &package, const Manifest &manifest, const std::set< std::string > &loaded, const PackageLoadOptions &options, PackageSetResult &result)
bool bicameral::script::IsValidPackageName (std::string_view name)
std::expected< std::string, std::string > bicameral::script::PackageModulePath (std::string_view name)
std::expected< PackageSource, std::string > bicameral::script::ReadPackageFolder (const fs::path &folder)
std::expected< std::vector< PackageSource >, std::string > bicameral::script::ReadPackageRoot (const fs::path &root)
std::expected< PackageSetResult, std::string > bicameral::script::LoadPackages (LuauSandbox &sandbox, std::span< const PackageSource > packages, const PackageLoadOptions &options)
std::string bicameral::script::TableBytes (const PackageSetResult &result)
uint64_t bicameral::script::TableVersion (const PackageSetResult &result)

Variables

constexpr std::string_view bicameral::script::anonymous_namespace{luau_package.cpp}::MANIFEST_FILE = "package.luau"
constexpr std::string_view bicameral::script::anonymous_namespace{luau_package.cpp}::MODULE_EXTENSION = ".luau"
constexpr size_t bicameral::script::anonymous_namespace{luau_package.cpp}::MAX_NAME_LENGTH = 64
constexpr size_t bicameral::script::anonymous_namespace{luau_package.cpp}::MAX_LISTED_CONFLICTS = 3