Commit graph

108 commits

Author SHA1 Message Date
Chris Wong
2213c0dc32 Move escaping routines into a shared maud_htmlescape crate 2017-07-29 20:03:00 +12:00
Chris Wong
e0c7fcf055 Initial stab at porting to new proc macro interface 2017-07-23 13:58:42 +12:00
Brayden
70f55b9771 Update to Rocket 0.3 ()
Also fixes diff links in CHANGELOG.md.
2017-07-15 12:43:29 +12:00
Chris Wong
04eb61e870 Use docs.rs for hosting API documentation 2017-06-19 21:25:19 +12:00
Chris Wong
348712f3f4 Add #![doc(html_root_url = "...")] attribute 2017-05-13 14:16:41 +12:00
Chris Wong
d8440bd214 Release 0.16.2 2017-03-07 21:47:46 +13:00
Chris Wong
23399225c3 Add juicy metadata to Cargo.toml 2017-02-17 22:23:44 +13:00
Chris Wong
7b67fe1e3e Release 0.16.1 2017-02-15 22:26:45 +13:00
Ferdinand Bachmann
8ab628faa2 Update Rocket dependency to version 0.2.0 ()
* Update Rocket dependency to version 0.2.0

* Change rocket dependency to version range
2017-02-14 22:54:27 +13:00
Chris Wong
9ca984c89b Release 0.16.0 2017-02-06 16:12:58 +13:00
Chris Wong
f858430b51 Update to Iron 0.5.1
See 
2017-01-29 12:37:05 +13:00
Chris Wong
4d4ba6c59b Release 0.15.0 2017-01-26 20:15:49 +13:00
Chris Wong
ab38909e34 Rocket: specify explicit HTML content type
See 
2017-01-26 17:00:10 +13:00
Chris Wong
4cc8698638 Add Rocket support 2016-12-30 21:08:38 +13:00
Chris Wong
c57ee6e683 Remove RenderOnce
Closes 
2016-12-23 20:38:53 +13:00
Chris Wong
dab8e5108a Add impl Into<String> for PreEscaped
This allows for passing `Markup` values directly to Rouille's
[`Response::html`][1] constructor.

[1]: https://docs.rs/rouille/0.4.1/rouille/struct.Response.html#method.html
2016-12-17 13:41:59 +13:00
Chris Wong
fb935c2e13 Release 0.14.0 2016-11-24 20:34:45 +13:00
Chris Wong
b76bda0e50 Add a "DOCTYPE" constant 2016-11-22 21:58:06 +13:00
Chris Wong
c614478bd5 Release 0.13.0 2016-11-03 23:17:34 +13:00
Chris Wong
ac259ebe47 Don't escape single quotes 2016-11-03 23:13:20 +13:00
Chris Wong
90e0f1ccbd Restrict PreEscaped to T: AsRef<str>
Closes 
2016-10-22 19:57:48 +13:00
Chris Wong
f57aa4ace0 Remove #[inline(never)] annotations
On further testing, I find that these annotations no longer have an
effect on performance. Whether that's due to wrong methodology or
changes in rustc codegen I'm not sure.
2016-10-10 18:59:45 +13:00
Chris Wong
c70aa3c7f0 Release 0.12.0 2016-10-09 20:18:34 +13:00
Chris Wong
7d6e2e7c22 Move change log into the right place 2016-10-09 19:05:58 +13:00
Chris Wong
3120eb719d Fix test breakage (again)
I should try testing changes before pushing them lol
2016-10-08 22:32:20 +13:00
Chris Wong
3c9f318c98 Add a changelog 2016-10-08 22:19:35 +13:00
Chris Wong
9fa87721e6 Rewrite Render and RenderOnce traits
... to make them more user-friendly.

Closes 
2016-10-08 21:50:59 +13:00
Chris Wong
4284875869 Change escaper to use bytes instead of chars
This removes the overhead from UTF-8 encoding, and makes us faster than
Horrorshow again :)
2016-10-05 20:43:24 +13:00
Chris Wong
fedaded75a Release 0.11.1 2016-09-25 12:50:33 +13:00
Chris Wong
a4c43dbd3a Documentation nit: "input data" -> "value" 2016-09-25 12:30:12 +13:00
Chris Wong
0c437ca9d3 Do not implement traits on type aliases
Due to , trait `impl`s on type aliases are not shown
in automatically generated documentation. Until this bug is fixed, it is
better not to write code this way.
2016-09-25 12:25:21 +13:00
Chris Wong
84cb8cfe37 Flesh out documentation for runtime library 2016-09-24 19:11:59 +12:00
Chris Wong
d34c558f3b Release 0.11.0 2016-09-24 12:17:35 +12:00
Chris Wong
c832e2edb4 Specialize Render for strings 2016-09-23 19:45:41 +12:00
Chris Wong
f12efe4299 Rewrite everything to use Strings instead of writers
After fiddling around with zero-allocation solutions, I concluded that
all non-allocating approaches are too annoying to work with in realistic
code. Using closures leads to yak-shaving with lifetimes; and because
Iron needs to take ownership of the response body we often end up
cloning the input data anyway.

Removing this constraint has let me simplify the entire system, removing
a net 300 lines from the library. The `html!` macro no longer takes a
writer, and instead returns a `PreEscaped<String>`. This means that the
result of an `html!` can be spliced directly into another `html!`,
removing the need for the `impl Template` rigmarole.

To rub it in, benchmarks show the new code is in fact *faster* than it
was before. How lovely.
2016-09-23 19:22:22 +12:00
Chris Wong
d7071d1fe9 Release 0.10.0 2016-09-20 23:58:07 +12:00
Chris Wong
aded75f01f Add some juicy impl Trait niceness 2016-08-15 20:32:39 +12:00
Chris Wong
49c5698bea Release 0.9.0 2016-06-12 15:07:11 +12:00
Chris Wong
bd82da1824 Remove unused import 2016-05-14 18:42:30 +12:00
Chris Wong
2578c9aefc Release 0.8.1 2016-04-27 16:24:41 +12:00
Chris Wong
071aac34f8 Change documentation link 2016-04-27 16:23:31 +12:00
Chris Wong
28c965ac72 Fix indentation 2016-03-22 23:15:44 +13:00
Chris Wong
9949933d41 Release 0.8.0 2016-02-28 17:53:59 +13:00
Wim Looman
6c8fbb5bad Change splice operator and add in render by-move 2016-02-02 15:56:59 +01:00
Chris Wong
3deb7a7625 Release 0.7.4 2016-01-21 21:53:22 +11:00
Chris Wong
e16aa4cce8 Release 0.7.3 2015-12-20 22:23:52 +11:00
Chris Wong
54f27e5753 Release 0.7.2 2015-11-28 21:15:56 +11:00
Chris Wong
661ac6b4bc Release 0.7.1 2015-11-20 11:08:58 +13:00
Chris Wong
c9cb438bee Release 0.7.0 2015-11-08 18:59:47 +13:00
Chris Wong
2e0aa3e433 Replace $$ syntax with a general trait thing 2015-10-06 19:25:29 +13:00