{"id":26359077,"url":"https://github.com/fernandothedev/farpy","last_synced_at":"2025-10-17T03:32:42.141Z","repository":{"id":280324583,"uuid":"941573116","full_name":"FernandoTheDev/farpy","owner":"FernandoTheDev","description":"...","archived":false,"fork":false,"pushed_at":"2025-03-02T19:04:53.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-02T19:22:54.851Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/FernandoTheDev.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}},"created_at":"2025-03-02T16:03:38.000Z","updated_at":"2025-03-02T18:11:11.000Z","dependencies_parsed_at":"2025-03-02T19:22:57.295Z","dependency_job_id":"71c66955-0f29-4dcf-9d0d-ab2a869d4113","html_url":"https://github.com/FernandoTheDev/farpy","commit_stats":null,"previous_names":["fernandothedev/farpy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FernandoTheDev%2Ffarpy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FernandoTheDev%2Ffarpy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FernandoTheDev%2Ffarpy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FernandoTheDev%2Ffarpy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FernandoTheDev","download_url":"https://codeload.github.com/FernandoTheDev/farpy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243893860,"owners_count":20364916,"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-03-16T15:58:39.469Z","updated_at":"2025-10-17T03:32:42.125Z","avatar_url":"https://github.com/FernandoTheDev.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.png\" width=\"150\" alt=\"farpy logo\"/\u003e\n\u003c/p\u003e\n\n# Farpy Compiler\n\nFarpy is a statically-typed, compiled programming language designed for performance, safety, and simplicity. Written entirely in TypeScript, Farpy generates a lean and highly optimized binary without relying on external dependencies. Its standard library is implemented in C to maximize execution speed and maintain a compact footprint.\n\n**Complete documentation**: [Doc](doc/) | **Version:** `0.0.3`\n\n## Key Features\n\n- **Compiled Language**: Converts high-level Farpy code directly into native machine code through manual LLVM IR generation.\n- **Manual IR Generation**: All LLVM IR is produced by a custom TypeScript library, avoiding FFI or external APIs.\n- **Lightweight Binaries**: Generated executables are small and optimized for fast startup and runtime performance.\n- **No External Dependencies**: Built from the ground up to ensure full control over security and quality.\n- **Native Standard Library**: Core libraries written in C to leverage proven performance optimizations.\n\n## Architecture\n\n1. **Frontend**: Parses Farpy source files using a custom parser in TypeScript and builds an abstract syntax tree (AST).\n2. **Type System**: Performs static type checking with support for primitive types and structures.\n3. **IR Generator**: Translates the AST into LLVM IR using an in-house TypeScript library, without any FFI or external bindings.\n4. **Optimization \u0026 Codegen**: Uses LLVM tools (`llvm-as`, `clang`) to assemble the IR into native object code.\n5. **Linking**: Combines object files and C-based standard library modules into a final executable using `clang` and `llvm-link`.\n6. **Strip**: Removes symbols and debug information from the binary to reduce its size using the `strip` tool.\n7. **UPX**: Compresses the binary to make it smaller and faster to load using the `upx` tool.\n\n## Prerequisites\n\nTo build and run the Farpy compiler on Linux:\n\n- [Deno](https://deno.land/) - JavaScript and TypeScript runtime\n- [Clang](https://clang.llvm.org/) - C/C++ compiler frontend\n- [UPX](https://upx.github.io/) - Ultimate Packer for Executables (to compress the binary)\n- LLVM toolchain:\n  - `llvm-as` (LLVM assembler)\n  - `llvm-link` (IR linker)\n  - `strip` (symbol stripper)\n\nEnsure that all tools are available in your system `PATH`.\n\n## Getting Started\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/fernandothedev/farpy.git\n   cd farpy\n   ```\n2. **Install dependencies**:\n   ```bash\n   deno cache farpy.ts\n   ```\n3. **Build the compiler**:\n   ```bash\n   ./build install\n   ```\n4. **Compile a Farpy program**:\n   ```bash\n   farpy examples/hello.fp --opt --o hello\n   ```\n5. **Run the generated executable**:\n   ```bash\n   ./hello\n   ```\n6. **See how to use compiler flags**\n   ```bash\n   farpy --h\n   ```\n\n## Contributing\n\nFarpy is under active development. Contributions are welcome:\n\n1. Fork the repository.\n2. Create a new branch for your feature or bugfix.\n3. Commit your changes with clear messages.\n4. Open a pull request against the `main` branch.\n\nPlease ensure your code follows the existing style and includes tests for new functionality.\n\n## Project Status\n\n- **In Development**: We have already generated optimized and fast binary (faster than many languages ​​out there), we are currently adding features and resources that are not ready yet. Follow the examples folder to see what is already possible to do.\n\n- **Planned**:\n  - Support for Windows and macOS platforms.\n  - Enhancements to the standard library.\n  - Additional compiler optimizations and language features.\n\n## License\n\nThis project is released under the MIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandothedev%2Ffarpy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffernandothedev%2Ffarpy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandothedev%2Ffarpy/lists"}