{"library":"metano-runtime","title":"Metano Runtime","description":"Runtime support library for code generated by the Metano C# → TypeScript transpiler (v1.0.3, updated April 2026). Provides C#-compatible primitives such as HashCode (xxHash32), HashSet with structural equality, a full LINQ API via Enumerable, a branded UUID type for System.Guid mapping, runtime type guards (isInt32, isString, etc.), and JSON serialization (system/json). Release cadence is active (multiple versions per month). Key differentiator: automatically added by Metano to generated projects; side-effect-free for tree-shaking. Requires @typescript/native-preview (peer dep). Only relevant for Metano users; not designed for general-purpose use.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install metano-runtime"],"cli":null},"imports":["import { HashCode } from 'metano-runtime'","import { HashSet } from 'metano-runtime'","import { Enumerable } from 'metano-runtime'","import { UUID } from 'metano-runtime'","import { JsonSerializer } from 'metano-runtime/system/json'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { HashCode, HashSet, Enumerable, UUID, isInt32 } from 'metano-runtime';\n// HashCode usage\nconst hc = new HashCode();\nhc.add('hello');\nhc.add(42);\nconst hash = hc.toHashCode(); // number\n// HashSet with structural equality\nclass Point {\n  constructor(readonly x: number, readonly y: number) {}\n  equals(other: Point) { return this.x === other.x && this.y === other.y; }\n  hashCode() {\n    const hc = new HashCode();\n    hc.add(this.x);\n    hc.add(this.y);\n    return hc.toHashCode();\n  }\n}\nconst set = new HashSet<Point>();\nset.add(new Point(1, 2));\nconsole.log(set.has(new Point(1, 2))); // true\n// Enumerable (LINQ)\nconst result = Enumerable.from([1, 2, 3, 4, 5])\n  .where(x => x > 1)\n  .select(x => x * 2)\n  .toArray(); // [4, 6, 8, 10]\n// UUID\nconst id = UUID.newUuid();\nconsole.log(id); // \"550e8400-e29b-41d4-a716-446655440000\"\nif (UUID.isUuid(id)) { console.log('valid UUID'); }\n// Type guard\nconsole.log(isInt32(123)); // true\nconsole.log(isInt32(1.5)); // false","lang":"typescript","description":"Demonstrates core runtime features: HashCode, HashSet, Enumerable, UUID, and int32 type guard.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}