I think this is what GitHub - SciML/Integrals.jl: A common interface for quadrature and numerical integration for the SciML scientific machine learning organization etc. is intended for, but not sure the exact status of available algorithms. Looks like QuadGK is available, though? Integral Solver Algorithms · Integrals.jl
Regadless, you don’t want to differentiate the quadrature directly and need an adjoint rule implementing the calculus at a higher level.