For me a very simple example worked on windows after compiling nimhcr.nim and
nimrtl.nim but after I uncommented a variable inside an update function, that
was not uncommented on main build, it crashes with sigsegv:
main.nim
import hcr
import os
const ms = 1
const sec = 1000 * ms
proc main() =
while true:
os.sleep(5 * sec)
hcr.update()
echo repl.x
echo repl.y
when isMainModule:
main()
Run
hcr.nim
import hotcodereloading
var x* = 82
var y* = @[1,2,3]
var z* = 171771
proc update*() =
# x = 84
performCodeReload()
Run