Skip to content
프로젝트

소개

Ruby와 Rust로 작성된 개발 중인 Ruby 컴파일러

프로그래밍 언어 및 런타임

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
-1
in 1 month
0

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Natalie

GitHub build status MIT License justforfunnoreally.dev badge

Natalie is a work-in-progress Ruby implementation.

It provides an ahead-of-time compiler, written in Ruby, using LLVM with a Rust runtime. Also, the language has a REPL that performs incremental compilation.

demo screencast

There is much work left to do before this is useful. Please let me know if you want to help!

Building

Natalie is tested on macOS and Ubuntu Linux. Windows is not yet supported.

Install Nix, then enter the development shell (or let direnv enter it for you) and build:

nix develop
bundle install
rake

Usage

REPL:

bin/natalie

Run a Ruby script:

bin/natalie examples/hello.rb

Compile a file to an executable:

bin/natalie -c hello examples/hello.rb
./hello

Running Tests

Natalie runs ruby/spec and its own spec-style tests with MSpec. Initialize ext/mspec with git submodule update --init ext/mspec if it is missing. To run a single spec:

bin/natalie -Itest/support -rspec spec/core/string/strip_spec.rb

This will run the tests and tell you if there are any failures.

If you want to run all the tests that we expect to pass, you can run:

rake test

Lastly, if you need to run a handful of tests locally, you can use the test/runner.rb helper script:

bin/natalie test/runner.rb test/natalie/if_test.rb test/natalie/loop_test.rb

What's the difference between the 'spec/' and 'test/' directories?

The files in spec/ come from the excellent ruby/spec project, which is a community-curated repo of test files that any Ruby implementation can use to compare its conformance to what MRI (Matz's Ruby Interpreter) does. We copy specs over as we implement the part of the language that they cover.

Everything in test/ is stuff we wrote while working on Natalie. These are tests that helped us bootstrap certain parts of the language and/or weren't covered as much as we would like by the official Ruby specs. We use this to supplement the specs in spec/.

Copyright & License

Natalie is copyright 2025, Tim Morgan and contributors. Natalie is licensed under the MIT License; see the LICENSE file in this directory for the full text.

Some parts of this program are copied from other sources, and the copyright belongs to the respective owner. Such copyright notices are either at the top of the respective file, in the same directory with a name like LICENSE, or both.

file(s) copyright license
abbrev.rb Akinori Musha BSD
benchmark.rb Gotoken BSD
bigint.{h,c} 983 Unlicense
cgi.rb/cgi/* Wakou Aoyama BSD
crypt.{h,c} The Regents of the Univ. of Cali. BSD
delegate.rb Yukihiro Matsumoto BSD
dtoa.c David M. Gay, Lucent Technologies custom permissive
erb/util.rb Masatoshi SEKI BSD
ipaddr.rb Hajimu Umemoto and Akinori Musha BSD
find.rb Kazuki Tsujimoto BSD
formatter.rb Yukihiro Matsumoto BSD
linenoise S. Sanfilippo and P. Noordhuis BSD
matrix.rb/matrix/* Marc-Andre Lafortune BSD
minicoro.h Eduardo Bart MIT
net/ftp.rb Shugo Maeda BSD
net/http*/net/protocol.rb Yukihiro Matsumoto and Minero Aoki BSD
pp.rb Yukihiro Matsumoto BSD
prettyprint.rb Yukihiro Matsumoto BSD
resolv.rb Tanaka Akira BSD
shellwords.rb Akinori MUSHA BSD
spec/* Engine Yard, Inc. MIT
timeout.rb Yukihiro Matsumoto BSD
unicode_normalize/* Ayumu Nojima and Martin J. Dürst BSD
uri.rb/uri/* Akira Yamada BSD
version.rb Engine Yard, Inc. MIT
zlib Jean-loup Gailly and Mark Adler zlib license

See each file above for full copyright and license text.

관련 프로젝트 살펴보기

불러오는 중…