Skip to content
This repository was archived by the owner on Dec 3, 2019. It is now read-only.

Commit cc369e7

Browse files
committed
Started to try and get some basic rust code working. Waiting on rust-lang/rust#37793 before I can continue
1 parent 39d41ae commit cc369e7

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

image-worker/Cargo.toml

+5
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ version = "0.1.0"
44
authors = ["Sunjay Varma <[email protected]>"]
55

66
[dependencies]
7+
image = "0.10.3"
8+
rustc-serialize = "0.3"
9+
serde = "0.8"
10+
serde_json = "0.8"
11+
serde_derive = "0.8"

image-worker/src/main.rs

+28-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
1+
#![feature(proc_macro)]
2+
3+
#[macro_use]
4+
extern crate serde_derive;
5+
6+
extern crate serde;
7+
extern crate serde_json;
8+
extern crate rustc_serialize;
9+
10+
extern crate image;
11+
12+
use std::io::BufRead;
13+
14+
#[derive(Debug, PartialEq, Serialize, Deserialize)]
15+
enum Action {
16+
Undo,
17+
Redo,
18+
Crop {x: u32, y: u32, width: u32, height: u32},
19+
FlipHorizontal,
20+
FlipVertical,
21+
Resize {width: u32, height: u32},
22+
}
23+
124
fn main() {
2-
println!("Hello, world!");
25+
println!("{}", serde_json::to_string(&Action::Undo).unwrap());
26+
//let stdin = io::stdin();
27+
//for line in stdin.lock().lines() {
28+
// let line = line.unwrap();
29+
//}
330
}

0 commit comments

Comments
 (0)