actix / examples

Community showcase and examples of Actix Web ecosystem usage.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Having examples use actix_web_lab is confusing

lukesutton opened this issue · comments

So I was attempting to figure out how to use Tera templates with Actix Web. The README on crates.io points to the examples directory here on GitHub. I tried implementing it according to the example, but tripped over the use of Html. Then I saw that it comes from actix_web_lab, which has a README that strongly implies that they're experimental.

So I'm at a bit of a loss. Should I use the web lab package? What is the canonical way of rendering Tera templates?

I personally run the actix-web-lab package as a testbed for future Actix Web features. It's experimental in the API stability sense, not in terms of danger to use.

You are welcome to alter these examples when you copy them by inspecting the Responder implementation of Html to see the correct way to create such a response.

These helpers in the lab are just easier, guaranteed ways of doing things correctly, which are helpful for teaching concepts because it allows the examples to focus on what they're trying to demonstrate.

Hope that helps.

@robjtede That's very helpful thank you 🙏