{
  "abi": {
    "aggregate_mapping": {
      "planned": "pointer+length byte slices carrying canonical JSON/CBOR/MessagePack for snapshots, events, transition plans, and effect-intent arrays",
      "status": "not-stable-yet"
    },
    "c_abi_sketch": [
      "typedef struct { uint8_t* ptr; uint64_t len; } CapsBytes;",
      "CapsBytes caps_step(CapsBytes snapshot, CapsBytes event);",
      "void caps_free(CapsBytes result);"
    ],
    "effectful_runtime_rule": "Compiled capsules compute transition plans and typed EffectIntent values. Host policy/adapters execute approved effects and write trace/ledger records.",
    "scalar_mapping": {
      "Bool": {
        "c_abi": "uint32_t",
        "riscv64": "a0 integer 0/1",
        "wasm": "i32 0/1"
      },
      "I32": {
        "c_abi": "int64_t current ABI",
        "riscv64": "a0 integer",
        "wasm": "i64 current ABI"
      },
      "I64": {
        "c_abi": "int64_t",
        "riscv64": "a0 integer",
        "wasm": "i64"
      },
      "U32": {
        "c_abi": "uint64_t current ABI",
        "riscv64": "a0 integer",
        "wasm": "i64 current ABI"
      },
      "U64": {
        "c_abi": "uint64_t",
        "riscv64": "a0 integer",
        "wasm": "i64"
      }
    },
    "status": "reference-draft",
    "version": "0.1"
  },
  "module": "examples.change_approval",
  "semantic_hash": "03aba488bc8360fb510ced3396ca2ef1e1e71d56e0ea172fe0b70790ba9f27dc",
  "targets": [
    {
      "artifact_bytes_estimate": 69,
      "codegen_backend": "wasm",
      "coverage": {
        "functions_supported": [],
        "functions_total": 0,
        "functions_unsupported": [],
        "machines_supported": [],
        "machines_total": 1,
        "machines_unsupported": [
          "ChangeApproval"
        ]
      },
      "diagnostics": [
        {
          "code": "W_BACKEND_MACHINE_UNSUPPORTED",
          "message": "wasm does not generate machine execution for machine 'ChangeApproval'; use xstate/scxml or the reference runtime",
          "path": [
            "machines",
            "ChangeApproval"
          ],
          "severity": "WARNING"
        },
        {
          "code": "W_BACKEND_NO_FUNCTIONS",
          "message": "wasm has no functions to emit",
          "path": [
            "functions"
          ],
          "severity": "WARNING"
        }
      ],
      "mode": "text-emission",
      "requires_tools": [],
      "status": "ready",
      "target": "wat",
      "unavailable_tools": []
    },
    {
      "artifact_bytes_estimate": 69,
      "codegen_backend": "wasm",
      "coverage": {
        "functions_supported": [],
        "functions_total": 0,
        "functions_unsupported": [],
        "machines_supported": [],
        "machines_total": 1,
        "machines_unsupported": [
          "ChangeApproval"
        ]
      },
      "diagnostics": [
        {
          "code": "W_BACKEND_MACHINE_UNSUPPORTED",
          "message": "wasm does not generate machine execution for machine 'ChangeApproval'; use xstate/scxml or the reference runtime",
          "path": [
            "machines",
            "ChangeApproval"
          ],
          "severity": "WARNING"
        },
        {
          "code": "W_BACKEND_NO_FUNCTIONS",
          "message": "wasm has no functions to emit",
          "path": [
            "functions"
          ],
          "severity": "WARNING"
        },
        {
          "code": "W_TOOLCHAIN_UNAVAILABLE",
          "message": "target requires unavailable external tool(s): wat2wasm",
          "path": [
            "targets",
            "wasm",
            "toolchain"
          ],
          "severity": "WARNING",
          "unavailable": [
            "wat2wasm"
          ]
        }
      ],
      "mode": "wat-to-wasm-binary",
      "requires_tools": [
        "wat2wasm"
      ],
      "status": "blocked-or-planned",
      "target": "wasm",
      "unavailable_tools": [
        "wat2wasm"
      ]
    },
    {
      "artifact_bytes_estimate": 124,
      "codegen_backend": "riscv",
      "coverage": {
        "functions_supported": [],
        "functions_total": 0,
        "functions_unsupported": [],
        "machines_supported": [],
        "machines_total": 1,
        "machines_unsupported": [
          "ChangeApproval"
        ]
      },
      "diagnostics": [
        {
          "code": "W_BACKEND_MACHINE_UNSUPPORTED",
          "message": "riscv does not generate machine execution for machine 'ChangeApproval'; use xstate/scxml or the reference runtime",
          "path": [
            "machines",
            "ChangeApproval"
          ],
          "severity": "WARNING"
        },
        {
          "code": "W_BACKEND_NO_FUNCTIONS",
          "message": "riscv has no functions to emit",
          "path": [
            "functions"
          ],
          "severity": "WARNING"
        }
      ],
      "mode": "text-emission",
      "requires_tools": [],
      "status": "ready",
      "target": "riscv64",
      "unavailable_tools": []
    },
    {
      "artifact_bytes_estimate": 69,
      "codegen_backend": "wasm",
      "coverage": {
        "functions_supported": [],
        "functions_total": 0,
        "functions_unsupported": [],
        "machines_supported": [],
        "machines_total": 1,
        "machines_unsupported": [
          "ChangeApproval"
        ]
      },
      "diagnostics": [
        {
          "code": "W_BACKEND_MACHINE_UNSUPPORTED",
          "message": "wasm does not generate machine execution for machine 'ChangeApproval'; use xstate/scxml or the reference runtime",
          "path": [
            "machines",
            "ChangeApproval"
          ],
          "severity": "WARNING"
        },
        {
          "code": "W_BACKEND_NO_FUNCTIONS",
          "message": "wasm has no functions to emit",
          "path": [
            "functions"
          ],
          "severity": "WARNING"
        },
        {
          "code": "W_NATIVE_AOT_PLANNED",
          "message": "native-aarch64 is currently a planned Wasm-AOT path; emit Wasm/WAT today and AOT package with a host runtime",
          "path": [
            "targets",
            "native-aarch64"
          ],
          "severity": "WARNING"
        },
        {
          "code": "W_TOOLCHAIN_UNAVAILABLE",
          "message": "target requires unavailable external tool(s): wat2wasm, wasmtime",
          "path": [
            "targets",
            "native-aarch64",
            "toolchain"
          ],
          "severity": "WARNING",
          "unavailable": [
            "wat2wasm",
            "wasmtime"
          ]
        }
      ],
      "mode": "wasm-aot-native-performance",
      "requires_tools": [
        "wat2wasm",
        "wasmtime"
      ],
      "status": "blocked-or-planned",
      "target": "native-aarch64",
      "unavailable_tools": [
        "wat2wasm",
        "wasmtime"
      ]
    }
  ],
  "toolchain": {
    "host": {
      "machine": "x86_64",
      "platform": "Linux-4.4.0-x86_64-with-glibc2.41",
      "system": "Linux"
    },
    "tools": {
      "clang": {
        "available": true,
        "path": "/usr/local/swift/usr/bin/clang",
        "purpose": "future LLVM/native backend toolchain; not used by current direct emitters"
      },
      "lean": {
        "available": false,
        "path": null,
        "purpose": "verify Lean proof artifacts"
      },
      "llvm-mc": {
        "available": false,
        "path": null,
        "purpose": "assemble RV64 reference assembly when LLVM has RISC-V support"
      },
      "riscv64-linux-gnu-as": {
        "available": false,
        "path": null,
        "purpose": "assemble RV64 Linux assembly"
      },
      "riscv64-unknown-elf-as": {
        "available": false,
        "path": null,
        "purpose": "assemble RV64 bare-metal assembly"
      },
      "solc": {
        "available": false,
        "path": null,
        "purpose": "validate Solidity artifacts emitted by the existing backend"
      },
      "wasm-tools": {
        "available": false,
        "path": null,
        "purpose": "validate or transform WebAssembly artifacts"
      },
      "wasmer": {
        "available": false,
        "path": null,
        "purpose": "run WebAssembly artifacts"
      },
      "wasmtime": {
        "available": false,
        "path": null,
        "purpose": "run or ahead-of-time compile WebAssembly artifacts"
      },
      "wat2wasm": {
        "available": false,
        "path": null,
        "purpose": "assemble WebAssembly text (.wat) into binary .wasm"
      }
    }
  }
}
