#Second binary is messing up the bundler

8 messages · Page 1 of 1 (latest)

radiant owl
#

I integrated tauri-specta into my build.
I didn't like the 'generate at unit test' time so I added a second binary to my project by adding a new src-tauri/src/bin/generate-specta.rs, but of course there are lots of other reasons a tauri app might have multiple binaries

Now cargo tauri build tries to bundle this binary and it tries(and fails for some reason) to bundle this second app.

How do I keep the same bundler behavior as when I only had the one main binary?

Looks like this is the same issue: https://stackoverflow.com/questions/76067440/using-tauri-with-multiple-rust-executables

grim hamlet
#

Don't do it like that

#

Simply integrate specta into your main function and annotate it with a debug assertion

radiant owl
#

That feels very broken, worse than doing it in the tests. This is a build step, not a runtime task.

grim hamlet
#

What exactly feels broken?

#

You are generating your types on app startup and regenerating them every time the backend code changes. The debug assertion removes that code gen step from the final app executable

#

In my opinion, this is multiple times better than having them be generated by another rust binary

brazen perch