Getting into the Rusty Bucket: Lessons from Integrating Rust with Existing C

Поділитися
Вставка
  • Опубліковано 2 чер 2024
  • William Brown
    linux.conf.au/schedule/present...
    Rust is a modern language developed by Mozilla pursuing the trifecta: Safety, Speed, and Concurrency. With such promise for the future, how can we use this now? We are not always in the beautiful open green fields; we must contend with our existing grunty applications!
    389 Directory Server is based on code now more than 20 years old. We cannot throw this out and replace it, but we want the benefits Rust gives us - especially for authentication and security critical code.
    We will explore the challenges of security in engineering, and behaviours of the modern programmer. I will discuss why we have spiraled down a mountain of failure as an engineering discipline - and why we need tools like Rust to validate our work. I will explore the Directory Server plugin interface, where we have the ability to provide pure Rust plugins, allowing safe, fast extensibility to a core piece of systems authentication. This will explore the challenges to build it, and the design patterns needed in C, to make sure that the integration between Rust and C is possible today, leading towards a future rewrite.

КОМЕНТАРІ • 6

  • @ichiban844
    @ichiban844 7 років тому +3

    watching this talk, I wonder would it have been easier to write better c code instead of this mess. There seems to be so many more points of failure.

    • @llothar68
      @llothar68 7 років тому +1

      I think it's really work in progression. But embedding Rust is a bit rusty.

    • @ichiban844
      @ichiban844 7 років тому

      Doing anything well is hard, that's why they get paid. This just screams hot mess. Wait until all these fragile pieces start to shatter into a million more pieces.
      Write better c code.

    • @ichiban844
      @ichiban844 7 років тому

      new and shiny things also get old. New for newness sake, try that in traditional engineering. Try that new for newness sake when talking about bridges, architecture, etc...
      Do you recommend new technology over good engineering?

    • @ichiban844
      @ichiban844 7 років тому

      When you start seeing seg faults and data races in ur rust code and ur trained not to think but let the compiler do black magic, i'm sure it'll be an easy task to unwind that mess.
      Anyways, enjoy programming in rust we can leave it here.

    • @moominfin
      @moominfin 5 років тому +3

      in an alternate reality someone asked dennis ritchie if writing better assembly would've been easier than creating an entire language and he went "yeah I guess" and gave up on C