# using

Import a dotted package path

Last updated: 2026-09-09

Package: language | Status: stable

Tags: cpu, keyword, language, packages, yeho

Use using for a dependency you actually call and external only for the smallest intentional package API.

```yh
using
```


## Complete program

Import real packages and expose a helper with external. The export spelling is unavailable.

Verification: type checked

```yh
using dolphin.math
using dolphin.spatial3d

external DistanceToGoal(Vector3 position) -> float
{
    return DolphinDistance3(position, Vector3(3.0, 4.0, 0.0))
}
Console.Log(Text.From(DistanceToGoal(Vector3(0.0, 0.0, 0.0))))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.word__using"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/word--using/complete --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


external applies only to top-level type, function, extern, or compute declarations.

The old export spelling is rejected. Use external.

Source: yeho/parser_core.cpp run and parseTopLevelCallableOrStatement; conformance packages.using-external

AI training permission: https://demonhunterlabs.com/ai-use
