Skip to content

Commit ed2eb08

Browse files
committed
Improved documentation; Added Glossary page
1 parent 5b63b67 commit ed2eb08

File tree

3 files changed

+60
-32
lines changed

3 files changed

+60
-32
lines changed

docs/glossary/glossary.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Glossary
3+
description: Glossary of terms used in the Lingua Franca documentation.
4+
---
5+
6+
# Glossary
7+
8+
Glossary of terms used in the Lingua Franca (LF) documentation.
9+
10+
### LF File
11+
A source file with the `.lf` extension, representing a Lingua Franca (LF) program.
12+
13+
### Package
14+
A collection of LF source files and directories, along with a `Lingo.toml` manifest file that defines the package configuration. Every package must include an `src/` directory containing the LF source files.
15+
The **package root** is the top-level directory where both the `Lingo.toml` file and the `src/` directory reside, serving as the main directory for the package.
16+
17+
### Project
18+
Another term for a [package](#package).
19+
20+
### Library File
21+
An LF file containing one or more reactors intended for reuse, designed to be imported into multiple LF files.
22+
23+
### Package Manager
24+
A software tool that automates the installation, configuration, and management of packages. In the LF ecosystem, the `lingo` package manager is used to manage LF packages and dependencies.

docs/sidebars.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ const sidebars: SidebarsConfig = {
237237
"id": "developer/website-development"
238238
}
239239
]
240+
},
241+
{
242+
"type": "doc",
243+
"id": "glossary/glossary"
240244
}
241245
]
242246
};

docs/tools/code-extension.mdx

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,23 @@ The Lingua Franca extension for Visual Studio Code (VS Code) provides syntax-dir
1414

1515
### Creating a New Package
1616

17-
You can create a new LF package either manually by creating an LF file or by using the [Lingo Package Manager](https://github.com/lf-lang/lingo).
17+
You can create a new LF [package](../glossary/glossary.mdx#package) either manually by creating an LF file or by using the [Lingo Package Manager](https://github.com/lf-lang/lingo).
1818

19-
#### Option 1: Manually Create an LF File
19+
#### Option 1: Create an LF Package Using the Lingo Package Manager
20+
1. After [installing the Lingo Package Manager](https://www.lf-lang.org/docs/installation#lingo), create an empty directory with the desired name for your LF package.
21+
2. Open the folder in VS Code.
22+
3. Open the terminal in this folder and run the <kbd>lingo init</kbd> command.
23+
24+
This will set up a new LF package with the following structure:
25+
26+
```
27+
├── .
28+
│ ├── src/
29+
│ │ └── Main.lf
30+
└── └── Lingo.toml # Configuration file for current package
31+
```
32+
33+
#### Option 2: Manually Create an [LF File](../glossary/glossary.mdx#lf-file)
2034
1. Go to <kbd>File > New File...</kbd> and select `New Lingua Franca File`.
2135
2. Save the file in a directory called `src` to ensure that generated code is placed in a parallel `src-gen` directory. For example, if your file is called `Foo.lf`, the directory structure after building will look like this:
2236

@@ -33,20 +47,6 @@ You can create a new LF package either manually by creating an LF file or by usi
3347

3448
If you manually create the `Lingo.toml` file, place it adjacent to the `src` folder in the root directory of the package. This file serves as a configuration for the package, allowing you to specify the package name, version, and other metadata, including any dependencies you want to install.
3549

36-
#### Option 2: Create an LF Package Using the Lingo Package Manager
37-
1. After installing and configuring the Lingo Package Manager, create an empty folder with the desired name for the LF package.
38-
2. Open the folder in VS Code.
39-
3. Open the terminal in this folder and run the <kbd>lingo init</kbd> command.
40-
41-
This will set up a new LF package with the following structure:
42-
43-
```
44-
├── .
45-
│ ├── src/
46-
│ │ └── Main.lf
47-
└── └── Lingo.toml # Configuration file for current package
48-
```
49-
5050
### Opening an Existing LF package
5151

5252
To open an existing LF package in VS Code, select the root directory of your Lingua Franca package as your workspace.
@@ -58,7 +58,7 @@ The correct structure of the LF package should look like this:
5858
│ ├── bin/
5959
│ ├── build/ # directory containing packages installed by Lingo Package Manager
6060
│ │ ├── lfc_include/ # Directory for storing reusable reactors
61-
│ │ └── └── installed_library/
61+
│ │ └── └── installed_package/
6262
│ ├── include/
6363
│ ├── src/
6464
│ │ ├── lib/ # Directory for storing reusable reactors
@@ -96,30 +96,30 @@ The **Lingua Franca Package Explorer** can be accessed by clicking on the **LF i
9696
└── └── Source Files
9797
```
9898

99-
- [**Installed Packages**](#installed-packages): Lists libraries installed via the Lingo Package Manager, located in the `./build/lfc_include` directory (if any).
99+
- [**Installed Packages**](#installed-packages): Lists packages installed via the Lingo Package Manager, located in the `./build/lfc_include` directory (if any).
100100

101-
- [**Local Libraries**](#local-libraries): Displays locally defined libraries (e.g., reusable reactors), located in the `./src/lib` directory.
101+
- [**Local Libraries**](#local-libraries): Displays locally defined [library files](../glossary/glossary.mdx#library-file) (e.g., reusable reactors), located in the `./src/lib` directory.
102102

103103
- [**Source Files**](#source-files): Contains the LF source files created by the developer, located in the `./src/` directory.
104104

105105
The **Source Files** section is always present as it reflects the main LF files in the package. However, the **Installed Packages** and **Local Libraries** sections appear only if the respective directories and files exist in the workspace.
106106

107-
Hovering over the **LF Package** item reveals a terminal icon. Clicking this icon opens a terminal window at the package's root directory, allowing you to execute commands directly within that directory.
107+
Hovering over the **\<Package Name\>** item reveals a terminal icon. Clicking this icon opens a terminal window at the package's root directory, allowing you to execute commands directly within that directory.
108108

109109
#### Installed Packages
110110

111-
The **Installed Packages** section lists libraries installed using the [Lingo Package Manager](https://github.com/lf-lang/lingo). Developers can use the Lingo Package Manager to retrieve and install LF programs from repositories such as the [Lingua Franca Community Organization](https://github.com/LF-Community).
111+
The **Installed Packages** section lists packages installed using the [Lingo Package Manager](https://github.com/lf-lang/lingo). Developers can use the Lingo Package Manager to retrieve and install LF programs from repositories such as the [Lingua Franca Community Organization](https://github.com/LF-Community).
112112

113-
To install libraries:
114-
1. Configure the `Lingo.toml` file with the desired libraries.
113+
To install packages:
114+
1. Configure the `Lingo.toml` file with the desired package.
115115
2. Run <kbd>lingo build</kbd> in the terminal from the current directory to download the specified dependencies.
116116

117-
Once the libraries are installed, they will appear in the `./build/lfc_include/` directory. The **Installed Packages** section will then be structured as follows:
117+
Once the packages are installed, they will appear in the `./build/lfc_include/` directory. The **Installed Packages** section will then be structured as follows:
118118

119119
```
120-
├── LF Package
120+
├── <Package Name>
121121
│ ├── Installed Packages
122-
│ │ ├── installed_library/
122+
│ │ ├── installed_package/
123123
│ │ │ ├── File_1.lf
124124
│ │ │ │ ├── Rusable_Reactor_1.lf
125125
│ │ │ │ ├── Rusable_Reactor_2.lf
@@ -130,17 +130,17 @@ Once the libraries are installed, they will appear in the `./build/lfc_include/`
130130
```
131131

132132
In this structure:
133-
- **LF Package**: Represents the root folder of the main package.
134-
- **installed_library**: Represents each library listed in `Lingo.toml`, which contains one or more LF programs featuring reusable reactors.
133+
- **\<Package Name\>**: Represents the root folder of the main package.
134+
- **installed_package**: Represents each package listed in `Lingo.toml`, which contains one or more LF projects featuring reusable reactors.
135135

136-
The image below shows a visual representation of the **Installed Packages** section. The **project** icon indicates the LF Package folder (e.g., `AudioClassification`), while the **root-folder** icon represents the downloaded libraries (e.g., the `edgeai` library in the example). The **code file** icon denotes an LF program within a library, and the **bracket** icon represents individual reactors inside the LF program.
136+
The image below shows a visual representation of the **Installed Packages** section. The **project** icon indicates the LF Package folder (e.g., `AudioClassification`), while the **root-folder** icon represents the downloaded package (e.g., the `edgeai` package in the example). The **code file** icon denotes an LF program within a package, and the **bracket** icon represents individual reactors inside the LF program.
137137

138138
<Image img={lingo_packages} style={{maxWidth: 400}} />
139139

140140
The hierarchy categorizes tree items into the following types:
141141

142-
1. **`library-root`**: Refers to the root folder of each downloaded library.
143-
2. **`file`**: Represents an LF program within the library.
142+
1. **`package-root`**: Refers to the root folder of each downloaded package.
143+
2. **`file`**: Represents an LF program within the package.
144144
3. **`reactor`**: Refers to individual reactors within the LF program.
145145

146146
When focusing on the **Installed Packages** section, an `edit` command becomes available. Clicking it opens the `Lingo.toml` file in the editor for configuration changes. The following actions are available for items in the **Installed Packages** section:
@@ -206,7 +206,7 @@ The **Source Files** section lists all LF programs in the `./src/` directory. Th
206206
```
207207
├── <Package Name>
208208
...
209-
│ ├── Local Libraries
209+
│ ├── Source Files
210210
│ │ ├── File_1.lf
211211
│ │ ├── File_2.lf
212212
│ │ ├── File_3.lf

0 commit comments

Comments
 (0)