Reusable artifacts
Write the dependency where you use it, or let Studio’s Add parts browser insert it into a new file. No dependency table or lockfile is required.
use property "@hyle/Thermal#2";use preset "@hyle/Warm#3";use model "@hyle/Ember#4";use behavior "@alice/Cool#7";use visual "@hyle/HeatColor#2";These are illustrative coordinates: the chosen revision must exist and be public.
#2 means exactly revision 2, not the second major version or the latest release.
Missing versions, ranges and latest are errors. Changing a version is an explicit
source edit; later publications never silently update your simulation.
An author owns one artifact per kind and source name. Publishing the same named part from another simulation creates a new revision of that artifact. Other authors have their own namespaces. Existing installations with historical duplicate identities require an explicit data migration before their ambiguous names can be used in string imports; their saved ID-based references keep working.
What gets imported
Section titled “What gets imported”A complete model brings its properties, defaults, scheduled behaviors, appearance and required context. Imported phases follow local phases. A local visual binding can replace its appearance; adding another phase adds execution.
A loose behavior needs a run statement; a loose visual needs a visualize
statement. These parts may also require properties or context in the consumer.
Conflicting revisions of one dependency, or conflicting declaration names, are
errors. Hyle currently has one physics declaration namespace per project.
Local .hyle files still share that project namespace and need no imports between
them. File-scoped modules and physics import aliases are not implemented yet.
Older use properties {Thermal}; imports remain readable against their existing
saved dependency IDs; new imports should use the explicit published coordinate.
Imports in a world recipe
Section titled “Imports in a world recipe”A construction file can import a published model directly, without duplicating the import in a physics file:
use model "@hyle/Ember#4" as Flame;place Flame at [0, 0, 0];The alias is local to the recipe. Local models can still be bound with
use models {Water, Wall as Barrier};. Geometry and world composition remain
separate: load "objects/tank.hyleobject" or load "rooms/room.hyleworld" loads
a supplied construction file; it is not a registry import.
Exact dependency closure
Section titled “Exact dependency closure”Studio resolves written imports before compilation, including guest projects. Saving stores the selected artifact IDs and revisions. Published dependencies retain their own immutable edges, so your source pins the entire transitive closure without a separate lockfile. Incompatible versions fail explicitly. The compiler only receives resolved bytes and publication metadata; it never fetches URLs or contacts the database.