я посмотрел примеры использования nigui в их репозитории
<https://github.com/simonkrauter/NiGui/blob/master/examples/example_01_basic_app.nim> похоже, тебе надо запустить сервер и оконное приложение в отдельных потоках и наладить их общение через каналы 1. как я понял window.msgBox это блокирующая операция и у тебя сервер зависнет (возможно ты так и хотел, но к сведению) 2. async процедуры (а jester получается с такими только и работает) должны быть GC safe. а nigui внутри не gcsafe чтобы решить эту проблему побыстрому можно на свой страх и риск сделать так: nim {.cast(gcsafe).}: echoError() Run но для будущего лучше запустить гуи и сервер в разных потоках и настроить между ними простую коммуникацию типо через канал передавать сообщение и ссылку на объект с доп данными если надо, а там на месте конвертировать * * * i saw usage examples in the nigui repository seems you need to run server and window application in separates threads and establish their communication through channels 1. as i understand window.msgBox is blocking operation and your server will stuck (maybe it is what you want, but for a mention) 2. async procedures (jester works only with such) are required to be gcsafe, but nigui internally is not in your own risk you can cast your echoError to gcsafe using pragma but for sake of future it is better to run gui and server in separate threads and set up communication between them using channel, and send messages and additional ref object if you need, and then cast that ref to any object