{"id":13405758,"url":"https://github.com/natalie-lang/natalie","last_synced_at":"2026-01-15T01:25:07.622Z","repository":{"id":37022442,"uuid":"221249571","full_name":"natalie-lang/natalie","owner":"natalie-lang","description":"a work-in-progress Ruby compiler, written in Ruby and C++","archived":false,"fork":false,"pushed_at":"2025-12-22T06:33:34.000Z","size":17831,"stargazers_count":1018,"open_issues_count":24,"forks_count":70,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-12-23T01:31:35.389Z","etag":null,"topics":["compiler","cpp","language","ruby"],"latest_commit_sha":null,"homepage":"https://natalie-lang.org","language":"Ruby","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/natalie-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-11-12T15:25:47.000Z","updated_at":"2025-12-22T06:33:38.000Z","dependencies_parsed_at":"2023-09-24T23:06:28.093Z","dependency_job_id":"c93a58ef-e02e-46d8-bfe2-486f5590fcdf","html_url":"https://github.com/natalie-lang/natalie","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/natalie-lang/natalie","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natalie-lang%2Fnatalie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natalie-lang%2Fnatalie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natalie-lang%2Fnatalie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natalie-lang%2Fnatalie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natalie-lang","download_url":"https://codeload.github.com/natalie-lang/natalie/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natalie-lang%2Fnatalie/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28441031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"ssl_error","status_checked_at":"2026-01-15T00:55:20.945Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["compiler","cpp","language","ruby"],"created_at":"2024-07-30T19:02:10.635Z","updated_at":"2026-01-15T01:25:07.601Z","avatar_url":"https://github.com/natalie-lang.png","language":"Ruby","funding_links":[],"categories":["Ruby","Recently Updated","Implementations/Compilers"],"sub_categories":["[Oct 18, 2024](/content/2024/10/18/README.md)"],"readme":"# Natalie\n\n[![GitHub build status](https://github.com/natalie-lang/natalie/actions/workflows/test.yml/badge.svg)](https://github.com/natalie-lang/natalie/actions?query=workflow%3ATest+branch%3Amaster)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue)](https://github.com/natalie-lang/natalie/blob/master/LICENSE)\n[![justforfunnoreally.dev badge](https://img.shields.io/badge/justforfunnoreally-dev-9ff)](https://justforfunnoreally.dev)\n\nNatalie is a work-in-progress Ruby implementation.\n\nIt provides an ahead-of-time compiler using C++ and gcc/clang as the backend.\nAlso, the language has a REPL that performs incremental compilation.\n\n![demo screencast](examples/demo.gif)\n\nThere is much work left to do before this is useful. Please let me know if you\nwant to help!\n\n## Helping Out\n\nContributions are welcome! You can learn more about how I work on Natalie via\nthe [hacking session videos on YouTube](https://www.youtube.com/playlist?list=PLWUx_XkUoGTq-nkbhnk6PN4m109ISo5BX).\n\nThe easiest way to get started right now would be to find a method on an object\nthat is not yet implemented and make it yourself! Also take a look at\n[good first issues](https://github.com/natalie-lang/natalie/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).\n(See the 'Building' and 'Running Tests' sections below for some helpful steps.)\n\nWe have a very quiet [Discord server](https://discord.gg/hnHp2tdQyn) -- come and hang out!\n\n## Building\n\nNatalie is tested on macOS and Ubuntu Linux. Windows is not yet supported.\n\nNatalie requires a system Ruby (MRI) to host the compiler, for now.\n\nPrerequisites:\n\n- git\n- autoconf\n- automake\n- libtool\n- GNU make\n- gcc or clang\n- Ruby 3.2 or higher with dev headers\n  - Using [rbenv](https://github.com/rbenv/rbenv) to install Ruby is preferred.\n  - Installing [rbenv-aliases](https://github.com/tpope/rbenv-aliases) along with rbenv helps with matching Ruby versions like `3.2` to the latest patch release.\n  - If not using rbenv or another version manager, you'll need the `ruby` and `ruby-dev` package from your system.\n- ccache (optional, but recommended)\n- compiledb (optional, but recommended)\n\nInstall the above prerequisites on your platform, then run:\n\n```sh\ngit clone https://github.com/natalie-lang/natalie\ncd natalie\nrake\n```\n\n### Troubleshooting Build Errors\n\n- **Don't use `sudo`!** If you already made that mistake, then you should `sudo rm -rf build`\n  and try again.\n- If you get an error about file permissions, e.g. unable to write a file to somewhere like\n  `/usr/lib/ruby`, or another path that would require root, then you have a couple options:\n  - Use a tool like [rbenv](https://github.com/rbenv/rbenv) to install a Ruby version in your\n    home directory. Gems will also be installed there. Run `rbenv version` to see which version\n    is currently selected. Run `rbenv shell` followed by a version to select that version.\n  - Specify where to install gems with something like:\n    ```\n    mkdir -p ~/gems\n    export GEM_HOME=~/gems\n    ```\n    You'll just have to remember to do that every time you open a new terminal tab.\n- If you get an error about missing `bundler`, then your operating system probably didn't\n  install it alongside Ruby. You can run `gem install bundler` to get it.\n\n## Usage\n\n**REPL:**\n\n```sh\nbin/natalie\n```\n\n**Run a Ruby script:**\n\n```sh\nbin/natalie examples/hello.rb\n```\n\n**Compile a file to an executable:**\n\n```sh\nbin/natalie -c hello examples/hello.rb\n./hello\n```\n\n## Using With Docker\n\n```\ndocker build -t natalie .                                            # build image\ndocker run -it --rm natalie                                          # repl\ndocker run -it --rm natalie -e \"p 2 * 3\"                             # immediate\ndocker run -it --rm -v$(pwd)/myfile.rb:/myfile.rb natalie /myfile.rb # execute a local rb file\ndocker run -it --rm --entrypoint bash natalie                        # bash prompt\n```\n\n## Running Tests\n\nTo run a test (or spec), you can run it like a normal Ruby script:\n\n```sh\nbin/natalie spec/core/string/strip_spec.rb\n```\n\nThis will run the tests and tell you if there are any failures.\n\nIf you want to run all the tests that we expect to pass, you can run:\n\n```sh\nrake test\n```\n\nLastly, if you need to run a handful of tests locally, you can use the\n`test/runner.rb` helper script:\n\n```sh\nbin/natalie test/runner.rb test/natalie/if_test.rb test/natalie/loop_test.rb\n```\n\n### What's the difference between the 'spec/' and 'test/' directories?\n\nThe files in `spec/` come from the excellent [ruby/spec](https://github.com/ruby/spec)\nproject, which is a community-curated repo of test files that any Ruby\nimplementation can use to compare its conformance to what MRI (Matz's Ruby\nInterpreter) does. We copy specs over as we implement the part of the language\nthat they cover.\n\nEverything in `test/` is stuff we wrote while working on Natalie. These are\ntests that helped us bootstrap certain parts of the language and/or weren't\ncovered as much as we would like by the official Ruby specs. We use this\nto supplement the specs in `spec/`.\n\n## Copyright \u0026 License\n\nNatalie is copyright 2025, Tim Morgan and contributors. Natalie is licensed\nunder the MIT License; see the `LICENSE` file in this directory for the full text.\n\nSome parts of this program are copied from other sources, and the copyright\nbelongs to the respective owner. Such copyright notices are either at the top of\nthe respective file, in the same directory with a name like `LICENSE`, or both.\n\n| file(s)          | copyright                         | license           |\n| ---------------- | --------------------------------- | ----------------- |\n| `abbrev.rb`      | Akinori Musha                     | BSD               |\n| `benchmark.rb`   | Gotoken                           | BSD               |\n| `bigint.{h,c}`   | 983                               | Unlicense         |\n| `cgi.rb`/`cgi/*` | Wakou Aoyama                      | BSD               |\n| `crypt.{h,c}`    | The Regents of the Univ. of Cali. | BSD               |\n| `delegate.rb`    | Yukihiro Matsumoto                | BSD               |\n| `dtoa.c`         | David M. Gay, Lucent Technologies | custom permissive |\n| `erb/util.rb`    | Masatoshi SEKI                    | BSD               |\n| `ipaddr.rb`      | Hajimu Umemoto and Akinori Musha  | BSD               |\n| `find.rb`        | Kazuki Tsujimoto                  | BSD               |\n| `formatter.rb`   | Yukihiro Matsumoto                | BSD               |\n| `linenoise`      | S. Sanfilippo and P. Noordhuis    | BSD               |\n| `minicoro.h`     | Eduardo Bart                      | MIT               |\n| `pp.rb`          | Yukihiro Matsumoto                | BSD               |\n| `prettyprint.rb` | Yukihiro Matsumoto                | BSD               |\n| `shellwords.rb`  | Akinori MUSHA                     | BSD               |\n| `spec/*`         | Engine Yard, Inc.                 | MIT               |\n| `uri.rb`/`uri/*` | Akira Yamada                      | BSD               |\n| `version.rb`     | Engine Yard, Inc.                 | MIT               |\n| `zlib`           | Jean-loup Gailly and Mark Adler   | zlib license      |\n\nSee each file above for full copyright and license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatalie-lang%2Fnatalie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatalie-lang%2Fnatalie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatalie-lang%2Fnatalie/lists"}