Kurbo

A Rust 2D curves library

Linebender Zulip, #kurbo channel dependency status Apache 2.0 or MIT license. Build status Crates.io Docs

The Kurbo library contains data structures and algorithms for curves and vector paths. It is probably most appropriate for creative tools, but is general enough it might be useful for other applications.

The name "kurbo" is Esperanto for "curve".

There is a focus on accuracy and good performance in high-accuracy conditions. Thus, the library might be useful in engineering and science contexts as well, as opposed to visual arts where rough approximations are often sufficient. Many approximate functions come with an accuracy parameter, and analytical solutions are used where they are practical. An example is area calculation, which is done using Green's theorem.

The library is still in fairly early development stages. There are traits intended to be useful for general curves (not just BĂ©ziers), but these will probably be reorganized.

Minimum supported Rust Version (MSRV)

This version of Kurbo has been verified to compile with Rust 1.65 and later.

Future versions of Kurbo might increase the Rust version requirement. It will not be treated as a breaking change and as such can even happen with small patch releases.

Click here if compiling fails.

As time has passed, some of Kurbo's dependencies could have released versions with a higher Rust requirement. If you encounter a compilation issue due to a dependency and don't want to upgrade your Rust toolchain, then you could downgrade the dependency.

# Use the problematic dependency's name and version
cargo update -p package_name --precise 0.1.1

Similar crates

Here we mention a few other curves libraries and touch on some of the decisions made differently here.

Some code has been copied from lyon_geom with adaptation, thus the author of lyon_geom, Nicolas Silva, is credited in the AUTHORS file.

More info

To learn more about BĂ©zier curves, A Primer on BĂ©zier Curves by Pomax is indispensable.

Community

Linebender Zulip

Discussion of Kurbo development happens in the Linebender Zulip, specifically the #kurbo channel. All public content can be read without logging in.

License

Licensed under either of

at your option.

Contribution

Contributions are welcome by pull request. The Rust code of conduct applies. Please feel free to add your name to the AUTHORS file in any substantive pull request.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

Join libs.tech

...and unlock some superpowers

GitHub

We won't share your data with anyone else.