MAXRECTS 2D rectangle packing in Rust