rust_html_macros 1.1.4

Minimal compile-safe HTML templating library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
<!-- Borrowed from AreWeWebYet, used for testing HTML validation! -->

<!DOCTYPE html>
<html lang=en itemscope itemtype="http://schema.org/Product">

<head>
  <meta charset=utf-8>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel=stylesheet href=https://www.arewewebyet.org/styles.css>
  <link rel=stylesheet href=https://www.arewewebyet.org/gh-fork-ribbon.css>
  <link href=/atom.xml type=application/atom+xml rel=alternate title="Atom feed (for state changes and news)">
  <title>Are we web yet? Yes, and it's freaking fast! </title>
  <meta name="description"
    content="AreWeWebYet gives insight on whether you can build your latest web-project on top of Rust" />

  <link rel="icon" href="https://www.arewewebyet.org/favicon.ico">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">


  <!--  ALL THE STANDARDS for an image!-->
  <meta itemprop="image" content=https://www.arewewebyet.org/screenshot.png />
  <meta name="twitter:image" content=https://www.arewewebyet.org/screenshot.png />
  <meta property="og:image" content=https://www.arewewebyet.org/screenshot.png />

  <!-- Open Graph extra -->
  <meta property="og:site_name" content="Are We Web Yet?" />
</head>

<body>

  <main role="content" class="content">
    <img src="/rust.png" alt="" class="rust-logo">
    

<div class="github-fork-ribbon-wrapper left">
  <div class="github-fork-ribbon">
    <a href="https://github.com/rust-lang/arewewebyet">Contribute on GitHub</a>
  </div>
</div>

<article class="article article--banner-spacing">
  <h1>Are we <em>web</em> yet?</h1>

  <p class="tagline"><strong>Yes! And it's freaking fast!</strong></p>
  
  <p>
    Rust has mature and production ready frameworks in <a href="/topics/frameworks/#pkg-actix-web">Actix Web</a> and
    <a href="/topics/frameworks/#pkg-axum">Axum</a>, and innovative ones like <a href="/topics/frameworks/#pkg-warp">Warp</a>
    and <a href="/topics/frameworks/#pkg-tide">Tide</a>. These provide everything you’d expect from a web framework, from routing
    and middleware, to templating, and JSON/form handling. There are crates for everything, and more! For databases, there’s:</p>

  <ul>
    <li>
      <a href="/topics/database/#pkg-diesel">Diesel</a>, a full-fledged ORM.
    </li>
    <li>
      <a href="/topics/database/#pkg-sqlx">sqlx</a>, the async sql toolkit.
    </li>
    <li>
      As well as native drivers for <a href="/topics/database/#pkg-mongodb">MongoDB</a>, <a
        href="/topics/database/#pkg-rusqlite">SQlite</a>, <a href="/topics/database/#pkg-postgres">Postgres</a>, and <a
        href="/topics/database/#pkg-mysql">MySQL</a>.
    </li>
  </ul>

  
  There are many integrations to third-party services 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
, such as:

  <ul>
    <li>
      <a href="/topics/web-apis/#pkg-rusoto_core">Rusoto</a> (AWS)
    </li>
    <li>
      <a href="/topics/web-apis/#pkg-azure_sdk_for_rust">Azure</a>
    </li>
    <li>
      <a href="/topics/services/#pkg-redis">Redis</a>
    </li>
    <li>
      <a href="/topics/services/#pkg-elasticsearch">Elasticsearch</a>
    </li>
  </ul>

  
  
  
  

  <p>And of course, there is plenty of support for basic web needs, like <a href="/topics/logging/">logging</a>
    
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
, <a href="/topics/auth/">authorization</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
, <a
      href="/topics/templating/">templating</a> 
<span class="level-indicator level-0"  title="everything is awesome: stable, tested and mature" >
 <i class="icon fa fa-check-circle"></i>
 </span>
, and <a href="/topics/email/">email</a>
    
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
.</p>

  
  <h2>Can I replace my Rails/Django/Laravel app already?</h2>
  
  <p>
    Rust does not have a dominant framework at the level of Django or Rails. Most Rust frameworks are smaller and modular, similar to Flask or Sinatra. 
    Rust does have a diverse package ecosystem, but you generally have to wire everything up yourself. Expect to put in a little bit of extra set up work 
    to get started. If you are expecting everything bundled up for you, then Rust might not be for you just yet.
  </p>

  

  <h2>WebAssembly???</h2>

  <p>Rust can run on the browser by compiling to <a href="/topics/webassembly/">WebAssembly</a>
    
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
. This means that you can take advantage of the amazing Rust ecosystem on the browser! Rust and
    WebAssembly integrate with existing Javascript tooling like NPM, Webpack, and ECMAScript modules! There are
    some <a href="/topics/webassembly/">awesome Rust and WebAssembly</a> projects out there. For example, <a
      href="https://github.com/yewstack/yew">Yew</a> and <a href="https://github.com/seed-rs/seed">Seed</a> let you create
    front-end web apps with Rust in a way that feels almost like React.js.</p>

  <p>For more information about Rust and WebAssembly, check out the <a
      href="https://rustwasm.github.io/docs/book/introduction.html">Rust and WebAssembly Book</a>.</p>

  <h2>Getting started</h2>

  <p>After you’ve set up your Rust and worked yourself <a href="https://doc.rust-lang.org/book/">through “The Book”</a>,
    you might want to check any of these resources:</p>

  <ul>
    <li><a
        href="https://www.youtube.com/watch?v=yNe9Xr35n4Q&amp;list=PL8lUUBadSMNBNKMYJpUE830tBiN6bxVRw&amp;ab_channel=DavidPedersen">Educational
        Rust Live Coding - Web App From Scratch</a></li>
    <li><a href="https://gill.net.in/posts/auth-microservice-rust-actix-web1.0-diesel-complete-tutorial/">Actix-Web Auth
        Microservice</a></li>
    <li><a href="https://www.lpalmieri.com/posts/2020-05-24-zero-to-production-0-foreword/">Zero To Production In Rust
        (Series)</a></li>
    <li><a href="https://dev.to/werner/practical-rust-web-development-api-rest-29g1">Practical Rust Web Development
        (Series)</a></li>
    <li><a href="https://rocket.rs/guide/v0.5/quickstart/">Rocket Quickstart Guide</a></li>
  </ul>

  <p>There are also some real world examples that can be looked at for reference:</p>

  <ul>
    <li><a href="https://github.com/Plume-org/Plume">Plume, a Federated blogging app (Rocket)</a></li>
    <li><a href="https://github.com/jetli/rust-yew-realworld-example-app">Yew realworld app (WebAssembly)</a></li>
    <li><a href="https://github.com/seed-rs/seed-rs-realworld">Seed realworld app (WebAssembly)</a></li>
    <li><a href="https://github.com/LemmyNet/lemmy">Lemmy, a federated alternative to Reddit (actix-web)</a></li>
    <li><a href="https://github.com/TatriX/realworld-rust-rocket">Rust + Rocket RealWorld example</a></li>
  </ul>

  <p>If you find yourself stuck and looking for help, you can check out the <a
      href="https://users.rust-lang.org/c/help">official Rust forum</a>, the <a
      href="https://stackoverflow.com/questions/tagged/rust">Rust tag on Stackoverflow</a>, or the <a
      href="https://discord.com/invite/rust-lang">Rust Discord server</a> where you are welcome to post your questions and
    will find excellent help.</p>

  <h2>In detail</h2>

  <p>Learn more about the state of web development in Rust by topic:</p>

  <ul class="topic-list">
    
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;lower-web-stack&#x2F;">Lower Web-Stack</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;testing&#x2F;">Testing</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;deploy&#x2F;">Deployment</a> 
<span class="level-indicator level-3"  title="not yet stable, but progressing" >
 <i class="icon fa fa-dot-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;webassembly&#x2F;">WebAssembly</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;http-clients&#x2F;">HTTP Clients</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;i18n&#x2F;">Internationalization</a> 
<span class="level-indicator level-4"  title="unstable/incomplete, needs work" >
 <i class="icon fa fa-dot-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;services&#x2F;">External Services</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;wasm-runtimes&#x2F;">WebAssembly Runtimes</a> 
<span class="level-indicator level-2"  title="getting there, stable but still maturing" >
 <i class="icon fa fa-chevron-circle-up"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;nodejs&#x2F;">Node.js</a> 
<span class="level-indicator level-0"  title="everything is awesome: stable, tested and mature" >
 <i class="icon fa fa-check-circle"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;database&#x2F;">Database</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;compression&#x2F;">Compression Libs</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;frameworks&#x2F;">Web Frameworks</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;templating&#x2F;">Templating</a> 
<span class="level-indicator level-0"  title="everything is awesome: stable, tested and mature" >
 <i class="icon fa fa-check-circle"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;web-apis&#x2F;">External Web APIs</a> 
<span class="level-indicator level-2"  title="getting there, stable but still maturing" >
 <i class="icon fa fa-chevron-circle-up"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;utils&#x2F;">Web Utils</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;browser&#x2F;">Browser</a> 
<span class="level-indicator level-4"  title="unstable/incomplete, needs work" >
 <i class="icon fa fa-dot-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;encoding&#x2F;">En- &amp; Decoding</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;crypto&#x2F;">Crypto</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;syndication&#x2F;">Syndication&#x2F;RSS</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;asyncio&#x2F;">Async I&#x2F;O</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;cms&#x2F;">CMS</a> 
<span class="level-indicator level-4"  title="unstable/incomplete, needs work" >
 <i class="icon fa fa-dot-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;logging&#x2F;">Logging</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;auth&#x2F;">Authorization&#x2F;Authentication</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;serializer&#x2F;">Serializers</a> 
<span class="level-indicator level-0"  title="everything is awesome: stable, tested and mature" >
 <i class="icon fa fa-check-circle"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;email&#x2F;">Email</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
    <li><a href="https:&#x2F;&#x2F;www.arewewebyet.org&#x2F;topics&#x2F;binary-protocols&#x2F;">Binary protocols</a> 
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
</li>
    
  </ul>

  <ul class="legend">
    <li>
<span class="level-indicator level-0"  title="everything is awesome: stable, tested and mature" >
 <i class="icon fa fa-check-circle"></i>
 </span>
: everything is awesome<a href="https://www.youtube.com/watch?v=9cQgQIMlwWw"
        target="_blank"></a>: stable, tested and mature</li>
    <li>
<span class="level-indicator level-1"  title="pretty great already" >
 <i class="icon fa fa-check-circle-o"></i>
 </span>
: stuff's pretty great</li>
    <li>
<span class="level-indicator level-2"  title="getting there, stable but still maturing" >
 <i class="icon fa fa-chevron-circle-up"></i>
 </span>
: getting there, stable but still maturing</li>
    <li>
<span class="level-indicator level-3"  title="not yet stable, but progressing" >
 <i class="icon fa fa-dot-circle-o"></i>
 </span>
: not yet stable, but progressing</li>
    <li>
<span class="level-indicator level-4"  title="unstable/incomplete, needs work" >
 <i class="icon fa fa-dot-circle-o"></i>
 </span>
: unstable/incomplete, needs work</li>
    <li>
<span class="level-indicator level-5"  title="barely there, needs serious work" >
 <i class="icon fa fa-dot-circle-o"></i>
 </span>
: barely there, needs serious work</li>
    <li>
<span class="level-indicator level-6"  title="basically non-existent" >
 <i class="icon fa fa-times-circle"></i>  </span>
: basically nonexistent</li>
  </ul>
</article>


  </main>

  <footer>
    <div class="devider">
      <!-- FIXME: put the Rust Web-WG Brand here?-->
      <!--         <div class="logo">
          <a href="http://www.bashy.io" title="a Bashy Production">
            <img src="/bashy-big.svg" alt="logo" />
          </a>
        </div> -->
      <div class="links">
        <ul class="pages">
          <li>
            <a href="/">Home</a>
          </li>
          <li>
            <a href="/news/">News</a>
          </li>
          <li>
            <a href="/topics/">Topics</a>
          </li>
          <li>
            <a href="/curators/">Curators</a>
          </li>
          <li>
            <a href="/about/">About</a>
          </li>
          <li>
            <a href="https://github.com/rust-net-web/arewewebyet/#contributing">Contribute</a>
          </li>
        </ul>
      </div>
    </div>
    <p class="last-updated">
      
      
        Last updated 24 July 2024 -
      

      <a href="https://github.com/rust-net-web/arewewebyet/#license">CC-BY-4.0</a>
    </p>
  </footer>
</body>

</html>