Skip to content

Commit

Permalink
chore: release 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
abrgr committed Feb 21, 2022
1 parent 5f54690 commit 73c670c
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 27 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ To start generating bindings in your rust projects, you have a few options:

1. Run `cargo run ts-bindgen -- --output src/bindings.rs your-ts-module` to generate `src/bindings.rs` from `your-ts-module` where `your-ts-module` is a `./path/to/defs.d.ts`, `/path/to/defs.d.ts`, or `module-in-node_modules`.
2. Invoke `cargo run ts-bindgen -- --output src/bindings.rs --rerun-if-changed your-ts-module` in your `build.rs`.
3. Add `ts-bindgen = { version = "0.3.0", default-features = false }` to your `cargo.toml` dependencies and invoke `ts_bindgen::generate_rust_string_for_typescript(ts_bindgen::StdFs, "your-module")` in your `build.rs`. Note: while the ts-bindgen executable will rustfmt the generated bindings, `generate_rust_string_for_typescript` does not.
3. Add `ts-bindgen = { version = "0.4.0", default-features = false }` to your `cargo.toml` dependencies and invoke `ts_bindgen::generate_rust_string_for_typescript(ts_bindgen::StdFs, "your-module")` in your `build.rs`. Note: while the ts-bindgen executable will rustfmt the generated bindings, `generate_rust_string_for_typescript` does not.

The generated bindings depend on the ts-bindgen runtime: ts-bindgen-rt, wasm-bindgen, serde, and (optionally) js-sys and web-sys so add the following to your `Cargo.toml`:

```toml
[dependencies]
ts-bindgen-rt = "0.3.0"
ts-bindgen-rt = "0.4.0"
wasm-bindgen = "0.2.63"
serde = { version = "1.0", features = ["derive"] }
js-sys = "0.3.53" # optional, depending on your input typescript
Expand Down
2 changes: 1 addition & 1 deletion ts-bindgen-build-support/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ts-bindgen-build-support"
version = "0.4.0-pre"
version = "0.4.0"
description = "Generate a wasm-bindgen interface from typescript definitions. Build-time utilities."
authors = ["Adam Berger <adam@ratchetdesigns.com>"]
license = "MIT OR Apache-2.0"
Expand Down
4 changes: 2 additions & 2 deletions ts-bindgen-gen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ts-bindgen-gen"
version = "0.4.0-pre"
version = "0.4.0"
description = "Generate a wasm-bindgen interface from typescript definitions"
authors = ["Adam Berger <adam@ratchetdesigns.com>"]
license = "MIT OR Apache-2.0"
Expand All @@ -23,7 +23,7 @@ unicode-xid = "0.2.2"
heck = "0.3.3"
strum_macros = "0.23.0"
enum_to_enum = "0.1.0"
ts-bindgen-build-support = { version = "=0.4.0-pre", path = "../ts-bindgen-build-support" }
ts-bindgen-build-support = { version = "=0.4.0", path = "../ts-bindgen-build-support" }

[dev-dependencies]
tempfile = "3.2.0"
Expand Down
2 changes: 1 addition & 1 deletion ts-bindgen-gen/tests/end_to_end_template/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ts-bindgen-gen/tests/end_to_end_template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ serde = { version = "1.0", features = ["derive"] }
wasm-bindgen = { version = "0.2.63", features = ["serde-serialize"] }
js-sys = "0.3.53"
console_error_panic_hook = { version = "0.1.6", optional = true }
ts-bindgen-rt = { version = "0.4.0-pre", path = "./ts-bindgen-rt" }
ts-bindgen-rt = { version = "0.4.0", path = "ts-bindgen-rt" }

[dev-dependencies]
wasm-bindgen-test = "0.3.13"
4 changes: 2 additions & 2 deletions ts-bindgen-macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ts-bindgen-macro"
version = "0.4.0-pre"
version = "0.4.0"
description = "Macro to generate a wasm-bindgen interface from typescript definitions"
authors = ["Adam Berger <adam@ratchetdesigns.com>"]
license = "MIT OR Apache-2.0"
Expand All @@ -15,7 +15,7 @@ categories = ["compilers", "command-line-utilities", "development-tools::ffi", "
proc-macro = true

[dependencies]
ts-bindgen-gen = { version = "=0.4.0-pre", path = "../ts-bindgen-gen" }
ts-bindgen-gen = { version = "0.4.0", path = "../ts-bindgen-gen" }
quote = "1.0"
syn = "1.0.74"

Expand Down
2 changes: 1 addition & 1 deletion ts-bindgen-rt/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ts-bindgen-rt"
version = "0.4.0-pre"
version = "0.4.0"
description = "Runtime dependency for ts-bindgen. Supports wasm-bindgen interfaces autogenerated from typescript definitions"
authors = ["Adam Berger <adam@ratchetdesigns.com>"]
license = "MIT OR Apache-2.0"
Expand Down
8 changes: 4 additions & 4 deletions ts-bindgen-web/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ts-bindgen-web/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ts-bindgen-web"
version = "0.4.0-pre"
version = "0.4.0"
description = "Web interface for generating wasm-bindgen bindings from typescript definitions"
authors = ["Adam Berger <adam@ratchetdesigns.com>"]
license = "MIT OR Apache-2.0"
Expand All @@ -23,7 +23,7 @@ opt-level = "s"
[dependencies]
wasm-bindgen = "0.2.63"
yew = "0.19.3"
ts-bindgen = { version = "0.4.0-pre", path = "../ts-bindgen", default-features = false }
ts-bindgen = { version = "0.4.0", path = "../ts-bindgen", default-features = false }
js-sys = "0.3.53"
web-sys = { version = "0.3.53", features = ["Window"] }

Expand Down
4 changes: 2 additions & 2 deletions ts-bindgen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ts-bindgen"
version = "0.4.0-pre"
version = "0.4.0"
description = "Generate a wasm-bindgen interface from typescript definitions"
authors = ["Adam Berger <adam@ratchetdesigns.com>"]
license = "MIT OR Apache-2.0"
Expand All @@ -22,7 +22,7 @@ default = ["bin"]
bin = ["clap", "which"]

[dependencies]
ts-bindgen-gen = { version = "=0.4.0-pre", path = "../ts-bindgen-gen" }
ts-bindgen-gen = { version = "=0.4.0", path = "../ts-bindgen-gen" }
clap = { version = "3.0.1", optional = true, features = ["derive"] }
which = { version = "4.2.2", optional = true }

Expand Down
4 changes: 2 additions & 2 deletions ts-bindgen/examples/paperjs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ts-bindgen/examples/paperjs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ts-bindgen-example-paperjs"
version = "0.2.0"
version = "0.4.0"
description = "Example of using ts-bindgen to interface with three.js"
authors = ["Adam Berger <adam@ratchetdesigns.com>"]
license = "MIT OR Apache-2.0"
Expand All @@ -21,5 +21,5 @@ wasm-bindgen-test = "0.3.13"
wasm-bindgen = "0.2.63"
js-sys = "0.3.53"
web-sys = { version = "0.3.53", features = ["Window", "HtmlCanvasElement", "ImageData", "SvgElement", "HtmlImageElement", "CanvasRenderingContext2d", "HtmlScriptElement"] }
ts-bindgen-rt = { version = "0.4.0-pre", path = "../../../ts-bindgen-rt" }
ts-bindgen-rt = { version = "0.4.0", path = "../../../ts-bindgen-rt" }
serde = { version = "1.0", features = ["derive"] }

0 comments on commit 73c670c

Please sign in to comment.