Hi Rocky, I'm Shiva and I'm interested in porting libcdio's components to Rust. As per your suggestion in another thread, I've been looking at the iso9660 library for a start. I have a few questions on the same:
1. How do we go about the build system? As libcdio uses Makefiles, shall we use them with rustc directly, or with Cargo? 2. Can we change the layout of arbitrarily sized structs? As you've rightly mentioned in another thread, DSTs in Rust are a half baked feature for now. https://doc.rust-lang.org/nomicon/exotic-sizes.html It's not a blocker though, we'd have to be careful and use a bit of unsafe. However, there is a crate that helps with them. https://crates.io/crates/slice-dst From my observation, looks like `struct iso9660_stat_s` is the only struct that is arbitrarily sized in the iso9660 library. Alternatively, could we avoid the problem entirely by changing the layout of this struct to hold a pointer and a length for the `filename` field? ``` struct iso9660_stat_s { // ... // char filename[EMPTY_ARRAY_SIZE]; // instead of this size_t filename_length; char *filename; // equivalent to this in Rust } ``` I understand that we'd have to modify existing code that expects the layout to be this way. Is this feasible, or am I missing anything, such as an ABI compatibility requirement? Thanks. Shiva
