New Library: Wai & Warp

Hello everyone :wave:,

I am working on a few libraries for our backend ecosystem, and I would like to announce that purescript-wai and purescript-warp are pretty much ready to be released.

I would like to get as much feedback as possible, especially when it comes to docs.

Those two libraries are pretty much a port of the Haskell version. I really appreciate the work that they have done over at the Haskell community. Hence, the reason why I wanted a Purescript version.

However, one point that I noticed from the Haskell version is the lack of intro documentation. Warp is quite a low-level library, therefore, most of the docs are pretty much just a usage example and comments. I will try to add a cookbook and more docs soon.

I am also working on purescript-swerve, it’s a library for declaring web APIs at the type-level that generates a wai application that can be handled by warp (pretty much servant). I think the server-side is getting pretty stable. I will be working on the client-side soon. I will only be able to make a release for this library when PS 0.14 gets released.

There is probably a lot that is needs to be done, and I hope to get as much feedback as possible from the community. :pray: :slight_smile:

Woody.

15 Likes

Just wanted to say thanks for all you work on these libraries!

3 Likes

Thank you for your kind words. :slight_smile:

I would like to thank you as well for all the work that you’re doing in helping to get the ecosystem ready for PS 0.14. I can’t wait for it!

2 Likes

This is excellent! Thanks for working on these @Woody88!

purescript-wai seems to depend on node-net only for its datatypes. That precludes other runtimes such as native backends and es4x. Would it be possible to make it completely runtime agnostic and push the node specific details to purescript-warp?

How is warp’s performance? Have you run any benchmarks?

1 Like

Yes, I did actually think about just having the ResponseStream accept a function that models a stream. If you want you can open an issue for this.

As for micro-benchmarks, I did not do much yet.
I did a couple of quick benchmarks and noticed that it spends a lot of time in the do function of Aff and also the function that makes the Wai request.

I will open an issue for this later, I want to see how it compares to purescript-node-http.
Your input would be greatly appreciated! :slight_smile:

1 Like