JIT compilation of PureScript.
Tested with the following config that powers mikesol.github.io/sf.
module Config where
loaderUrl :: String
loaderUrl = "https://purescript-wags.netlify.app/js/output"
compileUrl :: String
compileUrl = "https://supvghemaw.eu-west-1.awsapprunner.com"
The API has two functions:
compile
fromJIT.Compile
evalSources
fromJIT.EvalSources
To see how to use this from your project (ie from a webpage), check out the test.
If anyone asked questions about this repository, let alone frequently, this is what they may ask...
This code was copied from the Try PureScript and changed very slightly, mostly because I don't know how to use Argonaut.
compile
is designed to be used anywhere, including from JS environments that use callback-style syntax. I use it in a couple Gatsby projects and pass React hooks to the callbacks.