Skip to content

Commit 0934160

Browse files
Release k8-1.1 (r129)
1 parent f8b3b1f commit 0934160

File tree

4 files changed

+31
-10
lines changed

4 files changed

+31
-10
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- run:
2020
name: Build K8 Linux ARM64 binary
2121
environment:
22-
NODE_VERSION: 18.18.1
22+
NODE_VERSION: 18.19.1
2323
command: |
2424
# Hack CircleCI Ubuntu Docker image to link 'python' to 'python3'
2525
echo -e '#!/usr/bin/env bash\n\nexport PYENV_ROOT="/opt/circleci/.pyenv"\nexec "/opt/circleci/.pyenv/libexec/pyenv" exec "python3" "$@"' > ~/bin/python

NEWS.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
1+
Release 1.1-r129 (26 May 2024)
2+
------------------------------
3+
4+
This version sets v8's default `max_old_space_size` to 16 GB and also adds
5+
option `-m` as a more convenient way to change this parameter.
6+
7+
(1.1: 26 May 2024, r129)
8+
9+
10+
111
Release 1.0-r124 (10 August 2023)
212
---------------------------------
313

414
The previous version of k8, v0.2.5, was built on top of v8-3.16.4 released on
515
2013-01-11. This version updates v8 to v8-10.2.154.26 released on 2023-01-23,
6-
ten years later. It brings ES6 features including but limited to the "let"
16+
ten years later. It brings ES6 features including but not limited to the "let"
717
keyword to define local variables, Java-like classes and back-tick strings.
818

919
Due to the lack of the SetIndexedPropertiesToExternalArrayData() API in v8, it
1020
is not possible to keep full backward compatibility with older k8 versions.
11-
Nonetheless, we have tried to retain commonly used methods such that the
12-
several popular k8 scripts can mostly work. We also introduced new file I/O
13-
functions to avoid clashes with the File classes in other JavaScript runtimes.
21+
Nonetheless, we have tried to retain commonly used methods such that several
22+
popular k8 scripts can mostly work.
1423

1524
New functions:
1625

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
## Getting Started
22
```sh
33
# 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))'
66

77
# 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
1010
# Then compile k8
1111
git clone https://github.com/attractivechaos/k8
1212
cd k8 && make
@@ -43,6 +43,16 @@ line, which is required to work with large files, becomes a cumbersome effort.
4343
K8 aims to solve this problem. With synchronous I/O APIs, JavaScript can be a
4444
powerful language for developing command-line tools.
4545

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+
4656
## API Documentations
4757

4858
### Functions
@@ -133,3 +143,4 @@ File.prototype.close()
133143
[aio]: https://en.wikipedia.org/wiki/Asynchronous_I/O
134144
[typedarray]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
135145
[arraybuffer]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
146+
[c-ares]: https://c-ares.org

k8.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2424
SOFTWARE.
2525
*/
26-
#define K8_VERSION "1.0-r125-dirty"
26+
#define K8_VERSION "1.1-r129"
2727

2828
#include <stdlib.h>
2929
#include <stdint.h>
@@ -846,6 +846,7 @@ static int k8_main(v8::Isolate *isolate, v8::Platform *platform, v8::Local<v8::C
846846
fprintf(stderr, " -E STR execute STR and print results\n");
847847
fprintf(stderr, " -m INT v8 max size of the old space (in Mbytes) [16384]\n");
848848
fprintf(stderr, " -v print version number\n");
849+
fprintf(stderr, " --help show v8 command-line options\n");
849850
return 0;
850851
}
851852

0 commit comments

Comments
 (0)