Web development

From Rust Community Wiki
Revision as of 02:13, 29 April 2020 by Notriddle (talk | contribs) (Created page with "Developing for the web allows you to provide content for the word's most popular application platform and document distribution network. Rust's async I/O system allows you to...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Developing for the web allows you to provide content for the word's most popular application platform and document distribution network. Rust's async I/O system allows you to build highly concurrent server applications, its WebAssembly compiler target makes it possible to write applications that run within the browser, and the crates.io library repository provides reusable libraries for most web standards and framework needs.

History

Rust was first publicly announced to the world as part of "Project Servo," a research project at Mozilla, the non-profit behind the Firefox web browser. Servo is a research project to design and implement a web browser for highly multithreaded computers, and is implemented primarily in Rust. Rust and Servo were mostly designed and implemented together up until Rust's 1.0 release, and both of them provide feedback for each other. Some well-isolated parts of Servo, like its implementation of CSS, are now being used in Firefox.

After Rust was announced and crates.io was set up, the stage was set for a more well-rounded set of libraries to be developed, particularly for web servers. [ DESCRIBE HISTORY OF hyper, actix, and other impactful community libraries ]

Many of Rust's web libraries are maintained by Mozilla under the Servo organization, such as the url crate. Others, like the hyper HTTP implementation, are independent projects. There are also frameworks, such as the Rocket framework, that wrap the lower-level libraries behind an easy-to-use facade for developing applications.

Crates implementing web standards

Notable, maintained crates implementing web standards and popular web formats
Crate Maintained by Description
hyper hyperium An implementation of HTTP, the internet protocol that web servers and user agents use to communicate
rustls ctz An implementation of TLS, the security layer of "https" and other protocols
native-tls sfackler Bindings to your operating system's built-in implementation of TLS, the security layer of "https" and other protocols
url servo An implementation of the WHATWG URL, a parser for web addresses like http://rust-lang.org
selectors servo An implementation of the W3C CSS selector specification, the part of a stylesheet that determines which elements to apply the style to
html5ever servo An implementation of the WHATWG HTML parser, the file format of web documents
serde_json serde An implementation of JSON (part of the ECMAScript standard), a common data interchange format
xml-rs netvl An implementation of XML (available with a serde binding though serde-xml-rs), a common data interchange format
cssparser servo An implementation of the W3C CSS syntax specification, the file format of web stylesheets
bbclash EndaHallahan An implementation of bbcode, a popular authoring format for user-contributed content
pulldown-cmark raphlinus An implementation of markdown, a popular authoring format for user-contributed content
comrak kivikakk An implementation of markdown, a popular authoring format for user-contributed content

Web server frameworks

[Comparison grid for: Rocket, Actix-Web, and the general set of popular server frameworks ]

WebAssembly

[todo]

Other web development crates

See also