If you don't really care about speed - you could use the built in Nim compiler+virtiual machine as a script interpreter, (though IIRC there are limits by default that may surprise you and that can be removed, e.g. how many iterations a single loop can have is limited to 1,000,000 as this is meant to be used _while_ compiling). Otherwise ...
Your users will need an installed, accessible compiler compatible with the one you used to build the main; that's easy if you do everything in JS (you already have the relevant JS runtime and likely compiler) but more complicated if you use other targets (C / Objective-C / C++) - is it VS2015, VS2019, mingw32, mingw64, gcc, llvm, nlvm, ...? If the users don't provide source code, but only need to pick which module to load from a given set you already provide, either (a) import all of them in the first place, and have some logic to call the right one, or (b) use dynamic loading and possibly hot-code-reload to pick the right one to use -- and save your users the headaches from needing to have a usable compile environment.
