|
From: Jerry J. <jer...@gm...> - 2022-01-26 00:41:33
|
Hi Jonathan Your information is very helpful, thanks a lot! Regards Jerry On Tue, Jan 25, 2022 at 8:34 PM Jonathan Sweemer <sw...@gm...> wrote: > > Hi Jerry, > > Did you know that QuantLib is already exposed to several scripting languages through SWIG? You can download the latest version here: https://github.com/lballabio/QuantLib-SWIG > > In terms of safety, the main thing to worry about when wrapping QuantLib in a scripting language is the garbage collector accessing objects from different threads. You can read more about it at [1] and also use one or more of the available CMake variables [2] to compile in a more or less thread safe manner. > > [1] https://www.quantlib.org/slides/qlws13/spanderen.pdf > [2] https://github.com/lballabio/QuantLib/blob/master/CMakeLists.txt#L49 > > On Tue, Jan 25, 2022 at 1:01 PM Jerry Jin <jer...@gm...> wrote: >> >> Hello, >> >> I'm not a c++ savvy, I mostly just use existing classes from quantlib >> and call it's method to get results. >> >> I'm thinking to use script language to generate c++ source file to >> construct quantlib objects and wrap them in ext::shared_ptr, call it's >> method and return the result in xml or json format, this would create >> native program, I'm a bit worried if it's safe. >> >> Is this feasible at all? Thank you! >> >> Regards >> Jerry >> >> >> _______________________________________________ >> QuantLib-users mailing list >> Qua...@li... >> https://lists.sourceforge.net/lists/listinfo/quantlib-users |