Rolldown for Ruby

Blazing Fast Rust-based bundler for JavaScript.

Ruby bindings for Rolldown, the Rust-based bundler for JavaScript.

Gem Version Documentation License Issues


What is Rolldown for Ruby?

Ruby bindings for Rolldown, the Rust-based bundler for JavaScript. Bundle JavaScript from Ruby, without the need for a JavaScript runtime.

Everything here is Rolldown doing the work. For what the options mean and what it can do, rolldown.rs is the reference.

Installation

bundle add rolldown

Anywhere a precompiled gem is not published, the gem builds from source and needs the Rust toolchain at 1.96 or newer.

Usage

TODO

Development

The gem is a C extension over a Rust crate. rust/ builds a static library and generates the C header with cbindgen, ext/rolldown/ wraps it, and lib/ is the Ruby API over that.

bin/setup
bundle exec rake

sig/ is generated from the #: annotations next to the code. Regenerate it with rake rbs after changing a signature, and CI checks that it matches.

Acknowledgements

Rolldown is maintained at rolldown/rolldown and is part of VoidZero's toolchain for JavaScript. This gem only calls into it. Thank you for building these tools!

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/marcoroth/rolldown-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

Issues with parsing, transforming or minifying itself belong upstream, since this gem does none of that. Issues with the Ruby API, the build, or the bindings belong here.

License

The Ruby, C, and Rust code in this gem is available under the terms of the MIT License.

It builds against Rolldown, which is MIT licensed and carries some MIT code of its own.