#When does `setup` run?

5 messages · Page 1 of 1 (latest)

merry pebble
#

Does the setup function just run on install? Or, does it run with every start of the app?

Specifically, where should I put code that just needs to run once on a machine? E.g. creating the app_dir

leaden vine
#

If you talk about the rust side and the builder it is imho run every start. It doesn't know about machine state. Either you make this once action part of your installer or set state on the machine and check it at every run.

merry pebble
#

Then, this is my current understanding:

  • build.rs runs to create the installers
  • src/main.rs > setup runs on every start