Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #179 from SleepingShell/master
Browse files Browse the repository at this point in the history
importing across modules
  • Loading branch information
signorecello authored Jun 5, 2023
2 parents 57fd2c5 + 887ff7c commit c82d496
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/modules_packages_crates/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ crate
```

### Importing a module throughout the tree
All modules are accessible from the ``crate::`` namespace.

```
crate
├── bar
├── foo
└── main
```
In the above snippet, if ``bar`` would like to use functions in ``foo``, it can do so by ``use crate::foo::function_name``.

### Sub-modules

Filename : `src/main.nr`
Expand Down
12 changes: 12 additions & 0 deletions versioned_docs/version-0.5.1/modules_packages_crates/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ crate
```

### Importing a module throughout the tree
All modules are accessible from the ``crate::`` namespace.

```
crate
├── bar
├── foo
└── main
```
In the above snippet, if ``bar`` would like to use functions in ``foo``, it can do so by ``use crate::foo::function_name``.

### Sub-modules

Filename : `src/main.nr`
Expand Down

0 comments on commit c82d496

Please sign in to comment.