Commit Graph
18 Commits
Author SHA1 Message Date
Nicholas SkinsacosandGitHub 1434b32b5a examples: improve echo example consistency (#7256) 2025-04-18 18:02:25 +03:30
Alice RyhlandGitHub b5d2b0d05b doc: fix links to new website (#2674) 2020-07-22 20:35:02 -07:00
Carl LercheandGitHub 8381dff39b chore: link mini-redis in examples (#2407) 2020-04-15 15:30:03 -07:00
Alice RyhlandCarl Lerche 7ee5542182 doc: fix old notes regarding examples and async/await (#2071) 2020-01-07 15:55:10 -08:00
Carl LercheandGitHub cfc15617a5 codec: move into tokio-util (#1675)
Related to #1318, Tokio APIs that are "less stable" are moved into a new
`tokio-util` crate. This crate will mirror `tokio` and provide
additional APIs that may require a greater rate of breaking changes.

As examples require `tokio-util`, they are moved into a separate
crate (`examples`). This has the added advantage of being able to avoid
example only dependencies in the `tokio` crate.
2019-10-22 10:13:49 -07:00
Eliza WeismanandGitHub 30330da11a chore: Fix examples not working with cargo run (#998)
* chore: Fix examples not working with `cargo run`

## Motivation

PR #991 moved the `tokio` crate to its own subdirectory, but did not
move the `examples` directory into `tokio/examples`. While attempting to
use the examples for testing another change, I noticed that #991 had
broken the ability to use `cargo run`, as the examples were no longer
considered part of a crate that cargo was aware of:

```
tokio on master [$] via 🦀v1.33.0 at ☸️ aks-eliza-dev
➜  cargo run --example chat
error: no example target named `chat`

Did you mean `echo`?
```

## Solution

This branch moves the examples into the `tokio` directory, so cargo is
now once again aware of them:

```
tokio on eliza/fix-examples [$] via 🦀v1.33.0 at ☸️ aks-eliza-dev
➜  cargo run --example chat
   Compiling tokio-executor v0.1.7 (/Users/eliza/Code/tokio/tokio-executor)
   Compiling tokio-reactor v0.1.9
   Compiling tokio-threadpool v0.1.13
   Compiling tokio-current-thread v0.1.6
   Compiling tokio-timer v0.2.10
   Compiling tokio-uds v0.2.5
   Compiling tokio-udp v0.1.3
   Compiling tokio-tcp v0.1.3
   Compiling tokio-fs v0.1.6
   Compiling tokio v0.1.18 (/Users/eliza/Code/tokio/tokio)
    Finished dev [unoptimized + debuginfo] target(s) in 7.04s
     Running `target/debug/examples/chat`
server running on localhost:6142
```

Signed-off-by: Eliza Weisman <[email protected]>

Signed-off-by: Eliza Weisman <[email protected]>
2019-03-22 15:25:42 -07:00
Michal 'vorner' VanerandCarl Lerche db9371126d Include a manually built runtime example (#306) 2018-05-29 14:44:28 -07:00
Julian TescherandCarl Lerche 06b2c40222 Fix typos (#348) 2018-05-08 11:44:17 -07:00
RomanandCarl Lerche 5b677934fe Add example that prints each packet from tcp client (#301) 2018-04-10 13:08:55 -07:00
DenisandCarl Lerche 16d3540ce9 Add UDP client example (send/recv_dgram) (#239) 2018-03-22 10:00:27 -07:00
Tosil VelkovandCarl Lerche 2a1585157e Fix wrong file link in examples readme.md (#208) 2018-03-09 12:26:09 -08:00
Carl LercheandGitHub 264fef60e3 Update readme (#196) 2018-03-07 22:28:01 -08:00
Carl LercheandGitHub f1cb12e14f Update examples to track latest Tokio changes (#180)
The exampes included in the repository have lagged behind the changes
made. Specifically, they do not use the new runtime construct.

This patch updates examples to use the latest features of Tokio.
2018-03-06 09:59:04 -08:00
RomanandCarl Lerche ad8338e4da Remove UdpCodec (#109)
`UdpFramed` is updated to use the `Encoder` and
`Decoder` traits from `tokio-io`.
2018-02-06 13:41:31 -08:00
Carl LercheandAlex Crichton 36aaaa1520 Rename crate to tokio 2017-10-30 16:37:00 -07:00
Alex Crichton 0868b97832 Add a tinydb example sharing state
This example is intended to showcase sharing state between all connected clients
on a server, for example a key/value store (in-memory database)

Closes #257
2017-09-23 12:22:34 -07:00
Alex Crichton 8a43472b35 Add an example of compressing on a CPU pool 2017-09-11 14:41:15 -07:00
Alex Crichton ecedea3404 Add a README for the examples 2017-09-11 13:31:08 -07:00