Michael Murphy (S76)

I’m a System76 engineer / Pop!_OS maintainer. I’ve been a Linux user since 2007; and Rust since 2015. I’m currently working on COSMIC-related projects.

  • 58 Posts
  • 303 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle


  • In practice, because Rust libraries are always statically-linked, the MPL-2.0 is equivalent to the LGPL in spirit. Meanwhile, because of the static linking restrictions in the LGPL, the LGPL is effectively no different from the GPL. Hence, you’re going to find a lot of open source copyleft projects from the Rust ecosystem preferring either GPL or MPL-2.0, where MPL-2.0 is used in libraries where LGPL would have used previously in C projects. Dynamic linking is essentially going the way of the Dodo.










  • I’d recommend spending some time reading about it. It’s not as hard as he thinks. Applications developed for Linux are quite easy to port to Redox. It supports many of the same system calls and has a compatible libc implementation. The kernel does have abstractions to ease the porting process. And if you’re going to make a new kernel today, you should do it right and make a microkernel like Redox. One of the benefits of having a microkernel is that it doesn’t matter what language you write drivers in. They’re isolated to their own processes. Rust, C, C++, whatever.








  • You can either return cosmic::Element<Message>, impl Into<cosmic::Element<Message>>, or cosmic::widget::Button<Message> with your functions.

    Every widget can .into() or .apply(Element::from) into a cosmic::Element.

    I’d recommend using the Grid widget so that your buttons can scale with the window.

    cosmic::widget::grid()
        .push(widget1())
        .push(widget2())
        .push(widget3())
        .insert_row()
        .push(widget4())
        .push(widget5())
        .push(widget6())
        .row_spacing(12)
        .column_spacing(12)
        .justify_content(JustifyContent::Stretch)
        .width(Length::Fill)
        .height(Length::Fill)
        .into()