Remix.run Logo
koverstreet 5 hours ago

Rust really is attractive to a filesystem developer. Over C, it brings generics for proper data structures, iterators (!), much better type safety, error handling - all the things Rust is good at are things you want.

For me, the things that would make it just perfect would be more ergonomic Cap'n Proto support (eliminate a ton of fiddly code for on disk data structures), and dependent types.

a-dub 5 hours ago | parent | next [-]

it remains an open question as to how reliable, performant and efficient a system built with these higher level constructs would compare to the highly optimized low level stuff you'd see in a mature linux filesystem project.

i suspect the linux stuff would be far more space and time efficient, but we won't know until projects like this mature more.

koverstreet 5 hours ago | parent | next [-]

Eh? That's not an open question at all anymore; Rust has a drastically lower defect rate than C and good Rust is every bit as fast as good C.

Now, the engineering effort required to rewrite or redo in Rust, that's a different story of course.

a-dub 5 hours ago | parent [-]

i'd be curious how many of the higher level features and libraries would be best avoided if attempting to match the performance and space efficiency of a filesystem implemented in purpose designed highly optimized c.

cyberax 4 hours ago | parent [-]

I'm rewriting some of my Arduino projects into Rust (using Embassy and embedded-hal).

It's _so_ _much_ _better_. I can use async, maps, iterators, typesafe deserialization, and so on. All while not using any dynamic allocations.

With full support from Cargo for repeatable builds. It's night and day compared to the regular Arduino landscape of random libraries that are written in bad pseudo-object-oriented C++.

IshKebab 4 hours ago | parent | prev [-]

Yeah it's only an open question if you have your eyes closed.

IshKebab 4 hours ago | parent | prev [-]

To be fair Cap'nProto's C++ API is hardly ergonomic.

koverstreet 4 hours ago | parent [-]

Doing it right needs lenses (from Swift)