A statistical ecosystem modelling package, taking many features of the ecosystem into account. Gadget works by running an internal model based on many parameters, and then comparing the data from the output of this model to real data to get a goodness-of-fit likelihood score. These parameters can then be adjusted, and the model re-run, until an optimum is found, which corresponds to the model with the lowest likelihood score. Gadget allows the user to include a number of features into an ecosystem model: One or more species, each of which may be split into multiple stocks; multiple areas with migration between areas; predation between and within species; maturation; reproduction and recruitment; multiple commercial and survey fleets taking catches from the populations. For more details see < https://hafro.github.io/gadget2/>. This is the C++ Gadget2 runtime, making it available for R.