update implementations.

also support swift bridge.