[core] fog-core extraction

The [fog](/fog/fog) side of #2602.