#accessing created structs within' tauri;;command func

7 messages · Page 1 of 1 (latest)

keen bloom
#

I have a struct that is made within' main() called new_game and I have a function called beam where I want to access the newly created struct.

How do I go about this exactly?...

#

at the moment i figured out a work around with statics and unsafe

#

alright i got it working, just need to find a SAFER method lol

drowsy gorge
#

You .manage() some State and then use dependency injection in your commands to access the value.

drowsy gorge
#

No problem! I hope your Tauri journey is a good one. 🙂