Serialize lib swap