[ANN] Wtr (Well Typed Router) v1.0.0 release


Dear OCamlers

On the recent occassion of the 25th birthday of OCaml, I am pleased to announce v1.0.0 release of wtr to opam. Wtr - Well Typed Router - is a library for routing uri path and query parameters in OCaml web applications.

A ppx - wtr.ppx is provided so that specifying uri routes is ergonomic and familiar. For e.g. to specify a uri path /home/about, you would specify as such,

{%wtr| /home/about |}

You can see a a more full demos here:

The router matching algorithm is based on the trie algorithm.

Wtr User guide

Enjoy and Happy Birthday to OCaml!
Here’s to another 25. :partying_face:


P.S. Thank you @octachron, @Drup, @dinosaure, @hannes for fielding my many OCaml GADT related questions. Otr is a direct manifestation of that gestation process.


With apologies from the opam-repo team, we’ve had to revert the merging of this into the opam-repository since it clashes with another package also called otr. @BikalGurung, if you could resubmit the package with a non-clashing name, we’d greatly appreciate it.

Hi All, apologies for the bit of a mixup. I have now rebranded the package to wtr- Well Type Router.

I have checked that the package doesn’t exist in opam :smiley:. I will update the original announcement to reflect the changes once the (wtr PR)[[new release] wtr (1.0.0) by bikallem · Pull Request #18676 · ocaml/opam-repository · GitHub) is merged in opam-repository.

Many thanks for understanding.

1 Like

Dear All,

I have now added a cohttp sample to the examples dir.

cohttp - demo

edit fix links.

1 Like

There is a typo in the link. But one can find the example immediately in the repo.

Very cool, thanks a lot!

Thanks for the report. It’s fixed now.