|
|
# Roadmap, May 2021
|
|
|
|
|
|
## Short term goals
|
|
|
|
|
|
### Use cargo-c to build the .so library
|
|
|
|
|
|
**Why?** This will remove the need for a C compiler and the libtool
|
|
|
machinery for `librsvg.so`, which is the artifact that provides the C
|
|
|
API. In theory this will make compilation more robust for non-Linux
|
|
|
systems; libtool is not exactly seamless on Windows or MacOS.
|
|
|
|
|
|
Also, this goes along with the "rustify all the things" line of
|
|
|
development. When librsvg had mixed C and Rust code, the final
|
|
|
`librsvg.so` was linked from C object files and a
|
|
|
`librsvg_internals.a` built from Rust; this is no longer the case as
|
|
|
the whole library is in Rust. However, the whole library gets
|
|
|
compiled as a `librsvg_c_api.la`, and later linked with libtool into
|
|
|
the final `librsvg.so`. This is unnecessary, and `cargo-c` provides
|
|
|
the machinery to eliminate this step.
|
|
|
|
|
|
Issues: [#552](https://gitlab.gnome.org/GNOME/librsvg/-/issues/552)
|
|
|
|
|
|
### Publish Rust crate in crates.io
|
|
|
|
|
|
**Why?** Currently there is the [`rsvg`
|
|
|
binding](https://crates.io/crates/rsvg) for the GObject API, but it is
|
|
|
not very widely used. Also, librsvg's Rust API is much more idiomatic
|
|
|
and there's no reason to keep wrapping the C API library. Being
|
|
|
available on crates.io should make it easier to get Rust contributors,
|
|
|
hopefully.
|
|
|
|
|
|
The only thing that makes me unhappy right now in the Rust API is [the
|
|
|
public error
|
|
|
types](https://gitlab.gnome.org/GNOME/librsvg/-/issues/657). For
|
|
|
example, `LoadingError::XmlParseError(String)` is just a
|
|
|
human-readable version of `xmlError` from libxml2. If librsvg changes
|
|
|
its XML parser to a Rust one, we should be able to provide more
|
|
|
detailed errors via `Box<dyn Error>` opaque variants.
|
|
|
|
|
|
Issues: [#635](https://gitlab.gnome.org/GNOME/librsvg/-/issues/635),
|
|
|
[#657](https://gitlab.gnome.org/GNOME/librsvg/-/issues/657)
|
|
|
|
|
|
## Medium term goals
|
|
|
|
|
|
### Make it possible to move away from Cairo |