thlorenz / rid

Rust integrated Dart framework providing an easy way to build Flutter apps with Rust.
63 stars 4 forks source link

refactor: field access implementation #10

Closed thlorenz closed 3 years ago

thlorenz commented 3 years ago

This refactor replaces code created early on to wrap struct field access with rid ffi. It didn't share any of the types nor render methods with the remaining code.

The new implementation does so as much as possible even though in some areas rendered code has to be somewhat different due to just providing references to data held on by the store directly or indirectly vs. values that are sent to Dart and not held on by Rust at all after that.

Lots of tests were added as well, mainly for the generated Rust code and I will include Rust/Dart integration tests to ensure the generated Dart code is correct as well in another PR.