pub fn serialize_hk(config: &HkConfig) -> String
Serializes a HkConfig back to a .hk string, preserving key order.