Remix.run Logo
josephg a day ago

Nice stuff! I'm keen to see this too.

I love programming in rust. Lots of non-rust developers think the whole point of rust is safety, but honestly, the things I like most about using it are the quality of life features like cargo. I love the idea of bringing that to C!

Relevant to this thread: I've spent the last week or so hand porting SeL4 from C to Rust, mostly so I can learn how it works (and learn OS development more generally). One of the biggest pain points I've had trying to use SeL4 is understanding the insanely complex way it uses cmake to compile the kernel and userland software. With Cargo, I can just run `cargo build` on my rust kernel project and it just works[1]. I don't even have a build.rs.

Anyway, I'd love it if we had a tool that made sel4 so easy to build. I doubt it'll be that simple, but its a lovely goal.

[1] (Well, except for one small step: You need to run objcopy to convert the 64 bit elf into a 32 bit elf to run it in qemu. But other than that!)

dboon 14 hours ago | parent [-]

I’ll have a go at writing a package for sel4 as a delicious bowl of dog food.

Are you interested in the result? If so, just reply with some handle where I can reach you.

josephg 8 hours ago | parent [-]

I'd love to see it. Though if the package is just "we run sel4's cmake script and save the result" then its much less interesting. If you can make a package which doesn't use cmake at all, email me. My email is in my bio.

dboon 5 hours ago | parent [-]

Yes, for now the approach is to provide simple programmatic interfaces over CMake and friends to make third party stuff easy to integrate. For example, SQLite:

  spn_autoconf_t* ac = spn_autoconf_new(dep);
  spn_autoconf_add_flag(ac, "--disable-tcl");
  spn_autoconf_run(ac);
  spn_make(dep);
But! This is just the bridge. The tool of course has a native build system (i.e. construct and execute a build graph). It's not feasible to start by rewriting every library's build system, so we start like this.

That being said, I'll have a go at sel4 with the native build system. I use it for all my C projects already. Nothing tastes better than dog food, after all!