2022-10-10 12:50:21 +00:00
|
|
|
import { SysCallMapping } from "../../plugos/system.ts";
|
|
|
|
import { proxySyscalls } from "../../plugos/syscalls/transport.ts";
|
|
|
|
import { Space } from "../../common/spaces/space.ts";
|
2022-07-12 10:30:15 +00:00
|
|
|
|
|
|
|
export function storeSyscalls(space: Space): SysCallMapping {
|
|
|
|
return proxySyscalls(
|
|
|
|
[
|
|
|
|
"store.queryPrefix",
|
|
|
|
"store.get",
|
|
|
|
"store.set",
|
|
|
|
"store.batchSet",
|
|
|
|
"store.delete",
|
|
|
|
"store.deletePrefix",
|
|
|
|
],
|
2022-10-10 12:50:21 +00:00
|
|
|
(ctx, name, ...args) => space.proxySyscall(ctx.plug, name, args),
|
2022-07-12 10:30:15 +00:00
|
|
|
);
|
|
|
|
}
|