Hacker News new | ask | show | jobs
by KallDrexx 700 days ago
Maybe I'm reading something wrong but the discussion this HN posting is about sounds very much about trying to make a Linux subsystem and API in Rust, so that Rust's type system can enforce conformance to safety mechanisms via its abstraction.

That's fundamentally different and harder than a driver being written in rust that uses the Linux's subsystems C APIs.

I can see a lot of drivers taking on the complexity tax of being written in Rust easily. The complexity tax on writing a whole subsystem in Rust seems like an exponentially harder problem.

1 comments

You could just write rust code that calls the C APIs, and that would probably avoid a lot of discussions like the one in the article.

But making good wrappers would make development of downstream components even easier. As the opponents in the discussion said: there's about 50 filesystem drivers. If you make the interface better that's a boon for every file system (well, every file system that uses rust, but it doesn't take many to make the effort pay off). You pay the complexity tax once for the interface, and get complexity benefits in every component that uses the interface.

We would have the same discussions about better C APIs, if only C was expressive enough to allow good abstractions.