Hi all,
Last night Thierry asked about some of the values of rust, and how to approach this topic.
Rust has been very powerful in how productive it's made me in other projects due to
the stricter compiler rules, forcing me to handle things correctly.
I think there are really two reasonable approaches to improving 389-ds through the use of
rust.
The first is that "new code" can be written in rust and layered in. An example
is the ldapssotoken code currently being reviewed by Mark.
The second is c to rust translation. This takes C, and creates equivalent
"unsafe" rust that you can "overtime" improve to make it safer. A
powerful testament to the quality of c2rust is the following blog.
https://immunant.com/blog/2020/01/quake3/
I don't think "rewrite" is a good approach, given how much code we have that
works in production today, and the possibility of losing much of that historical knowledge
and hardening that does exist. c2rust is a better approach as we can "overtime"
provide small polish into the areas, but extend with safer interfaces instead.
An example of a c2rust step we could take is maybe a password plugin, or something like
uidunique.c.
Hope that's interesting to you,
—
Sincerely,
William Brown
Senior Software Engineer, 389 Directory Server
SUSE Labs