Skip to content

Commit

Permalink
Release k8-1.1 (r129)
Browse files Browse the repository at this point in the history
  • Loading branch information
attractivechaos committed May 26, 2024
1 parent f8b3b1f commit 0934160
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- run:
name: Build K8 Linux ARM64 binary
environment:
NODE_VERSION: 18.18.1
NODE_VERSION: 18.19.1
command: |
# Hack CircleCI Ubuntu Docker image to link 'python' to 'python3'
echo -e '#!/usr/bin/env bash\n\nexport PYENV_ROOT="/opt/circleci/.pyenv"\nexec "/opt/circleci/.pyenv/libexec/pyenv" exec "python3" "$@"' > ~/bin/python
Expand Down
17 changes: 13 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
Release 1.1-r129 (26 May 2024)
------------------------------

This version sets v8's default `max_old_space_size` to 16 GB and also adds
option `-m` as a more convenient way to change this parameter.

(1.1: 26 May 2024, r129)



Release 1.0-r124 (10 August 2023)
---------------------------------

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

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

New functions:

Expand Down
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Getting Started
```sh
# Download precomiplied binaries
wget -O- https://github.com/attractivechaos/k8/releases/download/1.0/k8-1.0.tar.bz2 | tar -jxf -
k8-1.0/k8-x86_64-Linux -e 'print(Math.log(2))'
wget -O- https://github.com/attractivechaos/k8/releases/download/v1.1/k8-1.1.tar.bz2 | tar -jxf -
k8-1.1/k8-x86_64-Linux -e 'print(Math.log(2))'

# Compile from source code. This requires to compile node.js first:
wget -O- https://nodejs.org/dist/v18.17.0/node-v18.17.0.tar.gz | tar -zxf -
cd node-v18.17.0 && ./configure && make -j16
wget -O- https://nodejs.org/dist/v18.19.1/node-v18.19.1.tar.gz | tar -zxf -
cd node-v18.19.1 && ./configure && make -j16
# Then compile k8
git clone https://github.com/attractivechaos/k8
cd k8 && make
Expand Down Expand Up @@ -43,6 +43,16 @@ line, which is required to work with large files, becomes a cumbersome effort.
K8 aims to solve this problem. With synchronous I/O APIs, JavaScript can be a
powerful language for developing command-line tools.

## Installation

It is recommended to download precompiled binaries. If you want to compile k8,
you need to compile Node.js which bundles v8 and provides a more convenient way
build v8. As the v8 APIs are fast changing, both Node.js and k8 only work with
specific versions of v8. The k8-1.x branch is known to work with node-18.x but
not 19.x or higher. It is also worth noting that node-18.20.x upgraded
[c-ares][c-ares] which is now incompatible with older glibc. Node-18.19.1 is
the most recent version that can be compiled on CentOS 7.

## API Documentations

### Functions
Expand Down Expand Up @@ -133,3 +143,4 @@ File.prototype.close()
[aio]: https://en.wikipedia.org/wiki/Asynchronous_I/O
[typedarray]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray
[arraybuffer]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
[c-ares]: https://c-ares.org
3 changes: 2 additions & 1 deletion k8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
#define K8_VERSION "1.0-r125-dirty"
#define K8_VERSION "1.1-r129"

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

Expand Down

0 comments on commit 0934160

Please sign in to comment.