{"id":28520254,"url":"https://github.com/fuellabs/fasm","last_synced_at":"2026-05-19T07:32:53.307Z","repository":{"id":294713758,"uuid":"975305471","full_name":"FuelLabs/fasm","owner":"FuelLabs","description":"A mini Fuel Assembly language.","archived":false,"fork":false,"pushed_at":"2025-04-30T05:30:34.000Z","size":246,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-02T14:44:31.199Z","etag":null,"topics":["assembly","compiler","fasm","fuel","language"],"latest_commit_sha":null,"homepage":"https://fasm.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FuelLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-04-30T05:29:15.000Z","updated_at":"2025-04-30T05:31:05.000Z","dependencies_parsed_at":"2025-05-21T18:44:27.442Z","dependency_job_id":null,"html_url":"https://github.com/FuelLabs/fasm","commit_stats":null,"previous_names":["fuellabs/fasm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FuelLabs/fasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Ffasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Ffasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Ffasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Ffasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FuelLabs","download_url":"https://codeload.github.com/FuelLabs/fasm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuelLabs%2Ffasm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278542684,"owners_count":26004061,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["assembly","compiler","fasm","fuel","language"],"created_at":"2025-06-09T07:01:15.102Z","updated_at":"2025-10-06T00:48:06.470Z","avatar_url":"https://github.com/FuelLabs.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fasm\nA mini assembly language for the Fuel Virtual Machine (FuelVM).\n\n## Features\n- Lightweight (~350 lines of code) and written in Typescript\n- Compiles directly to FuelVM assembly\n- Debugging information included\n- Clean errors with line numbers\n- Simplistic syntax and grammar\n- Supports:\n    - Single line comments\n    - Static and relative jump labels\n    - Data management\n    - Error code and error mangement\n    - Custom register labeling and management\n    - Basic equality (largely for visbility)\n    - All FuelVM opcodes\n    - Supportive dictionaries (gm, gtf, reserved registers)\n- Meant as a learning tool for Fuel, the FuelVM and for improving the performance of Sway\n- Open Source under MIT\n\n## Example:\n```bash\n# FASM example\n# Loop 5 times, add 1 to index, then log gm, gtf codes and my_data, then return 1\nreg.max = movi 5\n\n.loop\nreg.index = addi reg.index 1\njnei reg.index reg.max .loop.rel\n\n# Log gm.tx_start code, gtf.tx_length code, my_data and return 1\nreg.data_start = addi reg.is data.my_data.start\nreg.data_length = movi data.my_data.len\nlogd gm.tx_start gtf.tx_length reg.data_start reg.data_length\nret reg.one\n\nmy_data: 0xabcdef\nsecond_data: 0x0011223344\n```\n\n## FASM Language Rules\n```\nComments: # My Comment\nJump label: .my_label\nRelative jump label: .my_label.rel\nData start pointer: data.my_data.start # program length + data position\nData length pointer: data.my_data.len\nData end pointer: data.my_data.end # program length + data position + data len\nTotal Data length: data.len\nReserved registers: reg.zero, reg.one, reg.is\nErrors: error.my_error # first use assigns, secondary use references, starts from 0 and counts up\nCustom register labeling: reg.my_new_reg # first use assigns, secondary use refers, starts at 16 (up to 64)\nCustom register equality assignment: reg.max = movi 5 # is the same as movi reg.max 5\n```\n\nTo install dependencies:\n\n```bash\nbun install\n```\n\nTo build:\n\n```bash\nbun run build\n```\n\nTo test:\n\n```bash\nbun test\n```\n\n## Browser\nThere is an editor included in the fasm.dev.\n\nFeatures:\n- Code examples\n- Auto complete\n- Syntax highlighting\n- ACE configurations\n- Output Console\n\nThis can be run locally using a simple server:\n```bash\nbun run build\npython3 -m http.server 8080\n# Go to http://localhost:8080/fast.dev/\n```\n\n## API\nThe primary API exports the `compile` function below:\n```\nexport function compile(input: string = \"\"): CompileResult\n```\n\n## Grammar File\nThis repo comes with a complete ACE grammar file:\n```bash\n./grammar/grammar.json\n```\n\n## Compiler Design\n- A single function written in TS\n- Does multiple passes (likely 4-6)\n- Is designed around single code line grammar\n- Designed to work around the FuelVM opcodes directly\n- Register and error manager just counts up (no free pointer logic just yet)\n- Max 48 custom registers can be assigned\n\n## Contributors\n- Special thanks to the Fuel Client team and the Fuel Typescript team\n\n## Todo\n- More tests","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuellabs%2Ffasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuellabs%2Ffasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuellabs%2Ffasm/lists"}