|  | 
| 1 | 1 | ## Getting Started | 
| 2 | 2 | ```sh | 
| 3 | 3 | # Download precomiplied binaries | 
| 4 |  | -wget -O- https://github.com/attractivechaos/k8/releases/download/1.0/k8-1.0.tar.bz2 | tar -jxf - | 
| 5 |  | -k8-1.0/k8-x86_64-Linux -e 'print(Math.log(2))' | 
|  | 4 | +wget -O- https://github.com/attractivechaos/k8/releases/download/v1.1/k8-1.1.tar.bz2 | tar -jxf - | 
|  | 5 | +k8-1.1/k8-x86_64-Linux -e 'print(Math.log(2))' | 
| 6 | 6 | 
 | 
| 7 | 7 | # Compile from source code. This requires to compile node.js first: | 
| 8 |  | -wget -O- https://nodejs.org/dist/v18.17.0/node-v18.17.0.tar.gz | tar -zxf - | 
| 9 |  | -cd node-v18.17.0 && ./configure && make -j16 | 
|  | 8 | +wget -O- https://nodejs.org/dist/v18.19.1/node-v18.19.1.tar.gz | tar -zxf - | 
|  | 9 | +cd node-v18.19.1 && ./configure && make -j16 | 
| 10 | 10 | # Then compile k8 | 
| 11 | 11 | git clone https://github.com/attractivechaos/k8 | 
| 12 | 12 | cd k8 && make | 
| @@ -43,6 +43,16 @@ line, which is required to work with large files, becomes a cumbersome effort. | 
| 43 | 43 | K8 aims to solve this problem. With synchronous I/O APIs, JavaScript can be a | 
| 44 | 44 | powerful language for developing command-line tools. | 
| 45 | 45 | 
 | 
|  | 46 | +## Installation | 
|  | 47 | + | 
|  | 48 | +It is recommended to download precompiled binaries. If you want to compile k8, | 
|  | 49 | +you need to compile Node.js which bundles v8 and provides a more convenient way | 
|  | 50 | +build v8. As the v8 APIs are fast changing, both Node.js and k8 only work with | 
|  | 51 | +specific versions of v8. The k8-1.x branch is known to work with node-18.x but | 
|  | 52 | +not 19.x or higher. It is also worth noting that node-18.20.x upgraded | 
|  | 53 | +[c-ares][c-ares] which is now incompatible with older glibc. Node-18.19.1 is | 
|  | 54 | +the most recent version that can be compiled on CentOS 7. | 
|  | 55 | + | 
| 46 | 56 | ## API Documentations | 
| 47 | 57 | 
 | 
| 48 | 58 | ### Functions | 
| @@ -133,3 +143,4 @@ File.prototype.close() | 
| 133 | 143 | [aio]: https://en.wikipedia.org/wiki/Asynchronous_I/O | 
| 134 | 144 | [typedarray]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray | 
| 135 | 145 | [arraybuffer]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer | 
|  | 146 | +[c-ares]: https://c-ares.org | 
0 commit comments