The urandom module doesn't currently check that the /dev/urandom file is actually a source of random data. It should check that the file handle is a character device as is done in this example module: https://github.com/euantorano/sysrandom.nim/blob/master/src/sysrandom.nim#L118
Additionally, the urandom module currently uses CryptGenRandom on Windows. It may be easier to use RtlGenRandom instead. It may also make sense to use arc4random_buf on openBSD systems as its use is encouraged there