Skip to content

icicle-lang/jetski-ambiata

Repository files navigation

jetski

Floats on the sea.

jetski

Overview

jetski is a library which allows for runtime compilation and execution of C code.

takeoff

Example

source :: Text
source =
  T.unlines [
      "double mean(double sum, double count) {"
    , "    return sum / count;"
    , "}"
    , ""
    , "double max(double x, double y) {"
    , "    return x > y ? x : y;"
    , "}"
    ]

mean :: Double -> Double -> IO (Either JetskiError Double)
mean sum count =
  runEitherT $ withLibrary [] source $ \library -> do
    mean <- function library "mean" retDouble
    mean [argDouble sum, argDouble count]

barrel-flip

About

Runtime compilation and invocation of C.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published