Skip to content

Commit b7ac6dc

Browse files
committed
Refactor
1 parent b4c25f6 commit b7ac6dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+101
-154
lines changed

.appveyor.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/target
1+
target/
22
**/*.rs.bk
33
Cargo.lock
44
bin/

.travis.yml

Lines changed: 0 additions & 69 deletions
This file was deleted.

Cargo.toml

Lines changed: 6 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,9 @@
1-
[package]
2-
name = "fluster"
3-
version = "0.1.0"
4-
authors = ["Mike Welsh <mwelsh@gmail.com>"]
5-
edition = "2018"
6-
7-
[lib]
8-
crate-type = ["cdylib", "rlib"]
9-
name = "fluster"
10-
path = "src/lib.rs"
11-
12-
[[bin]]
13-
name = "fluster"
14-
path = "src/lib.rs"
15-
16-
[features]
17-
default = ["console_error_panic_hook", "console_log"]
18-
19-
[dependencies]
20-
bacon_rajan_cc = "0.2"
21-
log = "0.4"
22-
url = "1.7.2"
23-
svg = "0.5.12"
24-
swf = { git = "https://github.com/Herschel/swf-rs", version = "*" }
25-
26-
# Desktop dependencies
27-
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
28-
lyon = "0.13.1"
29-
structopt = "0.2.15"
30-
glium = "0.24"
31-
glutin = "0.20"
32-
winit = "0.19.1"
33-
34-
# Wasm32 dependencies
35-
[target.'cfg(target_arch = "wasm32")'.dependencies]
36-
console_error_panic_hook = { version = "0.1.1", optional = true }
37-
console_log = { version = "0.1", optional = true }
38-
js-sys = "0.3.19"
39-
wasm-bindgen = "0.2"
40-
41-
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
42-
wasm-bindgen-test = "0.2"
43-
44-
[dependencies.web-sys]
45-
version = "0.3.19"
46-
features = ["CanvasRenderingContext2d", "Document", "Element", "HtmlCanvasElement", "Performance", "HtmlImageElement", "Window"]
47-
48-
[dev-dependencies]
49-
wasm-bindgen-test = "0.2"
1+
[workspace]
2+
members = [
3+
"lib",
4+
"desktop",
5+
"web"
6+
]
507

518
[patch.'https://github.com/Herschel/swf-rs']
529
swf = { path = "../swf-rs" }

desktop/Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[package]
2+
name = "fluster"
3+
version = "0.1.0"
4+
authors = ["Mike Welsh <mwelsh@gmail.com>"]
5+
edition = "2018"
6+
7+
[dependencies]
8+
fluster_core = { path = "../lib" }
9+
structopt = "0.2.15"

src/lib.rs renamed to desktop/src/main.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
mod backend;
2-
mod character;
3-
mod color_transform;
4-
mod display_object;
5-
mod graphic;
6-
mod library;
7-
mod matrix;
8-
mod movie_clip;
9-
mod player;
10-
mod stage;
11-
12-
pub use player::Player;
13-
use swf::Color;
1+
use fluster_core::Player;
142

153
#[cfg(not(target_arch = "wasm32"))]
164
#[allow(dead_code)]

lib/Cargo.toml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[package]
2+
name = "fluster_core"
3+
version = "0.1.0"
4+
authors = ["Mike Welsh <mwelsh@gmail.com>"]
5+
edition = "2018"
6+
7+
[features]
8+
default = ["console_error_panic_hook", "console_log"]
9+
10+
[dependencies]
11+
bacon_rajan_cc = "0.2"
12+
log = "0.4"
13+
url = "1.7.2"
14+
svg = "0.5.12"
15+
swf = { git = "https://github.com/Herschel/swf-rs", version = "*" }
16+
17+
# Desktop dependencies
18+
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
19+
lyon = "0.13.1"
20+
glium = "0.24"
21+
glutin = "0.20"
22+
winit = "0.19.1"
23+
24+
# Wasm32 dependencies
25+
[target.'cfg(target_arch = "wasm32")'.dependencies]
26+
console_error_panic_hook = { version = "0.1.1", optional = true }
27+
console_log = { version = "0.1", optional = true }
28+
js-sys = "0.3.19"
29+
wasm-bindgen = "0.2"
30+
31+
[dependencies.web-sys]
32+
version = "0.3.19"
33+
features = ["CanvasRenderingContext2d", "Document", "Element", "HtmlCanvasElement", "Performance", "HtmlImageElement", "Window"]
File renamed without changes.

0 commit comments

Comments
 (0)