diff options
author | stuebinm | 2021-04-11 03:37:32 +0200 |
---|---|---|
committer | stuebinm | 2021-04-11 03:37:32 +0200 |
commit | fa49e0bf71ccd4bc98df0fa83546250c1b849e2e (patch) | |
tree | f84c1ff8000fe87fae6b7c703e6b7871101a5094 /rusty-haskell/haskell/src/FLib.hs | |
parent | f7605dfefa304b1a7b20a474ce168cd5b9849533 (diff) |
simple ffi with rust and haskell
so far, only calling rust from haskell, not the other way round.
Diffstat (limited to 'rusty-haskell/haskell/src/FLib.hs')
-rw-r--r-- | rusty-haskell/haskell/src/FLib.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rusty-haskell/haskell/src/FLib.hs b/rusty-haskell/haskell/src/FLib.hs new file mode 100644 index 0000000..7fc1d61 --- /dev/null +++ b/rusty-haskell/haskell/src/FLib.hs @@ -0,0 +1,8 @@ +module FLib where + +import Foreign.C.Types +import Foreign.C.String + +foreign import ccall "double_input" doubleInput :: CInt -> CInt +--foreign import ccall unsafe "print_string" printString :: CString -> IO () +foreign import ccall "print_hello" printHello :: IO () |