@wasm-gaming/engine-specs 0.2.7 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -54
- package/demo/app.html +227 -0
- package/demo/canvas-renderer.js +153 -0
- package/demo/components/asset-picker.html +137 -0
- package/demo/components/call-log.html +33 -0
- package/demo/components/engine-header.html +78 -0
- package/demo/components/lifecycle-bar.html +69 -0
- package/demo/components/property-table.html +119 -0
- package/demo/demo.css +26 -130
- package/demo/demo.sdk.js +405 -203
- package/demo/index.html +7 -56
- package/demo/tsconfig.json +17 -0
- package/dist/engine-specs.d.ts +106 -0
- package/dist/engine-specs.d.ts.map +1 -0
- package/dist/engine-specs.js +3 -0
- package/dist/engine-specs.js.map +1 -0
- package/package.json +7 -12
- package/src/engine-specs.ts +117 -0
- package/demo/README.md +0 -155
- package/demo/checksums.js +0 -101
- package/demo/components/drop-area.html +0 -171
- package/demo/components/esc-menu.html +0 -540
- package/demo/components/launcher.html +0 -220
- package/demo/components/sdk-info.html +0 -54
- package/demo/demo.js +0 -622
- package/demo/sdk.js +0 -19
- package/demo/storage.js +0 -88
- package/dist/engine.d.ts +0 -427
- package/dist/engine.d.ts.map +0 -1
- package/dist/engine.js +0 -83
- package/dist/engine.js.map +0 -1
- package/dist/index.d.ts +0 -13
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -12
- package/dist/index.js.map +0 -1
- package/dist/manifest.d.ts +0 -69
- package/dist/manifest.d.ts.map +0 -1
- package/dist/manifest.js +0 -8
- package/dist/manifest.js.map +0 -1
- package/dist/validate.d.ts +0 -10
- package/dist/validate.d.ts.map +0 -1
- package/dist/validate.js +0 -79
- package/dist/validate.js.map +0 -1
- package/schema/engine-manifest.schema.json +0 -74
- package/src/engine.ts +0 -516
- package/src/index.ts +0 -55
- package/src/manifest.ts +0 -82
- package/src/validate.ts +0 -92
package/dist/manifest.d.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/** A loose JSON Schema object (Draft 2020-12 subset). Kept dependency-free. */
|
|
2
|
-
export type JSONSchema = Record<string, unknown>;
|
|
3
|
-
/** A gamepad→keyboard key map, or the name of a built-in preset (e.g. "rsdkv4"). */
|
|
4
|
-
export type KeyMap = Record<string, string>;
|
|
5
|
-
export type InputPreset = string;
|
|
6
|
-
/** How the host validates a user-provided asset before mounting it. */
|
|
7
|
-
export interface AssetValidation {
|
|
8
|
-
/** Exact byte length, if the asset has a fixed size (e.g. a known ROM dump). */
|
|
9
|
-
bytes?: number;
|
|
10
|
-
/** Lowercase hex SHA-1 the asset must match. */
|
|
11
|
-
sha1?: string;
|
|
12
|
-
}
|
|
13
|
-
/** A file the host must supply at runtime, mounted into the engine's VFS. */
|
|
14
|
-
export interface AssetSpec {
|
|
15
|
-
/** Stable key the host uses in `EngineConfig.assets` (e.g. "data", "rom", "bios"). */
|
|
16
|
-
key: string;
|
|
17
|
-
/** Absolute VFS path the engine reads from (e.g. "/Data.rsdk", "/roms/neogeo.zip"). */
|
|
18
|
-
mountPath: string;
|
|
19
|
-
/** If true, `load()` must reject when the asset is absent. */
|
|
20
|
-
required: boolean;
|
|
21
|
-
/** Suggested file extensions for a host file picker (e.g. [".rsdk"]). */
|
|
22
|
-
accept?: string[];
|
|
23
|
-
/** Integrity/shape constraints the host may enforce before mounting. */
|
|
24
|
-
validate?: AssetValidation;
|
|
25
|
-
/** Human-readable note shown in host UI. */
|
|
26
|
-
description?: string;
|
|
27
|
-
}
|
|
28
|
-
/** Where the CI-built artifacts live (relative paths or URLs; host resolves them). */
|
|
29
|
-
export interface EngineArtifacts {
|
|
30
|
-
/** The `.wasm` binary. */
|
|
31
|
-
wasm: string;
|
|
32
|
-
/** The JS glue/loader (an ES module factory). */
|
|
33
|
-
js: string;
|
|
34
|
-
/** Optional preloaded Emscripten `.data` package (engines that bundle assets). */
|
|
35
|
-
data?: string;
|
|
36
|
-
}
|
|
37
|
-
/** Native render surface geometry. */
|
|
38
|
-
export interface VideoSpec {
|
|
39
|
-
baseWidth: number;
|
|
40
|
-
baseHeight: number;
|
|
41
|
-
/** Display aspect ratio, e.g. "16:9" or "4:3". Defaults to baseWidth:baseHeight. */
|
|
42
|
-
aspect?: string;
|
|
43
|
-
}
|
|
44
|
-
/** Optional features an engine may or may not implement. Gate calls on these. */
|
|
45
|
-
export interface EngineCapabilities {
|
|
46
|
-
saveStates?: boolean;
|
|
47
|
-
sram?: boolean;
|
|
48
|
-
/** Part of a swappable set of cores for one platform (e.g. Megadrive: JGenesis/BlastEm). */
|
|
49
|
-
coreSelectable?: boolean;
|
|
50
|
-
}
|
|
51
|
-
export interface EngineManifest {
|
|
52
|
-
/** Stable engine id, e.g. "rsdkv4" | "fbneo" | "blastem" | "jgenesis" | "smw". */
|
|
53
|
-
id: string;
|
|
54
|
-
/** SemVer of this engine build/contract implementation. */
|
|
55
|
-
version: string;
|
|
56
|
-
/** Human-readable name. */
|
|
57
|
-
name?: string;
|
|
58
|
-
description?: string;
|
|
59
|
-
artifacts: EngineArtifacts;
|
|
60
|
-
/** Files supplied at runtime. May be empty (e.g. engines with baked-in assets). */
|
|
61
|
-
assets: AssetSpec[];
|
|
62
|
-
/** Input preset name or an explicit key map. */
|
|
63
|
-
input: InputPreset | KeyMap;
|
|
64
|
-
video: VideoSpec;
|
|
65
|
-
/** JSON Schema for engine-specific `EngineConfig.options`. */
|
|
66
|
-
options?: JSONSchema;
|
|
67
|
-
capabilities: EngineCapabilities;
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=manifest.d.ts.map
|
package/dist/manifest.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAOA,+EAA+E;AAC/E,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEjD,oFAAoF;AACpF,MAAM,MAAM,MAAM,GAAG,MAAM,CA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C;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,eAAe,CAAC;IAC3B,mFAAmF;IACnF,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,gDAAgD;IAChD,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IAC5B,KAAK,EAAE,SAAS,CAAC;IACjB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,YAAY,EAAE,kBAAkB,CAAC;CAClC"}
|
package/dist/manifest.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// Layer A — the declarative contract.
|
|
2
|
-
//
|
|
3
|
-
// An EngineManifest describes what an engine subproject ships and needs. It drives
|
|
4
|
-
// the host's launcher UI, asset pickers and validation. Everything that differs
|
|
5
|
-
// between engines (Data.rsdk vs a ROM zip + BIOS vs baked-in assets) is expressed
|
|
6
|
-
// as *data* here, so the imperative interface (Layer B) can stay identical.
|
|
7
|
-
export {};
|
|
8
|
-
//# sourceMappingURL=manifest.js.map
|
package/dist/manifest.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,EAAE;AACF,mFAAmF;AACnF,gFAAgF;AAChF,kFAAkF;AAClF,4EAA4E"}
|
package/dist/validate.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { EngineManifest } from './manifest.js';
|
|
2
|
-
export interface ValidationResult {
|
|
3
|
-
valid: boolean;
|
|
4
|
-
errors: string[];
|
|
5
|
-
}
|
|
6
|
-
/** Validate an unknown value as an EngineManifest. Never throws. */
|
|
7
|
-
export declare function validateManifest(input: unknown): ValidationResult;
|
|
8
|
-
/** Validate and throw on failure. Returns the value narrowed to EngineManifest. */
|
|
9
|
-
export declare function assertManifest(input: unknown): EngineManifest;
|
|
10
|
-
//# sourceMappingURL=validate.d.ts.map
|
package/dist/validate.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAgED,oEAAoE;AACpE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAMjE;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAO7D"}
|
package/dist/validate.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
// Runtime validation of an EngineManifest against the contract.
|
|
2
|
-
// Engine CIs can run this to fail a build that drifts from the spec; hosts can run
|
|
3
|
-
// it on manifests fetched from Releases before trusting them.
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
const AssetValidationSchema = z.object({
|
|
6
|
-
bytes: z.int().nonnegative().optional(),
|
|
7
|
-
sha1: z.string().optional(),
|
|
8
|
-
}).strict();
|
|
9
|
-
const AssetSpecSchema = z.object({
|
|
10
|
-
key: z.string().min(1),
|
|
11
|
-
mountPath: z.string().regex(/^\//),
|
|
12
|
-
required: z.boolean(),
|
|
13
|
-
accept: z.array(z.string()).optional(),
|
|
14
|
-
validate: AssetValidationSchema.optional(),
|
|
15
|
-
description: z.string().optional(),
|
|
16
|
-
}).strict();
|
|
17
|
-
const InputSchema = z.union([
|
|
18
|
-
z.string(),
|
|
19
|
-
z.record(z.string(), z.string()),
|
|
20
|
-
]);
|
|
21
|
-
const VideoSpecSchema = z.object({
|
|
22
|
-
baseWidth: z.int().positive(),
|
|
23
|
-
baseHeight: z.int().positive(),
|
|
24
|
-
aspect: z.string().optional(),
|
|
25
|
-
}).strict();
|
|
26
|
-
const EngineArtifactsSchema = z.object({
|
|
27
|
-
wasm: z.string(),
|
|
28
|
-
js: z.string(),
|
|
29
|
-
data: z.string().optional(),
|
|
30
|
-
}).strict();
|
|
31
|
-
const EngineCapabilitiesSchema = z.object({
|
|
32
|
-
saveStates: z.boolean().optional(),
|
|
33
|
-
sram: z.boolean().optional(),
|
|
34
|
-
coreSelectable: z.boolean().optional(),
|
|
35
|
-
}).strict();
|
|
36
|
-
const EngineManifestSchema = z.object({
|
|
37
|
-
id: z.string().min(1),
|
|
38
|
-
version: z.string().min(1),
|
|
39
|
-
name: z.string().optional(),
|
|
40
|
-
description: z.string().optional(),
|
|
41
|
-
artifacts: EngineArtifactsSchema,
|
|
42
|
-
assets: z.array(AssetSpecSchema),
|
|
43
|
-
input: InputSchema,
|
|
44
|
-
video: VideoSpecSchema,
|
|
45
|
-
options: z.record(z.string(), z.unknown()).optional(),
|
|
46
|
-
capabilities: EngineCapabilitiesSchema,
|
|
47
|
-
}).strict();
|
|
48
|
-
function formatIssuePath(path) {
|
|
49
|
-
if (path.length === 0)
|
|
50
|
-
return 'manifest';
|
|
51
|
-
let out = 'manifest';
|
|
52
|
-
for (const part of path) {
|
|
53
|
-
if (typeof part === 'number')
|
|
54
|
-
out += `[${part}]`;
|
|
55
|
-
else if (typeof part === 'string')
|
|
56
|
-
out += `.${part}`;
|
|
57
|
-
else
|
|
58
|
-
out += '.[symbol]';
|
|
59
|
-
}
|
|
60
|
-
return out;
|
|
61
|
-
}
|
|
62
|
-
/** Validate an unknown value as an EngineManifest. Never throws. */
|
|
63
|
-
export function validateManifest(input) {
|
|
64
|
-
const result = EngineManifestSchema.safeParse(input);
|
|
65
|
-
if (result.success)
|
|
66
|
-
return { valid: true, errors: [] };
|
|
67
|
-
const errors = result.error.issues.map((issue) => `${formatIssuePath(issue.path)}: ${issue.message}`);
|
|
68
|
-
return { valid: false, errors };
|
|
69
|
-
}
|
|
70
|
-
/** Validate and throw on failure. Returns the value narrowed to EngineManifest. */
|
|
71
|
-
export function assertManifest(input) {
|
|
72
|
-
const result = EngineManifestSchema.safeParse(input);
|
|
73
|
-
if (!result.success) {
|
|
74
|
-
const errors = result.error.issues.map((issue) => `${formatIssuePath(issue.path)}: ${issue.message}`);
|
|
75
|
-
throw new Error(`Invalid EngineManifest:\n- ${errors.join('\n- ')}`);
|
|
76
|
-
}
|
|
77
|
-
return result.data;
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=validate.js.map
|
package/dist/validate.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,mFAAmF;AACnF,8DAA8D;AAE9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACtB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;IAClC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,QAAQ,EAAE,qBAAqB,CAAC,QAAQ,EAAE;IAC1C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACnC,CAAC,CAAC,MAAM,EAAE,CAAC;AAEZ,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC;IAC1B,CAAC,CAAC,MAAM,E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cAAc,CAAC,KAAc;IAC3C,MAAM,MAAM,GAAG,oBAAoB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IACrD,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QACpB,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACtG,MAAM,IAAI,KAAK,CAAC,8BAA8B,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,MAAM,CAAC,IAAsB,CAAC;AACvC,CAAC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://github.com/wasm-gaming/engine-specs/schema/engine-manifest.json",
|
|
4
|
-
"title": "EngineManifest",
|
|
5
|
-
"description": "The declarative contract an engine subproject ships (mirror of src/manifest.ts).",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["id", "version", "artifacts", "assets", "input", "video", "capabilities"],
|
|
8
|
-
"additionalProperties": false,
|
|
9
|
-
"properties": {
|
|
10
|
-
"id": { "type": "string", "minLength": 1 },
|
|
11
|
-
"version": { "type": "string", "minLength": 1 },
|
|
12
|
-
"name": { "type": "string" },
|
|
13
|
-
"description": { "type": "string" },
|
|
14
|
-
"artifacts": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"required": ["wasm", "js"],
|
|
17
|
-
"additionalProperties": false,
|
|
18
|
-
"properties": {
|
|
19
|
-
"wasm": { "type": "string" },
|
|
20
|
-
"js": { "type": "string" },
|
|
21
|
-
"data": { "type": "string" }
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"assets": {
|
|
25
|
-
"type": "array",
|
|
26
|
-
"items": {
|
|
27
|
-
"type": "object",
|
|
28
|
-
"required": ["key", "mountPath", "required"],
|
|
29
|
-
"additionalProperties": false,
|
|
30
|
-
"properties": {
|
|
31
|
-
"key": { "type": "string", "minLength": 1 },
|
|
32
|
-
"mountPath": { "type": "string", "pattern": "^/" },
|
|
33
|
-
"required": { "type": "boolean" },
|
|
34
|
-
"accept": { "type": "array", "items": { "type": "string" } },
|
|
35
|
-
"validate": {
|
|
36
|
-
"type": "object",
|
|
37
|
-
"additionalProperties": false,
|
|
38
|
-
"properties": {
|
|
39
|
-
"bytes": { "type": "integer", "minimum": 0 },
|
|
40
|
-
"sha1": { "type": "string" }
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
"description": { "type": "string" }
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"input": {
|
|
48
|
-
"oneOf": [
|
|
49
|
-
{ "type": "string" },
|
|
50
|
-
{ "type": "object", "additionalProperties": { "type": "string" } }
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
"video": {
|
|
54
|
-
"type": "object",
|
|
55
|
-
"required": ["baseWidth", "baseHeight"],
|
|
56
|
-
"additionalProperties": false,
|
|
57
|
-
"properties": {
|
|
58
|
-
"baseWidth": { "type": "integer", "exclusiveMinimum": 0 },
|
|
59
|
-
"baseHeight": { "type": "integer", "exclusiveMinimum": 0 },
|
|
60
|
-
"aspect": { "type": "string" }
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"options": { "type": "object" },
|
|
64
|
-
"capabilities": {
|
|
65
|
-
"type": "object",
|
|
66
|
-
"additionalProperties": false,
|
|
67
|
-
"properties": {
|
|
68
|
-
"saveStates": { "type": "boolean" },
|
|
69
|
-
"sram": { "type": "boolean" },
|
|
70
|
-
"coreSelectable": { "type": "boolean" }
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|