Modules on Aptos
Aptos allows for permissionless publishing of modules within a package as well as upgrading those that have appropriate compatibility policy set.
A module contains several structs and functions, much like Rust.
During package publishing time, a few constraints are maintained:
- Both Structs and public function signatures are published as immutable.
- When publishing a module for the first time, The VM will search for and execute an
init_module(account: &signer)
function.