  Structured light has proven useful for numerous photonic applications.
However, the current use of structured light in optical fiber science and
technology is severely limited by mode mixing or by the lack of optical
elements that can be integrated onto fiber end-faces for complex wavefront
control, and hence generation of structured light is still handled outside the
fiber via bulky optics in free space. We report a metafiber platform capable of
creating arbitrarily structured light on the hybrid-order Poincar\'e sphere.
Polymeric metasurfaces, with unleashed height degree of freedom and a greatly
expanded 3D meta-atom library, were laser nanoprinted and interfaced with
polarization-maintaining single-mode fibers. Multiple metasurfaces were
interfaced on the fiber end-faces, transforming the fiber output into different
structured-light fields, including cylindrical vector beams, circularly
polarized vortex beams, and an arbitrary vector field. Our work provides a new
paradigm for advancing optical fiber science and technology towards
fiber-integrated light shaping, which may find important applications in fiber
communications, fiber lasers and sensors, endoscopic imaging, fiber
lithography, and lab-on-fiber technology.
