How to deal with type safety? #69
Closed
satvikpendem
started this conversation in
General
Replies: 1 comment 6 replies
-
Hi @satvikpendem, thank you for opening this discussion! The reason we're using simple address strings is that this system was meant to follow the design of RESTful API from the beginning. If you want a proper type checking in IDEs, using Protobuf instead of Messagepack would be possible. Since the data being passed between Dart and Rust are raw bytes, you can use any serialization method you like, including type-safe ones like Protobuf. I will add this idea to the docs soon, or potentially provide it as an alternative template if there's a PR for that :) |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Looks like we're basically taking the name of the function or category and passing it as a string in Dart that the Rust side then catches (or vice versa). Isn't this very brittle? If I want to refactor the Rust or Dart code I'd have to manually look for the function strings and change them, the intellisense refactoring in IDEs like VSCode won't be able to help me.
Beta Was this translation helpful? Give feedback.
All reactions