Skip to content

Commit

Permalink
fix test, update version
Browse files Browse the repository at this point in the history
  • Loading branch information
photovoltex committed Feb 20, 2024
1 parent 30d7e28 commit 7673d57
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 27 deletions.
18 changes: 3 additions & 15 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]
members = [ "tauri-interop-macro" ]
package.edition = "2021"
package.version = "1.3.0"
package.version = "2.0.0-dev"
package.keywords = [ "wasm", "tauri", "command", "event", "leptos" ]
package.authors = [ "photovoltex" ]
package.repository = "https://github.com/photovoltex/tauri-interop.git"
Expand All @@ -20,8 +20,8 @@ description = "Easily connect your rust frontend and backend without writing dup
readme = "README.md"

[dependencies]
# tauri-interop-macro = { path = "./tauri-interop-macro" }
tauri-interop-macro = "1.3.0"
tauri-interop-macro = { path = "./tauri-interop-macro" }
#tauri-interop-macro = "2.0.0"

js-sys = "0.3.65"
serde = { version = "1.0.193", features = ["derive"] }
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,9 @@ async fn heavy_computation() {
### Event (Backend => Frontend Communication)
Definition for both tauri supported triplet and wasm:
```rust
#[derive(Default)]
#[tauri_interop::emit_or_listen]
use tauri_interop::Event;

#[derive(Default, Event)]
pub struct Test {
foo: String,
pub bar: bool,
Expand All @@ -123,8 +124,9 @@ which are used depending on the `target_family`

To emit a variable from the above struct (which is mostly intended to be used as state) in the host triplet
```rust , ignore-wasm32-unknown-unknown
#[derive(Default)]
#[tauri_interop::emit_or_listen]
use tauri_interop::Event;

#[derive(Default, Event)]
pub struct Test {
foo: String,
pub bar: bool,
Expand Down
2 changes: 1 addition & 1 deletion src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub mod listen;
/// Conditionally changes between [listen::Listen] and [emit::Emit]
///
/// When compiled to "target_family = wasm" then following is true.
/// ```
/// ```ignore
/// trait Parent = listen::Listen;
/// ```
#[cfg(not(target_family = "wasm"))]
Expand Down
6 changes: 2 additions & 4 deletions test-project/Cargo.lock

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

0 comments on commit 7673d57

Please sign in to comment.