||The generation, manipulation and detection of quantum bits (qubits) encoded on single photons is at the heart of quantum communication and optical quantum information processing. The combination of single-photon sources, passive optical circuits and single-photon detectors enables quantum repeaters and qubit amplifiers, and also forms the basis of all-optical quantum gates and of linear-optics quantum computing. However, the monolithic integration of sources, waveguides and detectors on the same chip, as needed for scaling to meaningful number of qubits, is very challenging, and previous work on quantum photonic circuits has used external sources and detectors. Here we propose an approach to a fully-integrated quantum photonic circuit on a semiconductor chip, and demonstrate a key component of such circuit, a waveguide single-photon detector. Our detectors, based on superconducting nanowires on GaAs ridge waveguides, provide high efficiency (20%) at telecom wavelengths, high timing accuracy (60 ps), response time in the ns range, and are fully compatible with the integration of single-photon sources, passive networks and modulators.