{"id":13767651,"url":"https://github.com/huff-language/huffc","last_synced_at":"2025-05-10T23:30:48.205Z","repository":{"id":38014501,"uuid":"389800640","full_name":"huff-language/huffc","owner":"huff-language","description":"A low level assembly language for the Ethereum Virtual Machine","archived":true,"fork":false,"pushed_at":"2022-07-04T04:07:06.000Z","size":1276,"stargazers_count":260,"open_issues_count":9,"forks_count":32,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-22T05:18:49.489Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/huff-language.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-27T00:07:11.000Z","updated_at":"2025-01-21T19:02:26.000Z","dependencies_parsed_at":"2022-07-11T20:02:40.290Z","dependency_job_id":null,"html_url":"https://github.com/huff-language/huffc","commit_stats":null,"previous_names":["jetjadeja/huff"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huff-language%2Fhuffc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huff-language%2Fhuffc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huff-language%2Fhuffc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huff-language%2Fhuffc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huff-language","download_url":"https://codeload.github.com/huff-language/huffc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253497296,"owners_count":21917683,"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":"2024-08-03T16:01:10.619Z","updated_at":"2025-05-10T23:30:47.873Z","avatar_url":"https://github.com/huff-language.png","language":"TypeScript","funding_links":[],"categories":["Know your roots, anon"],"sub_categories":[],"readme":"# The Huff Programming Language\n\n## 📌 DEPRECATION WARNING\n\nThis repository is considered deprecated and will be archived. For the new version of this tool please go to [huff-rs](https://github.com/huff-language/huff-rs). \n\nYou can continue to use this and it should work as-is but any future issues will not be fixed by the community.\n\n-------\n\n![Huff logo.](logo.png)\n\nHuff is a low-level programming language designed for developing highly optimized smart contracts that run on the Ethereum Virtual Machine (EVM). Huff does not hide the inner workings of the EVM. Instead, Huff exposes its programming stack to the developer for manual manipulation.\n\nRather than having functions, Huff has macros - individual blocks of bytecode that can be rigorously tested and evaluated using the Huff runtime testing suite.\n\nInitially developed by the Aztec Protocol team, Huff was created to write [Weierstrudel](https://github.com/aztecprotocol/weierstrudel/tree/master/huff_modules). Weierstrudel is an on-chain elliptical curve arithmetic library that requires incredibly optimized code that neither [Solidity](https://docs.soliditylang.org/en/v0.8.14/) nor [Yul](https://docs.soliditylang.org/en/v0.8.9/yul.html) could provide.\n\nWhile EVM experts can use Huff to write highly-efficient smart contracts for use in production, it can also serve as a way for beginners to learn more about the EVM.\n\n## Examples\n\nFor usage examples, see the [huff-examples](https://github.com/huff-language/huff-examples) repository.\n\n## Installation\n\n### Prerequisities\n\nMake sure you have the following programs installed:\n\n- [yarn](https://www.npmjs.com/package/yarn)\n- [Typescript](https://www.npmjs.com/package/typescript)\n- [ts-node](https://www.npmjs.com/package/ts-node#overview)\n\n### Steps\n\nThis is how to create the contract bytecode to output _Hello, World!_ in Huff.\n\n1. Install Huff globally:\n\n    ```shell\n    yarn global add huffc\n    ```\n\n**Note:** You may need to add yarn to your system's path to access globally installed packages. See [the yarn docs on global](https://classic.yarnpkg.com/en/docs/cli/global) for more details.\n\n## Hello World\n\n1. Create a file called `hello-world.huff` and enter the following content:\n\n    ```javascript\n    #define macro MAIN() = takes (0) returns (0) {\n        0x48656c6c6f2c20776f726c6421 0x00 mstore // Store \"Hello, World!\" in memory.\n        0x1a 0x00 return // Return 26 bytes starting from memory pointer 0.\n    }\n    ```\n\n2. Use `huffc` to compile the contract and output bytecode:\n\n    ```shell\n    huffc hello-world.huff --bytecode\n    ```\n\n    This will output something like:\n\n    ```plaintext\n    6100168061000d6000396000f36c48656c6c6f2c20776f726c6421600052601a6000f3 \n    ```\n\n## More help\n\nRun `huffc --help` to view a full list of arguments:\n\n```shell\nhuffc --help\n\n\u003e Usage: huffc [options]\n\u003e \n\u003e Options:\n\u003e   -V, --version                    output the version number\n\u003e   -V, --version                    Show the version and exit\n\u003e   --base-path \u003cpath\u003e               The base path to the contracts (default: \"./\")\n\u003e   --output-directory \u003coutput-dir\u003e  The output directory (default: \"./\")\n\u003e   --bytecode                       Generate and log bytecode (default: false)\n\u003e   -o, output                       The output file\n\u003e   -p, --paste                      Paste the output to the terminal\n\u003e   -h, --help                       display help for command\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuff-language%2Fhuffc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuff-language%2Fhuffc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuff-language%2Fhuffc/lists"}