
Librsvg now requires Rust - steveklabnik
https://mail.gnome.org/archives/desktop-devel-list/2017-January/msg00001.html
======
flukus
An informative post from Reddit:
[https://www.reddit.com/r/linux/comments/5m1vyv/slug/dc0dbu9](https://www.reddit.com/r/linux/comments/5m1vyv/slug/dc0dbu9)

Librsvg wasn't maintained for years. We've received a huge amount of security
bugs related to librsvg. Easily 10+ within a short timeframe. These weren't
fixed because nobody was interested. The code itself is old and far from nice
(from what I heard).

Federico volunteered to fix a few of these security bugs. This only resulted
in people sending us even more security bugs. That required more time than
Federico had. So again politely requesting for more assistance. Etc etc

Eventually Federico starts blogging about Rust, fixing super old but very
visible bugs, etc. If you look at the announcement you'll notice how big just
this one release is. He did way more.

Wikipedia relies on librsvg. The bugs were really hurting them. At one point
it really seemed like maybe we'd better have a developer paid somehow to work
on it.

tldr: great effort by Federico.

------
stshine
My initial motivation of following Rust is because it is the only language
that can integrate into and extend the traditional Linux C world seamlessly
except C++, which is generally hated by the open source culture. Glad to see
the initial attempt goes well, and hope the gnome people will no longer need
to construct GUI with C in the second decade of twenty-first century.

~~~
snuxoll
> hope the gnome people will no longer need to construct GUI with C in the
> second decade of twenty-first century.

It may 'compile' to C, but we've had Vala for quite a while now. Honestly, my
biggest complaints are the syntax is so close to C# that I always find myself
trying to do stupid things like `using System.Collections.Generic;` instead of
Gee, etc. Oh, and it would be REALLY NICE if the compiler had support for
custom attributes without needing to patch the compiler itself (even just for
storing metadata would be hugely beneficial, but I don't see any reason why
there can't be a plugin api for the codegen side of things either).

Rust is great and all, but every time I play with it I just don't see how it
would work well with the complex inheritance tree that is a widget toolkit
(meanwhile GObject works just fine, even if it's a little verbose at the
C-level).

~~~
flukus
> Rust is great and all, but every time I play with it I just don't see how it
> would work well with the complex inheritance tree that is a widget toolkit
> (meanwhile GObject works just fine, even if it's a little verbose at the
> C-level).

I'm not convinced that this is the best way to build widget toolkits rather
than just how it's always been done. I'd like to see one built more on traits
like IClickable instead of subclassing button.

HTML/CSS is already like this (for styling only), attributes can be mixed and
matched.

~~~
eximius
The inheritence pattern probably reduces repetition over a trait based
approach, which is often interpreted to be better, regardless of actual merit.

~~~
flukus
IME using inheritence to reduce code is always a mistake, composability is
much better.

------
the_duke
" Apologies in advance to distros who will have to adjust their build systems
for Rust - it's like taking a one-time vaccine; you'll be better off in the
end for it."

~~~
steveklabnik
Yeah, many distros have Rust packaged already; I can think of at least Debian,
Fedora, and Arch. We're working on it...

~~~
the_duke
About time for it to be in all distros. ;)

------
matthewmacleod
Well that's excellent! I just coincidentally started _using_ librsvg from some
Rust code, to rasterize some SVGs. Being relatively unfamiliar with Rust, it
was still kind of straightforward to get that working. Pretty impressed
overall, though I still find it quite an intellectually challenging language
to write.

------
BuuQu9hu
Not sure it is a good idea to depend on a language with only one
implementation.

~~~
flukus
I could see that being a concern for a commercial product. but why is it a
concern for an open source one?

~~~
jasonm23
[https://www.w3.org/TR/webdatabase/](https://www.w3.org/TR/webdatabase/)

~~~
flukus
That's a completely different situation.

------
db48x
You might also be interested in Frederico's articles on the Rustification
process:
[https://people.gnome.org/~federico/news.html](https://people.gnome.org/~federico/news.html)

