{"id":29571716,"url":"https://github.com/blockstreamresearch/simplicityhl","last_synced_at":"2025-07-19T04:07:41.539Z","repository":{"id":191699481,"uuid":"685196593","full_name":"BlockstreamResearch/SimplicityHL","owner":"BlockstreamResearch","description":"Rust-like high-level language that compiles down to Simplicity bytecode. Work in progress.","archived":false,"fork":false,"pushed_at":"2025-07-18T21:01:35.000Z","size":15345,"stargazers_count":30,"open_issues_count":6,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-19T02:02:38.998Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.simfony.dev/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlockstreamResearch.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-30T18:01:45.000Z","updated_at":"2025-07-18T21:01:39.000Z","dependencies_parsed_at":"2023-08-31T08:14:36.174Z","dependency_job_id":"2ffbb349-5604-4e8e-a1e7-b0ba072436e4","html_url":"https://github.com/BlockstreamResearch/SimplicityHL","commit_stats":null,"previous_names":["sanket1729/simp-lang","blockstreamresearch/s-lang","blockstreamresearch/simfony"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BlockstreamResearch/SimplicityHL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockstreamResearch%2FSimplicityHL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockstreamResearch%2FSimplicityHL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockstreamResearch%2FSimplicityHL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockstreamResearch%2FSimplicityHL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlockstreamResearch","download_url":"https://codeload.github.com/BlockstreamResearch/SimplicityHL/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlockstreamResearch%2FSimplicityHL/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265887915,"owners_count":23844498,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-19T04:07:41.111Z","updated_at":"2025-07-19T04:07:41.529Z","avatar_url":"https://github.com/BlockstreamResearch.png","language":"Rust","readme":"Simfony is a high-level language for writing Bitcoin smart contracts.\n\nSimfony looks and feels like [Rust](https://www.rust-lang.org). Just how Rust compiles down to assembly language, Simfony compiles down to [Simplicity](https://github.com/BlockstreamResearch/simplicity) bytecode. Developers write Simfony, full nodes execute Simplicity.\n\n**Simfony is a work in progress and is not yet ready for production use.**\n\n```rust\nlet a: u32 = 10;\nlet b = {\n    let c: u32 = 2;\n    let d: u32 = 3;\n    assert!(jet::eq_32(a, 10)); // Use variables from outer scopes\n    let a: u32 = 7; // Shadow variables from outer scopes\n    jet::max_32(jet::max_32(c, d), a) // Missing ; because the block returns a value\n};\nassert!(jet::eq_32(b, 7));\n```\n\nTake a look at the [example programs](https://github.com/BlockstreamResearch/simfony/tree/master/examples).\n\n## MSRV\n\nThis crate should compile with any feature combination on **Rust 1.78.0** or higher.\n\n## Simplicity's need for a high-level language\n\nSimplicity introduces a groundbreaking low-level programming language and machine model meticulously crafted for blockchain-based smart contracts. The primary goal is to provide a streamlined and comprehensible foundation that facilitates static analysis and encourages reasoning through formal methods. While the elegance of the language itself is distilled into something as succinct as fitting onto a T-shirt, it's important to note that the simplicity of the language doesn't directly equate to simplicity in the development process. Simfony revolves around demystifying and simplifying the complexities involved in this ecosystem.\n\nThe distinguishing aspects that set Simplicity apart from conventional programming languages are:\n\n- **Distinct Programming Paradigm**: Simplicity's programming model requires a paradigm shift from conventional programming. It hinges on reasoning about programs in a functional sense with a focus on combinators. This intricacy surpasses even popular functional languages like Haskell, with its own unique challenges.\n- **Exceptional Low-Level Nature**: Unlike high-level languages such as JavaScript or Python, Simplicity operates at an extremely low level, resembling assembly languages. This design choice enables easier reasoning about the formal semantics of programs, but is really work on directly.\n\n## Simfony\n\nSimfony is a high-level language that compiles to Simplicity. It maps programming concepts from Simplicity onto programming concepts that developers are more familar with. In particular, Rust is a popular language whose functional aspects fit Simplicity well. Simfony aims to closely resemble Rust.\n\nJust how Rust is compiled to assembly language, Simfony is compiled to Simplicity. Just how writing Rust doesn't necessarily produce the most efficient assembly, writing Simfony doesn't necessarily produce the most efficient Simplicity code. The compilers try to optimize the target code they produce, but manually written target code can be more efficient. On the other hand, a compiled language is much easier to read, write and reason about. Assembly is meant to be consumed by machines while Rust is meant to be consumed by humans. Simplicity is meant to be consumed by Bitcoin full nodes while Simfony is meant to be consumed by Bitcoin developers.\n\n## Installation\n\nClone the repo and build the Simfony compiler using cargo.\n\n```bash\ngit clone https://github.com/BlockstreamResearch/simfony.git\ncd simfony\ncargo build\n```\n\nOptionally, install the Simfony compiler using cargo.\n\n```bash\ncargo install --path .\n```\n\n## Usage\n\nThe Simfony compiler takes two arguments:\n\n1. A path to a Simfony program file (`.simf`)\n1. A path to a Simfony witness file (`.wit`, optional)\n\nThe compiler produces a base64-encoded Simplicity program. Witness data will be included if a witness file is provided.\n\n```bash\n./target/debug/simc examples/test.simf examples/test.wit\n```\n\n### VSCode extension\n\nSee the installation [instructions](./vscode/README.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockstreamresearch%2Fsimplicityhl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblockstreamresearch%2Fsimplicityhl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblockstreamresearch%2Fsimplicityhl/lists"}