{"id":13483505,"url":"https://github.com/geppetto-apps/crow","last_synced_at":"2025-03-27T14:31:20.365Z","repository":{"id":152299387,"uuid":"65306598","full_name":"geppetto-apps/crow","owner":"geppetto-apps","description":"Transpile/compile Crystal to Flow","archived":true,"fork":false,"pushed_at":"2017-05-25T20:48:40.000Z","size":166,"stargazers_count":48,"open_issues_count":5,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-14T08:38:39.269Z","etag":null,"topics":["crystal","flow"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/geppetto-apps.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2016-08-09T15:31:48.000Z","updated_at":"2024-05-31T13:58:27.000Z","dependencies_parsed_at":"2023-05-23T19:15:40.742Z","dependency_job_id":null,"html_url":"https://github.com/geppetto-apps/crow","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geppetto-apps%2Fcrow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geppetto-apps%2Fcrow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geppetto-apps%2Fcrow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geppetto-apps%2Fcrow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geppetto-apps","download_url":"https://codeload.github.com/geppetto-apps/crow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245863082,"owners_count":20684785,"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":["crystal","flow"],"created_at":"2024-07-31T17:01:12.094Z","updated_at":"2025-03-27T14:31:20.055Z","avatar_url":"https://github.com/geppetto-apps.png","language":"Crystal","funding_links":[],"categories":["Implementations/Compilers"],"sub_categories":[],"readme":"# [![Crow](logo.png)](https://github.com/geppetto-apps/crow)\n\n[![Build Status](https://img.shields.io/circleci/project/github/geppetto-apps/crow.svg)](https://circleci.com/gh/geppetto-apps/crow)\n[![Dependency Status](https://shards.rocks/badge/github/geppetto-apps/crow/status.svg)](https://shards.rocks/github/geppetto-apps/crow)\n[![devDependency Status](https://shards.rocks/badge/github/geppetto-apps/crow/dev_status.svg)](https://shards.rocks/github/geppetto-apps/crow)\n\n# crow\n\n`crow` transpiles [Crystal][cr] source code to valid [Flow][flow]/ES2015/JavaScript.\n\nCode that is transpiled to valid Flow syntax may be transpiled to valid ES2015,\nwhich may be transpiled to Javascript (via [Babel][babel]).\n\n## Warning: Experimental\n\nThis project is in alpha stage and should be considered highly experimental.\n\n## Installation\n\nVia [Homebrew][brew]:\n\n```\nbrew install geppetto-apps/bin/crow\n```\n\nVia [npm][npm]:\n\n```\nnpm install crow-cli -g\n```\n\n## Usage\n\n```sh\n# Compiles and outputs to foo.js.flow\n$ crow foo.cr\n\n# Same as above\n$ cat foo.cr | crow \u003e foo.js.flow\n\n# Compile to JavaScript (via Babel)\n$ npm install babel-preset-es2015 babel-plugin-transform-flow-strip-types\n$ cat foo.cr | crow | babel --plugins transform-flow-strip-types --presets es2015\n```\n\nYou can also use [Docker][docker]:\n\n```sh\n$ cat foo.cr | docker run -i geppettoapps/crow \u003e foo.js.flow\n```\n\n## Motivation \u0026 Goal\n\nThis is both my first Crystal and first compiler project. I was inspired to learn\nmore about compilers after reading [Game Programming Patterns' chapter on bytecode][gpp-bytecode]\nand also Crystal and its relationship with LLVM. Since Crystal is a high-level,\nself-hosted programming language, it's very easy to work with Crystal's internals.\nIn addition to attempting make Crystal target the web, I've learned a lot about\nCrystal from working on this project.\n\nThe goal of this project is to make it possible to write both frontend and backend\ncode for a web project in Crystal; preferably in a way that allows for communication\nbetween native JS and native Crystal code. @asterite from the Crystal Team has\nnoted that [crystal is not geared against the web](https://github.com/crystal-lang/crystal/issues/829#issuecomment-113955554)\nand there's still work left to [make Crystal to work with asm.js][asm-issue].\nDue to this `crow` currently approach the problem by using transpilation, but that\nmay not be the case forever. The only public API for `crow` is the CLI that takes\nin some Crystal code and spits out something may run in the browser.\n\n## Milestones\n\n- [ ] [1.0: Run Crystal code in isolation in the browser](https://github.com/geppetto-apps/crow/milestone/1)\n- [ ] [1.1: DOM manipulations from Crystal code](https://github.com/geppetto-apps/crow/milestone/2)\n- [ ] [1.2: Bind Crystal code to DOM events](https://github.com/geppetto-apps/crow/milestone/3)\n- [ ] [1.3: Call Crystal code from Javascript](https://github.com/geppetto-apps/crow/milestone/4)\n- [ ] [1.4: Call non-DOM related Javascript code from Crystal ](https://github.com/geppetto-apps/crow/milestone/5)\n\n## Supported AST nodes\n\nExtracted from [Crystal's compiler][cr-parser].\n\n- [x] Expressions\n- [x] NilLiteral\n- [x] BoolLiteral\n- [x] NumberLiteral\n- [x] CharLiteral\n- [x] StringLiteral\n- [x] StringInterpolation\n- [x] SymbolLiteral\n- [x] ArrayLiteral\n- [x] HashLiteral\n- [x] NamedTupleLiteral\n- [ ] ProcLiteral\n- [ ] RangeLiteral\n- [ ] RegexLiteral\n- [ ] TupleLiteral\n- [x] Var\n- [x] Block\n- [x] Call\n- [ ] NamedArgument\n- [x] If\n- [x] Unless\n- [ ] IfDef\n- [x] Assign\n- [ ] MultiAssign\n- [x] InstanceVar\n- [ ] ReadInstanceVar\n- [ ] ClassVar\n- [ ] BinaryOp\n- [ ] Arg\n- [x] ProcNotation\n- [x] Def\n- [ ] Macro\n- [ ] UnaryExpression\n- [ ] VisibilityModifier\n- [x] IsA\n- [ ] RespondsTo\n- [ ] Require\n- [x] When\n- [x] Case\n- [ ] ImplicitObj\n- [ ] Path\n- [x] While\n- [x] Until\n- [ ] Generic\n- [ ] TypeDeclaration\n- [ ] UninitializedVar\n- [x] Rescue\n- [x] ExceptionHandler\n- [ ] ProcPointer\n- [ ] Union\n- [x] Self\n- [ ] ControlExpression\n- [ ] Yield\n- [ ] Include\n- [ ] Extend\n- [ ] EnumDef\n- [x] ClassDef\n- [ ] ModuleDef\n- [ ] LibDef\n- [ ] FunDef\n- [ ] TypeDef\n- [ ] CStructOrUnionDef\n- [ ] ExternalVar\n- [x] Alias\n- [ ] Metaclass\n- [ ] Cast\n- [ ] NilableCast\n- [ ] TypeOf\n- [ ] Attribute\n- [ ] MacroExpression\n- [ ] MacroIf\n- [ ] MacroFor\n- [ ] MacroVar\n- [ ] MacroLiteral\n- [ ] Underscore\n- [ ] MagicConstant\n- [ ] Asm\n- [ ] AsmOperand\n\n## Contributing\n\n1. Fork it ( https://github.com/geppetto-apps/crow/fork )\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create a new Pull Request\n\n## Attribution\n\nLogo: [Crow by Encrico Francese][crow-flickr]\n\n## Contributors\n\n- [theodorton](https://github.com/theodorton) Theodor Tonum - creator, maintainer\n\n[cr]: https://crystal-lang.org/\n[cr-src]: https://github.com/crystal-lang/crystal\n[cr-syntax]: https://github.com/crystal-lang/crystal/blob/master/src/compiler/crystal/syntax/ast.cr\n[docker]: https://www.docker.com/\n[flow]: https://flowtype.org/\n[babel]: https://babeljs.io/\n[npm]: https://www.npmjs.com\n[brew]: http://brew.sh/\n[crow-flickr]: https://www.flickr.com/photos/remanufactory/5553711670\n[gpp-bytecode]: http://gameprogrammingpatterns.com/bytecode.html\n[asm-issue]: https://github.com/crystal-lang/crystal/issues/535\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeppetto-apps%2Fcrow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeppetto-apps%2Fcrow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeppetto-apps%2Fcrow/lists"}