(add-resource-path raw path)
adds resource path to context
(add-resource-path +js+ "assets")
adds resource path to context (add-resource-path +js+ "assets")
(add-system-path raw path)
adds system path to context
(add-system-path +js+ ".")
adds system path to context (add-system-path +js+ ".")
(close-raw ctx)
closes the base graal context
closes the base graal context
(eval-graal {:keys [raw]} string)
evals body in the runtime
(str (eval-graal (l/rt :js) "1+1")) => "2"
evals body in the runtime (str (eval-graal (l/rt :js) "1+1")) => "2"
(eval-raw ctx string)
performs an exec expression
(str (eval-raw +js+ "1 + 1")) => "2"
performs an exec expression (str (eval-raw +js+ "1 + 1")) => "2"
(invoke-graal {:keys [state lang layout] :as rt} ptr args)
invokes a pointer in the runtime
(invoke-graal (l/rt :js) k/sub [1 2]) => -1
invokes a pointer in the runtime (invoke-graal (l/rt :js) k/sub [1 2]) => -1
(make-raw {:keys [lang resource system]})
creates the base graal context
(str (.eval ^Context +js+ "js" "1 + 1")) => "2"
creates the base graal context (str (.eval ^Context +js+ "js" "1 + 1")) => "2"
(raw-lang ctx)
gets the language context
(raw-lang +js+) => :js
gets the language context (raw-lang +js+) => :js
(rt-graal m)
creates and starts a graal runtime
creates and starts a graal runtime
(rt-graal:create {:keys [id] :or {id (h/sid)} :as m})
creates a graal runtime
(h/-> (rt-graal:create {:lang :js}) (h/start) (h/stop)) => rt-graal?
creates a graal runtime (h/-> (rt-graal:create {:lang :js}) (h/start) (h/stop)) => rt-graal?
(rt-graal? obj)
checks that object is a graal runtime
checks that object is a graal runtime
(start-graal {:keys [lang resource system raw] :as graal})
starts the graal runtime
starts the graal runtime
(stop-graal {:keys [lang raw] :as graal})
stops the graal runtime
stops the graal runtime
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close