Below you can see the front-view size comparison of the Sony A6300 and Canon M5. The Sony A6300 is 22 mm shorter and 12 mm thinner than the Canon M5 but it is also 4 mm wider.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.