That was indeed not an easy thing...
e13 is mentioning a 52mm chainline for boost frames with this crankset.
I bought the crankset "used" comming with a 34T chainring with -5mm offset.
The bottom bracket required a spacer of 2,5mm according manual at chainring side.
Using the 2,5mm spacer the spindle was too short, crankset only moved very hard.
So I did not use 2,5mm spacer as also e13 XCX manual mentioned not to use the spacer.
I am a fan of oval chainring therefore I have ordered a boost chainring 32T but the chainline did significantly degrade.
Finally the chainring supplier recommended a non boost chainring with -5mm offset which was much better in regards
to the chainline but the chainring was slightly touching the frame.
I remembered myself to the 2,5mm spacer for the bottom bracket and grinded one of them to 1mm.
Now there is space between frame and chainring of about 1mm.
This is best I could achieve, let´s see how it works in reality.
Complicated
I'm going to buy SLX m8100 with 52 mm chainline. Have 34T chainring, will check if it fits - if not- will use 32T. Problem is, that I will use non boost wheels with boost adapter for now. Let's see how it will perform.