Skip to content

v6.0.0-alpha

Compare
Choose a tag to compare
@temeddix temeddix released this 17 Jan 12:51
· 869 commits to main since this release

What's Changed

Full Changelog: v5.4.0...v6.0.0-alpha

There's a new simple codegen mechanism, and the mechanism is as follows. // [RINF:DART-SIGNAL] and // [RINF:RUST-SIGNAL] comment marks the message as communcation channel, so that the codegen can understand that it should provide additional mechanism for them.

The previous REST-style API will be deprecated. There are only two-way channels now. However, you can achieve request-response pattern quite easily as written in the docs.

From Dart to Rust

// proto

// [RINF:DART-SIGNAL]
message DataInput { ... }

would allow us to do

// Dart

dataInputSend(DataInput( ... ), null);

and

// Rust

let receiver = data_input_receiver();
while let Some(data_input) = receiver.recv().await {
    // Custom Rust logic here
}

From Rust to Dart

// proto

// [RINF:RUST-SIGNAL]
message DataOutput { ... }

would allow us to do

// Dart

dataOutputStream.listen((dataOutput) {
    // Custom Dart logic here
}

and

// Rust

data_output_send(DataOutput{ ... }, None);