I needed this feature few weeks back and opened this issue: [https://github.com/nim-lang/Nim/issues/13129](https://github.com/nim-lang/Nim/issues/13129).
It's on my list to try to implement the suggested `-backend` switch for `nim doc` that uses the specified backend for compiling and running the runnableExamples and :test: code block examples.
