natalie-lang/natalie
Acerca de
Un compilador de Ruby en desarrollo, escrito en Ruby y Rust
Lenguajes y entornos de ejecuciónCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- 0
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalNatalie
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.

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.
Explorar proyectos relacionados
Cargando…