If it’s 1x, it won’t be a significant problem. Ideally look after the chain line. If it’s 2x, you might need to bodge and with different cable pull ratios etc. it might not work, but if you can set up the shifting it’ll be fine.
I have bodged an old LX 3x into a 28-44 double for a commuter/gravel bike, it works with the road derailleur, but I had to use inner/middle positions and shim/file the big ring a bit to get everything in the right place (using an outer ring in the middle position).
It works well.
I had a 34-50 road chainset (probably could have done with adjusting the ratios anyway for steeper hills when loaded up), it wouldn’t fit the new frame after I cracked the last one (chainstays too wide for the crank arms to clear), hence my bodging this together. It was kind of lucky as well as the bottle boss got in the way of the front mech on 50T.