#Get app version

11 messages · Page 1 of 1 (latest)

modest atlas
#

Hi, I would like to get my app version from rust side
I see there is PackageInfo. How can I use it to get app version ?

frail jetty
#
let context = tauri::generate_context!();
// context.config().package.version

tauri::Builder::default().build(context);
modest atlas
#

And during runtime ?

#

macro is usefull only on compile time

frail jetty
#

Yes, the code to read tauri.conf.json will be generated after compilation

modest atlas
#

And what is the return type of context.config().package.version ?

#

Gotcha

#

Option<String >

modest atlas
#

It return semver::Version

#

Can I use it instead ?