1
0
silverbullet/web/syscalls/store.ts
Zef Hemel 561aa6891f
Migrate to Deno (#86)
Big bang migration to Deno 🤯
2022-10-10 14:50:21 +02:00

18 lines
495 B
TypeScript

import { SysCallMapping } from "../../plugos/system.ts";
import { proxySyscalls } from "../../plugos/syscalls/transport.ts";
import { Space } from "../../common/spaces/space.ts";
export function storeSyscalls(space: Space): SysCallMapping {
return proxySyscalls(
[
"store.queryPrefix",
"store.get",
"store.set",
"store.batchSet",
"store.delete",
"store.deletePrefix",
],
(ctx, name, ...args) => space.proxySyscall(ctx.plug, name, args),
);
}