You can use datastar with ANY backend and templating system that you want - you just have to return html with the appropriate (and standards-compliant) attributes and, optionally, js expressions.
Use php, python, rust, or anything else that you want. They all have various approaches to html templating.