self-host TCS compiler GIR and add portable host runtime

This commit is contained in:
冰朔 2026-08-21 17:15:23 +08:00
commit ff29e52a32
33 changed files with 3848 additions and 831 deletions

View file

@ -0,0 +1,33 @@
schema: tcs.host-abi/v1
id: TCS-HOST-ABI-0001
version: 0.1.0
language_frontend: ONE_TCS_COMPILER
machine_ir: GIR_1
rule: HOST_BACKENDS_MUST_NOT_CHANGE_TCS_SEMANTICS_AUTHORITY_OR_RECEIPTS
targets:
- target_id: TCS-HOST-MACOS-AARCH64-0001
triple: aarch64-apple-darwin
role: HOLOLAKE_HUMAN_AND_PERSONA_LOCAL_NODE
- target_id: TCS-HOST-LINUX-X86_64-0001
triple: x86_64-unknown-linux-musl
role: GUANGHU_OS_LINUX_COMPATIBILITY_SUBSTRATE
- target_id: TCS-HOST-WINDOWS-X86_64-0001
triple: x86_64-pc-windows-msvc
role: HOLOLAKE_WINDOWS_LOCAL_NODE
required_host_operations:
- EXACT_ROOT_FILE_READ
- EXACT_ROOT_ATOMIC_WRITE
- SHA256
- MONOTONIC_TIMEOUT
- TARGET_READBACK
forbidden_host_expansion:
- INFER_TARGET_FROM_CURRENT_DIRECTORY
- INFER_AUTHORITY_FROM_OS_USER
- SUBSTITUTE_SHELL_FOR_UNREGISTERED_OPERATION
- CHANGE_GIR_SEMANTICS_BY_PLATFORM
acceptance:
compile_same_tcs_source_to_same_semantic_gir: REQUIRED
execute_same_gir_with_equivalent_receipt_state: REQUIRED
host_specific_receipt_fields: [target_triple, host_runtime_sha256]
cross_target_evidence_required: true
current_state: CONTRACT_DEFINED_IMPLEMENTATION_IN_PROGRESS