this repo has no description
at main 21 lines 560 B view raw
1#!/bin/bash 2 3export OCAMLRUNPARAM=b 4export JS_TOP_WORKER_SOCK="/tmp/js_top_worker_simple_$$.sock" 5 6cleanup() { 7 [ -n "$WORKER_PID" ] && kill "$WORKER_PID" 2>/dev/null 8 rm -f "$JS_TOP_WORKER_SOCK" 9} 10trap cleanup EXIT 11 12rm -f "$JS_TOP_WORKER_SOCK" 13 14# Worker prints child PID and only returns once ready 15WORKER_PID=$(unix_worker) 16 17unix_client init '{ findlib_requires:[], execute: true }' 18unix_client setup '' 19unix_client exec_toplevel '' '# Printf.printf "Hello, world\n";;' 20unix_client exec_toplevel '' "$(cat s1)" 21unix_client exec_toplevel '' "$(cat s2)"