Skip to content

Content-Addressed Functions (Unison-style hashing) #417

Closed

Description

@gHashTag

Overview

Implement content-addressed function storage for TRI-LANG, inspired by Unison language.

Requirements

  • SHA256 hashing of normalized function ASTs
  • Alpha-equivalence (variable names don't affect hash)
  • Registry mapping hashes to function locations
  • Support for deduplication, caching, incremental compilation

Implementation

  • src/tri-lang/content_hash.zig - Hash generation (~100 LOC)
  • src/tri-lang/content_registry.zig - Hash-to-location registry (~120 LOC)
  • Integration into src/tri-lang/pipeline.zig (~80 LOC additions)

Status

✅ Implementation complete
✅ All tests passing (8/8 content_hash tests)
✅ Zig 0.15 compatibility fixed

Activity

  1. added a commit that references this issue on Apr 30, 2026
    51366c4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions