Adpt
The adapter layer provides a single, runtime-agnostic interface for Mayari's supported environments: Lune, Zune, and Lute. Instead of importing runtime-specific APIs directly.
Installation
bash
embr add mayari/adpt
embr iExample
lua
local Adapter = require("adpt")
local fs = Adapter.fs
local net = Adapter.net
local json = Adapter.json
local process = Adapter.process
local task = Adapter.task
local data = fs.readFile("./config.json")
local parsed = json.decode(data)This makes it easier to write code once and run it across supported runtimes without changing your imports.
What it provides
adapter.fsfor filesystem accessadapter.netfor networkingadapter.processfor process-related operationsadapter.jsonfor JSON encoding and decodingadapter.taskfor task helpers
Current status
Support is intentionally partial. Not every runtime exposes the same capabilities, and some libraries available in one environment are not available in another. The adapter currently focuses on the shared subset of functionality that can be used consistently across supported runtimes.
If a feature is missing in a specific runtime, the adapter will follow the runtime's own capabilities rather than forcing a workaround that would be unreliable.