Howdy Haxers!
Happy xmas and impending 2023!
So, I’m in the process of writing (and releasing) a set of libraries: “core haxe”. The idea here is to add some common, but fairly complex tools / frameworks to haxe. These are things I seem to write over and over again, and have varying versions of them embedded in different projects. So I thought it was about time to extract them, clean them up, make them “proper” and release them. You can see the GH org here: Core Haxe · GitHub
All of them are considered “WIP” currently and may change on a whim. Currently there are only a very small subset of the libraries I have locally, and will need more time to get the missing ones “up to scratch”, so watch this space! However, I didn’t want to sit on the libs that are ready as a) they might be useful to the community at large and b) having more eyes on them will only improve them (I hope!).
So far this is where they are at:
-
promises - this is basically just a typedef for themshim, however thenshim is included in the lib as I made local changes to it, Ill get round to opening a PR on the original repo
-
logging - this is a log manager that can have various “adaptors” attached… pretty simple, but used all over the other libs (so pretty core)
-
http - its no secret that the haxe std http has some… … … issues. Well, this is a http client that aims to work around those issues. At the very least, since its a lib, it can be updated independently of haxe releases. Note that currently, under the hood it does actually use std http (although shadowed and modified to fix the inconsistencies). However, one of the features of this lib is that you can “swap out” the http provider and use other, more native, ones perhaps. I’m sure as time goes on better http providers will be developed (like async http for hxcpp - which I’m also working on). This lib also comes with a bunch of other goodies like: following redirects, automatic retries, request/response “middleware” to name a few.
-
rest - this is a rest client built off the http lib. It allows creation of fully typed rest api definitions with a tiny amount of effort. This, and the “database” stuff, was the main driving force for this set of libs since I seem to develop very similar code over and over again in this domain.
-
queues-core - this is a major work in progress, and my local version is already vastly different to the GH version, its only been included really since the http lib relies on it.
The main ethos behind these set of libs (all of them) is to bring certain “core” functionality, consistently, to developers across haxe targets as well as a (hopefully) useful “toolbox” to help scaffold fairly complex applications.
That’s it for now, I’ll be releasing the other libs as I get time to polish them a little more (for example, all the “database” ones are “done”, but I need to write some tests and do some clean up)
Let me know if you have any issues, and, for sure PRs are MORE than welcome. Ideally, I’d like this to be a sort of community effort to fill in some of the inconsistencies in haxe and eliminating the “oh, no response headers for target X” type stuff.
Thanks and enjoy!
Ian