Re: [Haskell-beginners] Providing Haskell Libraries wrapped for other Languages

Hi,
Have you looked into Apache thrift (
https://thrift.apache.org
)? You’d provide interface definitions and the thrift compiler generates
client/server code from those. If the overhead of that is intolerable and
you really want to call functions “directly”, you could try exporting
haskell functions to c and then writing bindings to that for your language,
e.g. using the python c api or JNI. I’m just not sure how one’s supposed to
ensure initialization of the haskell runtime in any case.
Good luck
On Fri, Nov 29, 2019 at 5:00 AM
Send Beginners mailing list submissions to beginners@haskell.org
To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-request@haskell.org
You can reach the person managing the list at beginners-owner@haskell.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..."
Today's Topics:
1. Providing Haskell Libraries wrapped for other Languages (Leonhard Applis) 2. Re: Providing Haskell Libraries wrapped for other Languages (Simon Jakobi) 3. strange error inside a case (PICCA Frederic-Emmanuel) 4. Re: strange error inside a case (Sylvain Henry)
----------------------------------------------------------------------
Message: 1 Date: Thu, 28 Nov 2019 14:15:27 +0000 From: Leonhard Applis
To: "beginners@haskell.org" Subject: [Haskell-beginners] Providing Haskell Libraries wrapped for other Languages Message-ID:
Content-Type: text/plain; charset="utf-8"
Hi, I am currently writing a small library. I will provide a small web-api for it, however I have some colleagues who neither have experience in haskell, nor in web-dev. Also they maybe want to produce programs using my library without internet / docker / etc.
So in addition I'd like to provide the library "wrapped" for other languages, especially python, but maybe java as well. These wrappers should do nothing except invoking their pardons on the library, and should somewhat contain the library.
What is the common way to do this? I've seen "hyphen" as a super heavyweight solution, and I've seen people starting the haskell library listening on system-pipes. I don't feel that these are the "best" solutions, atleast for my intention.
best regards Leonhard
participants (1)
-
鲍凯文