feat: finalize the Hemx 0.4 core
CI / test (push) Has been cancelled

This commit is contained in:
tmk241
2026-09-02 17:28:40 +02:00
parent 1dc9734f16
commit a3c72e21db
15 changed files with 96 additions and 231 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
export type ResourceKind = "slot" | "atom" | "handle" | "form";
export type ResourceKind = "slot" | "handle" | "form";
export interface ResourceId {
kind: ResourceKind;
+7 -1
View File
@@ -939,7 +939,13 @@
if (discriminant === 1) return read();
throw new Error(`unknown hemx option ${discriminant}`);
};
const resource = () => ({ kind: enumValue(["slot", "atom", "handle", "form"], "hemx resource"), id: u32() });
const resource = () => {
const kind = u8();
if (kind === 0) return { kind: "slot", id: u32() };
if (kind === 2) return { kind: "handle", id: u32() };
if (kind === 3) return { kind: "form", id: u32() };
throw new Error(`unknown hemx resource ${kind}`);
};
const scope = () => {
const kind = u8();
if (kind === 0) return null;
-2
View File
@@ -365,8 +365,6 @@ fn runtime_has_no_mirrored_client_application_store() {
assert!(!source.contains("atomStore"));
assert!(!source.contains("bootstrapState"));
assert!(!source.contains("data-hemx-st"));
assert!(!source.contains("decodeAtomState"));
}
#[test]