Aleph-Alpha/ts-rs

Generate types on build

Closed this issue ยท 1 comments

Hi ๐Ÿ‘‹
There is a way to generate types on build, or when wanted, through build.rs please ? Because actually, the only way is to call cargo test in build.rs, ans its run every tests, including integration testing. Maybe a `ts_rs::export_types()`` can be useful to call, instead of using tests.
Thanks a lot

I think cargo test export_bindings should do what you want.
Sadly, having one function to export all types is not currently feasible. It is possible, but currently only with workarounds to get around incremental compilation.