Skip to content

Commit 13b9b66

Browse files
committed
homepage: update banner with charter, add tenets as blocks
1 parent 3b4b3d1 commit 13b9b66

4 files changed

Lines changed: 42 additions & 62 deletions

File tree

_includes/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<title>{% if page.title %}{{ page.title }} | hyper{% else %}{{ site.title }}{% endif %}</title>
44
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
55

6-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" integrity="sha256-wLz3iY/cO4e6vKZ4zRmo4+9XDpMcgKOvv/zEU3OMlRo=" crossorigin="anonymous">
6+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4bw+/aepP/YC94hEpVNVgiZdgIC5+VKNBQNGCHeKRQN+PtmoHDEXuppvnDJzQIu9" crossorigin="anonymous">
77
<link rel="stylesheet" href="{{ "/css/main.css" | absolute_url }}">
88

99
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

_layouts/home.html

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,53 @@
88
<section class="hyper-pageheader">
99
<div class="container">
1010
<h1>hyper</h1>
11-
<p>Fast and safe HTTP for the Rust language.</p>
11+
<p>A protective and efficient HTTP library for all.</p>
1212
<p><a href="/guides/1" class="btn hyper-getstarted">Get Started</a></p>
1313
</div>
1414
</section>
1515
<section class="container">
1616
<div class="row">
1717
<div class="col-md-6">
18-
<p class="lead">
19-
<b>Note:</b> hyper is planning a stable <code>1.0</code> release in 2023.
20-
These guides will be gradually transitioned to <code>1.0</code>, but if you're looking for
21-
guides for <code>0.14</code> you can find them <a href="/guides/0.14">here</a>. If you'd like to
22-
learn more about the move to <code>1.0</code>,
23-
<a href="https://seanmonstar.com/post/680802159018803200/hyper-10-roadmap">this</a> is a good place to start.
24-
</p>
25-
<p class="lead">hyper is a fast HTTP implementation written in and for Rust.</p>
26-
<ul>
27-
<li>A <strong>Client</strong> for talking to web services.</li>
28-
<li>A <strong>Server</strong> for building those web services.</li>
29-
<li>Blazing <strong>fast</strong><a href="https://www.techempower.com/benchmarks/#section=data-r18&hw=ph&test=plaintext">*</a> thanks to Rust.</li>
30-
<li>High <strong>concurrency</strong> with non-blocking sockets.</li>
31-
<li>HTTP/1 and <strong>HTTP/2</strong> support.</li>
32-
</ul>
18+
<h3>The HTTP implementation for Rust</h3>
19+
<ul>
20+
<li>A <strong>Client</strong> for talking to web services.</li>
21+
<li>A <strong>Server</strong> for building those web services.</li>
22+
<li>Blazing <strong>fast</strong><a href="https://www.techempower.com/benchmarks/#section=data-r18&hw=ph&test=plaintext">*</a> thanks to Rust.</li>
23+
<li>High <strong>concurrency</strong> with non-blocking sockets.</li>
24+
<li>HTTP/1 and <strong>HTTP/2</strong> support.</li>
25+
</ul>
26+
</div>
27+
<div class="col-md-6">
28+
<h3>Latest: 1.0 coming soon</h3>
29+
<p><strong>Note:</strong> hyper is planning a stable <code>1.0</code> release in 2023. These guides will be gradually transitioned to <code>1.0</code>, but if you're looking for guides for <code>0.14</code> you can find them <a href="/guides/0.14">here</a>. If you'd like to learn more about the move to <code>1.0</code>, <a href="https://seanmonstar.com/post/680802159018803200/hyper-10-roadmap">this</a> is a good place to start.</p>
30+
</div>
3331
</div>
34-
<div class="col-md-6">
35-
{{ content }}
32+
<div class="row">
33+
<div class="col-md-6 col-lg-4">
34+
<h3>Open</h3>
35+
<p>hyper is open source, always. The success of hyper depends on the health of the community building and using it. All contributions are in the open.</p>
36+
</div>
37+
<div class="col-md-6 col-lg-4">
38+
<h3>Correct</h3>
39+
<p>hyper is a memory safe and robust implementation of the HTTP specification. Memory safety is vital in a core Internet technology. Following the HTTP specifications correctly protects users. It makes the software durable to the “real world”. Where feasible, hyper enforces correct usage.</p>
40+
</div>
41+
<div class="col-md-6 col-lg-4">
42+
<h3>Fast</h3>
43+
<p>A fast experience delights users. A faster network library means a faster application, resulting in delighting our users’ users. Whether with one request, or millions.</p>
44+
</div>
45+
<div class="col-md-6 col-lg-4">
46+
<h3>HTTP/*</h3>
47+
<p>hyper is specifically focused on HTTP. Support for HTTP/1 and HTTP/2, with HTTP/3 in the works.</p>
48+
</div>
49+
<div class="col-md-6 col-lg-4">
50+
<h3>Flexible</h3>
51+
<p>hyper enables as many usecases as possible. It has no opinion on application structure, and makes few assumptions about its environment. This includes being portable to different operating systems.</p>
52+
</div>
53+
<div class="col-md-6 col-lg-4">
54+
<h3>Understable</h3>
55+
<p>hyper is no more complicated than it has to be. HTTP is not simple. It may not be as “easy” as 1-line to do everything, but it shouldn’t be “hard” to find the answers.</p>
56+
</div>
3657
</div>
37-
38-
</div>
3958
</section>
4059

4160
{% include footer.html %}

css/main.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ pre code {
186186
margin: 2rem 0 1rem;
187187
}
188188

189-
.hyper-content h3 {
189+
h3 {
190190
color: $primary-dim-color;
191191
}
192192

@@ -378,4 +378,4 @@ pre code {
378378

379379
.navbar .navbar-brand:hover {
380380
color: $primary-highlight-color
381-
}
381+
}

index.md

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,3 @@
22
layout: home
33
---
44

5-
```rust
6-
# extern crate tokio;
7-
# extern crate hyper;
8-
# extern crate http_body_util;
9-
# mod no_run {
10-
use std::{convert::Infallible, net::SocketAddr, error::Error};
11-
use http_body_util::Full;
12-
use hyper::{Request, Response, body::Bytes, service::service_fn};
13-
use hyper::server::conn::http1;
14-
use tokio::net::TcpListener;
15-
16-
async fn hello(
17-
_: Request<hyper::body::Incoming>,
18-
) -> Result<Response<Full<Bytes>>, Infallible> {
19-
Ok(Response::new(Full::new(Bytes::from("Hello World!"))))
20-
}
21-
22-
#[tokio::main]
23-
async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
24-
let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
25-
26-
let listener = TcpListener::bind(addr).await?;
27-
28-
loop {
29-
let (stream, _) = listener.accept().await?;
30-
31-
tokio::task::spawn(async move {
32-
if let Err(err) = http1::Builder::new()
33-
.serve_connection(stream, service_fn(hello))
34-
.await
35-
{
36-
println!("Error serving connection: {:?}", err);
37-
}
38-
});
39-
}
40-
}
41-
# }
42-
# fn main() {}
43-
```

0 commit comments

Comments
 (0)