v6.0.0-alpha
What's Changed
- Event driven communication by @temeddix in #270
- Event driven system improvement by @temeddix in #271
- Enable customized configuration by @temeddix in #272
- Organize code and docs by @temeddix in #274
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);