Please read this related thread and follow the links in there for more information on NVCC and NVRTC compilation for OptiX programs:
https://forums.developer.nvidia.com/t/nvrtc-missing-stdint-h/146318
The reason that most people use nvcc for professional applications is to avoid having to ship their OptiX shader source code.
When using NVRTC, you would also need the OptiX headers and the CUDA headers, which means both SDKs would need to be installed on the target machine.
NVRTC can only generate PTX device code. Last time I checked it was about three times faster than NVCC because it doesn’t write any files.
I’ve used it in the past to generate high-level CUDA source code for materials at runtime which then got translated to PTX for OptiX on the fly.