Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Rustでパケットと戯れる
Search
nwiizo
December 22, 2017
170
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rustでパケットと戯れる
nwiizo
December 22, 2017
More Decks by nwiizo
See All by nwiizo
AIで実装は速くなった。なのにプロダクトは速くならない。職能の壁を越えて価値のフローを設計する
nwiizo
8
7.8k
35分でわかるEffective Platform Engineering
nwiizo
6
910
20分でわかるセキュアAPI
nwiizo
3
410
型は壁、Rustでもバグを直すな、表現できなくせよ
nwiizo
16
2.6k
システムは「動く」だけでは足りない 実装編 - 非機能要件・分散システム・トレードオフをコードで見る
nwiizo
5
740
システムは「動く」だけでは 足りない - 非機能要件・分散システム・トレードオフの基礎
nwiizo
34
12k
アーキテクチャモダナイゼーションとは何か
nwiizo
18
8.2k
【社内勉強会】新年度からコーディングエージェントを使いこなす - 構造と制約で引き出すClaude Codeの実践知
nwiizo
42
24k
技術的負債の泥沼から組織を救う3つの転換点
nwiizo
10
8k
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
A better future with KSS
kneath
240
18k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Typedesign – Prime Four
hannesfritz
42
3.2k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
300
Prompt Engineering for Job Search
mfonobong
0
450
The untapped power of vector embeddings
frankvandijk
2
1.9k
The Cost Of JavaScript in 2023
addyosmani
55
10k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
990
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
530
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Transcript
None
None
None
None
None
None
No.1 No.4 No.3 No.2
None
No.2
No.2 • • • • • • • • •
No.2 http://rust-lang-ja.org/rust-by-example/index.html
fn main() { println!("Hello World!"); } No.2 src/main.rs
$cargo run Hello World! No.2 src/main.rs
use std::process::Command; fn main() { Command::new("ls") .arg("-l") .arg("-a") .spawn() .expect("ls
command failed to start"); } No.2
use std::net::{TcpListener, TcpStream}; use std::thread; // traits use std::io::Read; use
std::io::Write; fn handle_client(mut stream: TcpStream) { let mut buf; loop { // clear out the buffer so we don't send garbage buf = [0; 512]; let _ = match stream.read(&mut buf) { Err(e) => panic!("Got an error: {}", e), Ok(m) => { if m == 0 { // we've got an EOF break; } m }, }; match stream.write(&buf) { Err(_) => break, Ok(_) => continue, } } } fn main() { let listener = TcpListener::bind("127.0.0.1:8888").unwrap(); for stream in listener.incoming() { match stream { Err(e) => { println!("failed: {}", e) } Ok(stream) => { thread::spawn(move || { handle_client(stream) }); } } } } No.2
None
None
No.3
No.3
No.3 • • • • https://rust-lang-ja.github.io/the-rust-programming- language-ja/1.6/book/crates-and-modules.html
No.3 • • • •
None