yawaramin / dream-html

Render HTML, SVG, MathML, htmx markup from your OCaml app
https://yawaramin.github.io/dream-html/
GNU General Public License v3.0
157 stars 14 forks source link

use from other web frameworks #8

Closed joprice closed 8 months ago

joprice commented 1 year ago

Hi! I really like this project, but I'm currently testing out piaf. I forked the code and removed the dream dependency, and found I only had to inline a few functions to make it standalone. Could it be split into two opam files, core and dream? That way, it could be reused in projects using cohttp, piaf, etc.

yawaramin commented 1 year ago

Hi, that's an interesting idea but I'm not sure at the moment. As you say, it seems to be relatively simple to factor out the Dream-specific parts and leave only a general-purpose HTML eDSL. Could you publish that version somewhere, maybe as a gist, so I can take a look? Want to check it out and think about it a bit.

joprice commented 1 year ago

Sure, here is the branch I'm working off of: https://github.com/yawaramin/dream-html/compare/main...joprice:removeDream?expand=1

yawaramin commented 8 months ago

Thought about this. IMHO sticking with Dream will be the best option for me personally. I think that Dream will migrate to Eio (or some equivalent) in the future and become even easier to use. I like the idea of sticking with a stable approach.

yawaramin commented 4 months ago

Actually did this now! #28