How does dependency work in Move?
-
Is a dependency staticly linked or dynamicly linked?
-
If it is staticly linked, why does it require the referenced package to contain published-at field?
-
How can I specify different networks for published-at?
-
Is there any decent document about package dependency? Or is there any working example?
Thanks.
1 Like
Linkage on Sui is a mix of static and dynamic linkage.
Every package chooses the linkage it uses when its functions are used as entrypoints (called directly from a PTB) statically – this cannot change once the package has been published.
But a package can also choose to override its dependencies’ dependencies (with some constraints, like it can only upgrade their versions, not downgrade them).
Docs: I think the best resource we have at the moment is - move-book [dot] com/reference/packages.html#movetoml