add add ToStream to serialize LuaConfig.