General matrix multiplication with custom configuration in Rust. Supports no_std and no_alloc environments.