-
Notifications
You must be signed in to change notification settings - Fork 0
API Host BuiltInModules
Catalog of native modules shipped with AuroraScript.
Namespace: AuroraScript.Runtime.Package. Kind: static class.
Back to .NET Host API Reference
Shipped native modules are explicit capabilities. EngineOptions.Default enables none of them. Select only the file-system or network access required by the application, then import the enabled bare path in script code.
using AuroraScript.Runtime.Package;
var options = EngineOptions.Default.WithBuiltIns(builtIns =>
{
builtIns.Add(BuiltInModules.FileSystem);
builtIns.Add(BuiltInModules.HttpClient);
});static BuiltInModuleDefinition FileSystemEnables the fs import and the APIs documented on fs.
import fs from "fs";
static BuiltInModuleDefinition HttpClientEnables the http import and its synchronous and callback APIs documented on http.
import http from "http";
- Enabled bare paths resolve before the configured project source resolver.
- Relative imports such as
./fsand../httpcontinue to use project sources. - Built-in module sources are dependencies and are not enumerated as project entries by parameterless
BuildAsync(). - Module objects are isolated between engines and script domains.
- Selecting a module on one
EngineOptionsinstance does not enable it globally.
Both modules grant access outside the language runtime. Treat them as application capabilities, not harmless utility libraries; do not enable them for untrusted scripts without an appropriate process or operating-system sandbox.
AuroraScript.JIT 4.0.0 · Documentation Home · Repository · MIT License