Show HN: JStachio a type-safe Mustache engine that is incredible fast

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • jstachio

    Java type safe statically compiled mustache

  • template-benchmark

    JMH benchmark of the most popular Java template engines (by agentgt)

  • Hi HN,

    I have been working on a Java template engine that is type-safe and uses Mustache for syntax. I developed it because my company has been using Mustache (and handlebars) heavily for a decade now and I always wished there was a type-safe version.

    It is fully compliant to the v1.3 Mustache spec which had some unique challenges given that JStachio is not late binding like most Mustache implementations as well as templates cannot be dynamically changed like most implementations.

    After almost a year it is ready for 1.0.0 which I hope to do this week.

    It has been production ready for some time but I took extra time on documentation, getting the API right and real world benchmarking.

    It generates readable Java code once the templates are compiled and thus very Graal VM Native friendly.

    It is the fastest templating engine for Java.

    I know that is a bold statement but unlike others I not only tested with JMH doing String output but also with TechEmpower's Framework benchmarks.

    https://github.com/agentgt/template-benchmark

    Speaking of TechEmpower If you have a framework on TechEmpower that is Java performing the Fortune benchmark I recommend picking JStachio.

    It was not my intention to be the fastest but I did benchmarking to make sure my 1.0.0 API would be future proof (always good to make sure the API does not prevent going fast).

    Anyway I have some really exciting future plans on dealing with polymorphic data with Mustache's dynamic name/partial support. In Javascript this is accomplished with String fields being the name of the template. In JStachio this will be done with annotated sealed classes (yes Java is slowly getting sort of ADT/sum types) which is safer and will exhaust all sub types.

    https://github.com/jstachio/jstachio/issues/140

    Check it out and let me know what you think!

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Full stack web development in a single Java file: An intro to Javalin and htmx

    2 projects | /r/java | 12 Jul 2023
  • Announcing jte 3 - The Java Template Engine

    4 projects | /r/java | 21 Jun 2023
  • HTML template languages?

    4 projects | /r/dartlang | 6 Jun 2023
  • Interpolating Strings Like a King in Java 21

    1 project | /r/java | 27 Apr 2023
  • Hey guys, just wanted to let you know that JStachio v0.9.0 is now out and it even comes with Spring support! So go ahead and give it a try if you're into that kind of thing!

    2 projects | /r/java | 15 Apr 2023