- Make sure you have Hyperlight repo cloned to a repo adjacent to this one, and check out the following Hyperlight branch in that repo
git fetch origin pull/104/head:musl_subtree && git checkout musl_subtree
, (replace origin with the name of your upstream remote). This step will not be necessary once the PR merges. - In this hyperlight-samples repo, run :
just cp-from-adjacent-hl-repo
to copy over header and lib files required for building the guestjust download-qjs
to download quickjsjust patch-qjs
to patch quickjs.just build-qjs-guest
to compile the guestjust run samples/pi_bigfloat.js
to compile and run the host cli application, passing in a javascript file to be executed. There are more samples in the samples folder.
You might need to increase the MEMORY_LIMIT and BUFFER_LIMIT in main.rs
, in case the current memory limits are not enough to execute your javascript code without erroring out.