You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 733557a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+36-4Lines changed: 36 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
## QuantLib Async Bindings for Node.js [](http://badge.fury.io/js/quantlib)
1
+
## QuantLib Async Bindings for Node.js [](http://badge.fury.io/js/quantlib)[](https://twitter.com/quantlibnode)
2
2
3
-
This project brings [QuantLib](http://quantlib.org/) to the Node.js community, it's similar to [QuantLibXL](http://quantlib.org/quantlibxl/) project which is for Microsoft Excel.
3
+
This [open source project](https://github.com/quantlibnode/quantlibnode) brings [QuantLib](http://quantlib.org/) to the Node.js community, it's similar to [QuantLibXL](http://quantlib.org/quantlibxl/) project which is for Microsoft Excel.
4
4
5
5
Most functions in QuantLibXL can be used in the similar way in Node on the server side.
6
6
@@ -13,13 +13,17 @@ All functions in this project are Async, they are exported to [Promise](https://
13
13
npm install quantlib
14
14
```
15
15
16
-
* Windows
16
+
* Windows - 32-Bit
17
17
18
18
`npm install quantlib` will do everything, including the node package installation and pre-built native addon (no dependency) download, you can start use it right away.
19
19
20
+
* Windows - 64-Bit
21
+
22
+
I will try to build and upload the pre-built addon, before that, Please refer to [how to build](#building_the_native_addon) below
23
+
20
24
* Linux & Mac
21
25
22
-
Quantlib and QuantLibAddin must be built first, then build QuantLibNode linking to them, pre-built native code is not provided for now
26
+
Please refer to [how to build](#building_the_native_addon) below
23
27
24
28
25
29
## QuantLib Documents
@@ -34,6 +38,34 @@ Quantlib and QuantLibAddin must be built first, then build QuantLibNode linking
* QuantLib, QuantLibAddin, ObjectHandler source code according to [version matrix](#version-matrix), they need to be put in the same directory
50
+
*`boost` - which is required to build QuantLib
51
+
52
+
#### Set environment variable
53
+
54
+
please refer to `cmake/*.cmake` and `CMakeList.txt` files
55
+
56
+
*`NAN_DIR` - location of `nan`
57
+
*`NODE_GYP_DIR` - location of `.node-gyp` generated by `node-gyp` tool, which is at `~/.node-gyp`, if it doesn't exist, follow the instruction in [node-gyp](https://github.com/nodejs/node-gyp), and build a helloword program, it will generate the `.node-gyp` directory
58
+
*`QUANTLIB_ROOT` - location of QuantLib, QuantLibAddin, ObjectHandler source code
59
+
*`BOOST_ROOT` - location `boost` installed
60
+
61
+
#### Use cmake to build the addon
62
+
63
+
1. Build QuantLib and QuantLibAddin, please check `CMakeList.txt` for library name, and make sure generated library names are the same in `CMakeList.txt`
64
+
2. from `quantlibnode` root directory `cd build`
65
+
3.`cmake ..` for Windows and Linux, `cmake -G Xcode ..` for Mac OS X
66
+
4.`cmake --build . --config Release`
67
+
5. For Linux, you may need to put `quantlib.node` under `build/Release` manually,
0 commit comments