-
I have a project that uses a rust server and a flutter frontend. Currently for communication I've been using a strange mix of serde/schemars to generate json schema outputs, and then flutter side use an npm package to turn it into dart classes. And all that is tied to the build-script in an infrastructure crate in my local project, so it generates everything whenever I do a build. Bar the flutter side where I have to run the npm command. Recently I've had a need for logic that I need both rust side and flutter, and I've also been meaning to switch my strange build script converter to a nicer one which doesn't need json as a medium, or npm to convert for that matter XD. But I would like to keep the buildscript style of converting all my code like my json schemars. I've seen quite a bit of documentation on the TL;DR, i did see that there was a function from the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Yes, it's possible to be in build.rs: https://cjycode.com/flutter_rust_bridge/guides/misc-features/build-rs However, currently when in this mode, the macros will not be expanded. This may or may not be a problem for you, depending on whether your code has macros. Also feel free to PR if you need the macros and need build.rs! |
Beta Was this translation helpful? Give feedback.
Yes, it's possible to be in build.rs: https://cjycode.com/flutter_rust_bridge/guides/misc-features/build-rs
However, currently when in this mode, the macros will not be expanded. This may or may not be a problem for you, depending on whether your code has macros. Also feel free to PR if you need the macros and need build.rs!