If space is really tight have you thought about having your rails against the sidewalls of your shed with the gantry parking against the back wall?
If you used a system based on tube frame roller coaster designs you might get a large proportion of what you need from scaffold poles & fittings, with the outside faces of the horizontal runners free for adding support to get them straight and level,
Regards,
Nick