diff --git a/Cargo.toml b/Cargo.toml index 808f760d9c4..4208e28f9c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -83,3 +83,6 @@ members = [ [patch.crates-io] wasm-bindgen = { path = '.' } +wasm-bindgen-futures = { path = 'crates/futures' } +js-sys = { path = 'crates/js-sys' } +web-sys = { path = 'crates/web-sys' } diff --git a/examples/add/Cargo.toml b/examples/add/Cargo.toml index e9969aa0bba..90e5dd00967 100644 --- a/examples/add/Cargo.toml +++ b/examples/add/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "add" version = "0.1.0" -authors = ["Alex Crichton "] +authors = ["The wasm-bindgen Developers"] [lib] crate-type = ["cdylib"] [dependencies] -wasm-bindgen = { path = "../.." } +wasm-bindgen = "0.2.27" diff --git a/examples/canvas/Cargo.toml b/examples/canvas/Cargo.toml index 3966d127e9b..eadd7f17648 100644 --- a/examples/canvas/Cargo.toml +++ b/examples/canvas/Cargo.toml @@ -7,11 +7,11 @@ authors = ["The wasm-bindgen Developers"] crate-type = ["cdylib"] [dependencies] -js-sys = { path = "../../crates/js-sys" } -wasm-bindgen = { path = "../.." } +js-sys = "0.3.4" +wasm-bindgen = "0.2.27" [dependencies.web-sys] -path = "../../crates/web-sys" +version = "0.3.4" features = [ 'CanvasRenderingContext2d', 'Document', diff --git a/examples/char/Cargo.toml b/examples/char/Cargo.toml index d4243cb9c6a..e772df47216 100644 --- a/examples/char/Cargo.toml +++ b/examples/char/Cargo.toml @@ -1,14 +1,10 @@ [package] name = "char" version = "0.1.0" -authors = ["Robert Masen "] +authors = ["The wasm-bindgen Developers"] [lib] crate-type = ["cdylib"] [dependencies] -# Here we're using a path dependency to use what's already in this repository, -# but you'd use the commented out version below if you're copying this into your -# project. -wasm-bindgen = { path = "../.." } -#wasm-bindgen = "0.2" +wasm-bindgen = "0.2.27" diff --git a/examples/closures/Cargo.toml b/examples/closures/Cargo.toml index 49f473cb224..d695c70ba23 100644 --- a/examples/closures/Cargo.toml +++ b/examples/closures/Cargo.toml @@ -1,17 +1,17 @@ [package] name = "closures" version = "0.1.0" -authors = ["Alex Crichton "] +authors = ["The wasm-bindgen Developers"] [lib] crate-type = ["cdylib"] [dependencies] -wasm-bindgen = { path = "../.." } -js-sys = { path = "../../crates/js-sys" } +wasm-bindgen = "0.2.27" +js-sys = "0.3.4" [dependencies.web-sys] -path = "../../crates/web-sys" +version = "0.3.4" features = [ 'CssStyleDeclaration', 'Document', diff --git a/examples/console_log/Cargo.toml b/examples/console_log/Cargo.toml index b1e80c6418a..da5fef4bc98 100644 --- a/examples/console_log/Cargo.toml +++ b/examples/console_log/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "console_log" version = "0.1.0" -authors = ["Alex Crichton "] +authors = ["The wasm-bindgen Developers"] [lib] crate-type = ["cdylib"] [dependencies] -wasm-bindgen = { path = "../.." } -web-sys = { path = '../../crates/web-sys', features = ['console'] } +wasm-bindgen = "0.2.27" +web-sys = { version = "0.3.4", features = ['console'] } diff --git a/examples/dom/Cargo.toml b/examples/dom/Cargo.toml index 3b69fd40835..989ff17ffb7 100644 --- a/examples/dom/Cargo.toml +++ b/examples/dom/Cargo.toml @@ -7,10 +7,10 @@ authors = ["The wasm-bindgen Developers"] crate-type = ["cdylib"] [dependencies] -wasm-bindgen = { path = "../.." } +wasm-bindgen = "0.2.27" [dependencies.web-sys] -path = '../../crates/web-sys' +version = "0.3.4" features = [ 'Document', 'Element', diff --git a/examples/duck-typed-interfaces/Cargo.toml b/examples/duck-typed-interfaces/Cargo.toml index 6fce01f5785..a14dc669029 100644 --- a/examples/duck-typed-interfaces/Cargo.toml +++ b/examples/duck-typed-interfaces/Cargo.toml @@ -7,4 +7,4 @@ authors = ["The wasm-bindgen Developers"] crate-type = ["cdylib"] [dependencies] -wasm-bindgen = { path = "../.." } +wasm-bindgen = "0.2.27" diff --git a/examples/fetch/Cargo.toml b/examples/fetch/Cargo.toml index 5992a1531cc..01a0a1b2129 100644 --- a/examples/fetch/Cargo.toml +++ b/examples/fetch/Cargo.toml @@ -8,14 +8,14 @@ crate-type = ["cdylib"] [dependencies] futures = "0.1.20" -wasm-bindgen = { path = "../..", features = ["serde-serialize"] } -js-sys = { path = "../../crates/js-sys" } -wasm-bindgen-futures = { path = "../../crates/futures" } +wasm-bindgen = { version = "0.2.27", features = ["serde-serialize"] } +js-sys = "0.3.4" +wasm-bindgen-futures = "0.3.4" serde = "^1.0.59" serde_derive = "^1.0.59" [dependencies.web-sys] -path = "../../crates/web-sys" +version = "0.3.4" features = [ 'Headers', 'Request', diff --git a/examples/guide-supported-types-examples/Cargo.toml b/examples/guide-supported-types-examples/Cargo.toml index 9c73077aeaf..5b8733bb268 100644 --- a/examples/guide-supported-types-examples/Cargo.toml +++ b/examples/guide-supported-types-examples/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "guide-supported-types-examples" version = "0.1.0" -authors = ["Nick Fitzgerald "] +authors = ["The wasm-bindgen Developers"] [lib] crate-type = ["cdylib"] [dependencies] -wasm-bindgen = { path = "../.." } +wasm-bindgen = "0.2.27" diff --git a/examples/hello_world/Cargo.toml b/examples/hello_world/Cargo.toml index e61d5838922..f4863ce0357 100644 --- a/examples/hello_world/Cargo.toml +++ b/examples/hello_world/Cargo.toml @@ -7,8 +7,4 @@ authors = ["The wasm-bindgen Developers"] crate-type = ["cdylib"] [dependencies] -# Here we're using a path dependency to use what's already in this repository, -# but you'd use the commented out version below if you're copying this into your -# project. -wasm-bindgen = { path = "../.." } -#wasm-bindgen = "0.2" +wasm-bindgen = "0.2.27" diff --git a/examples/import_js/Cargo.toml b/examples/import_js/Cargo.toml index bf2fdf7ab27..a9fb587b8a4 100644 --- a/examples/import_js/Cargo.toml +++ b/examples/import_js/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "import_js" version = "0.1.0" -authors = ["Alex Crichton "] +authors = ["The wasm-bindgen Developers"] [lib] crate-type = ["cdylib"] [dependencies] -wasm-bindgen = { path = "../.." } +wasm-bindgen = "0.2.27" diff --git a/examples/julia_set/Cargo.toml b/examples/julia_set/Cargo.toml index 53cd471dd21..ce4e277c206 100644 --- a/examples/julia_set/Cargo.toml +++ b/examples/julia_set/Cargo.toml @@ -1,16 +1,16 @@ [package] name = "julia_set" version = "0.1.0" -authors = ["Marcin Baraniecki "] +authors = ["The wasm-bindgen Developers"] [lib] crate-type = ["cdylib"] [dependencies] -wasm-bindgen = { path = "../.." } +wasm-bindgen = "0.2.27" [dependencies.web-sys] -path = '../../crates/web-sys' +version = "0.3.4" features = [ 'ImageData', 'CanvasRenderingContext2d', diff --git a/examples/no_modules/Cargo.toml b/examples/no_modules/Cargo.toml index f482b44e662..caab15d511e 100644 --- a/examples/no_modules/Cargo.toml +++ b/examples/no_modules/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "no_modules" version = "0.1.0" -authors = ["Alex Crichton "] +authors = ["The wasm-bindgen Developers"] [lib] crate-type = ["cdylib"] [dependencies] -wasm-bindgen = { path = "../.." } +wasm-bindgen = "0.2.27" diff --git a/examples/paint/Cargo.toml b/examples/paint/Cargo.toml index 9b0fcc24e53..684f6b1cf0b 100644 --- a/examples/paint/Cargo.toml +++ b/examples/paint/Cargo.toml @@ -7,11 +7,11 @@ authors = ["The wasm-bindgen Developers"] crate-type = ["cdylib"] [dependencies] -js-sys = { path = "../../crates/js-sys" } -wasm-bindgen = { path = "../.." } +js-sys = "0.3.4" +wasm-bindgen = "0.2.27" [dependencies.web-sys] -path = "../../crates/web-sys" +version = "0.3.4" features = [ 'CanvasRenderingContext2d', 'CssStyleDeclaration', diff --git a/examples/performance/Cargo.toml b/examples/performance/Cargo.toml index 594c0fe09f2..c0e9df929b5 100644 --- a/examples/performance/Cargo.toml +++ b/examples/performance/Cargo.toml @@ -7,9 +7,9 @@ authors = ["The wasm-bindgen Developers"] crate-type = ["cdylib"] [dependencies] -wasm-bindgen = { path = "../.." } +wasm-bindgen = "0.2.27" humantime = "1" [dependencies.web-sys] -path = '../../crates/web-sys' +version = "0.3.4" features = ['Window', 'Performance', 'PerformanceTiming'] diff --git a/examples/raytrace-parallel/Cargo.toml b/examples/raytrace-parallel/Cargo.toml index e2ae2e9db41..895a9168d5e 100644 --- a/examples/raytrace-parallel/Cargo.toml +++ b/examples/raytrace-parallel/Cargo.toml @@ -9,13 +9,13 @@ crate-type = ["cdylib"] [dependencies] console_error_panic_hook = "0.1" futures = "0.1" -js-sys = { path = '../../crates/js-sys' } +js-sys = "0.3.4" raytracer = { git = 'https://github.com/alexcrichton/raytracer', branch = 'update-deps' } -wasm-bindgen = { path = "../..", features = ['serde-serialize'] } -wasm-bindgen-futures = { path = '../../crates/futures' } +wasm-bindgen = { version = "0.2.27", features = ['serde-serialize'] } +wasm-bindgen-futures = "0.3.4" [dependencies.web-sys] -path = '../../crates/web-sys' +version = "0.3.4" features = [ 'CanvasRenderingContext2d', 'ErrorEvent', diff --git a/examples/todomvc/Cargo.toml b/examples/todomvc/Cargo.toml index 3693ae9e771..aecf97f95cc 100644 --- a/examples/todomvc/Cargo.toml +++ b/examples/todomvc/Cargo.toml @@ -10,12 +10,12 @@ crate-type = ["cdylib"] askama = "0.7.2" [dependencies] -js-sys = { path = "../../crates/js-sys" } -wasm-bindgen = { path = "../../" } +js-sys = "0.3.4" +wasm-bindgen = "0.2.27" askama = "0.7.2" [dependencies.web-sys] -path = "../../crates/web-sys" +version = "0.3.4" features = [ 'console', 'CssStyleDeclaration', diff --git a/examples/wasm-in-wasm/Cargo.toml b/examples/wasm-in-wasm/Cargo.toml index 4ffefe16f32..a324000d336 100644 --- a/examples/wasm-in-wasm/Cargo.toml +++ b/examples/wasm-in-wasm/Cargo.toml @@ -1,11 +1,11 @@ [package] name = "wasm-in-wasm" version = "0.1.0" -authors = ["Alex Crichton "] +authors = ["The wasm-bindgen Developers"] [lib] crate-type = ["cdylib"] [dependencies] -wasm-bindgen = { path = "../.." } -js-sys = { path = "../../crates/js-sys" } +wasm-bindgen = "0.2.27" +js-sys = "0.3.4" diff --git a/examples/wasm2js/Cargo.toml b/examples/wasm2js/Cargo.toml index f0d1e702d81..134464aa210 100644 --- a/examples/wasm2js/Cargo.toml +++ b/examples/wasm2js/Cargo.toml @@ -1,14 +1,10 @@ [package] name = "wasm2js" version = "0.1.0" -authors = ["Alex Crichton "] +authors = ["The wasm-bindgen Developers"] [lib] crate-type = ["cdylib"] [dependencies] -# Here we're using a path dependency to use what's already in this repository, -# but you'd use the commented out version below if you're copying this into your -# project. -wasm-bindgen = { path = "../.." } -#wasm-bindgen = "0.2" +wasm-bindgen = "0.2.27" diff --git a/examples/webaudio/Cargo.toml b/examples/webaudio/Cargo.toml index d4790b2860c..22011507c77 100644 --- a/examples/webaudio/Cargo.toml +++ b/examples/webaudio/Cargo.toml @@ -7,10 +7,10 @@ authors = ["The wasm-bindgen Developers"] crate-type = ["cdylib"] [dependencies] -wasm-bindgen = { path = "../.." } +wasm-bindgen = "0.2.27" [dependencies.web-sys] -path = "../../crates/web-sys" +version = "0.3.4" features = [ 'AudioContext', 'AudioDestinationNode', diff --git a/examples/webgl/Cargo.toml b/examples/webgl/Cargo.toml index b1c3e5ae7e0..c3cde861083 100644 --- a/examples/webgl/Cargo.toml +++ b/examples/webgl/Cargo.toml @@ -7,11 +7,11 @@ authors = ["The wasm-bindgen Developers"] crate-type = ["cdylib"] [dependencies] -js-sys = { path = "../../crates/js-sys" } -wasm-bindgen = { path = "../.." } +js-sys = "0.3.4" +wasm-bindgen = "0.2.27" [dependencies.web-sys] -path = "../../crates/web-sys" +version = "0.3.4" features = [ 'Document', 'Element', diff --git a/publish.rs b/publish.rs index 1d2f10fa360..32ea5a45382 100644 --- a/publish.rs +++ b/publish.rs @@ -57,13 +57,14 @@ fn main() { let mut crates = Vec::new(); crates.push(read_crate("./Cargo.toml".as_ref())); find_crates("crates".as_ref(), &mut crates); + find_crates("examples".as_ref(), &mut crates); let pos = CRATES_TO_PUBLISH.iter() .chain(CRATES_TO_AVOID_PUBLISH) .enumerate() .map(|(i, c)| (*c, i)) .collect::>(); - crates.sort_by_key(|krate| pos[&krate.name[..]]); + crates.sort_by_key(|krate| pos.get(&krate.name[..])); match &env::args().nth(1).expect("must have one argument")[..] { "bump" => { @@ -90,6 +91,8 @@ fn find_crates(dir: &Path, dst: &mut Vec) { .any(|c| krate.name == *c) { dst.push(krate); + } else if dir.iter().any(|s| s == "examples") { + dst.push(krate); } else { panic!("failed to find {:?} in whitelist or blacklist", krate.name); }