Fixups to build system and to handle new stuff in Rust