You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/glossary/glossary.mdx
+37-5Lines changed: 37 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -10,17 +10,49 @@ Glossary of terms used in the Lingua Franca (LF) documentation.
10
10
### LF File
11
11
A source file with the `.lf` extension, representing a Lingua Franca (LF) program.
12
12
13
+
### Library File
14
+
An LF file containing one or more reactors intended for reuse, designed to be imported into other LF files.
15
+
13
16
### Package
14
17
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
18
19
+
### Package Manager
20
+
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.
21
+
16
22
### Package Root
17
23
The **package root** is the top-level directory of a package where both the `Lingo.toml` file and the `src/` directory reside.
18
24
19
25
### Project
20
26
Another term for a [package](#package) that is under development. Each [LF file](#lf-file) is assumed to reside in a package, meaning it is located somewhere in the file system in a directory called `src`, in some directory that serves as the (package root)[#package-root].
21
27
22
-
### Library File
23
-
An LF file containing one or more reactors intended for reuse, designed to be imported into other LF files.
24
-
25
-
### Package Manager
26
-
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.
28
+
### Project Structure
29
+
The structure of an LF project should follow the directory layout below:
30
+
31
+
```
32
+
├── .
33
+
│ ├── bin/ # Directory for storing generated code
34
+
│ ├── build/ # Directory containing packages installed by the Lingo Package Manager
35
+
│ │ ├── lfc_include/ # Directory for storing reusable reactors
└── └── Lingo.toml # Configuration file for Lingo Package Manager
44
+
```
45
+
46
+
-**Mandatory Directories and Files:**
47
+
-`src/`: This folder must contain at least one `.lf` source file.
48
+
-`Lingo.toml`: This is the required configuration file.
49
+
50
+
-**Automatically Generated Directories:**
51
+
-`bin/`: This directory is created during the build process of source files. It is used to store generated code.
52
+
-`build/`: This folder is automatically generated when installing packages managed by the Lingo Package Manager.
53
+
-`include/`: This directory is autogenerated for header files.
54
+
55
+
-**User-Created Directory:**
56
+
-`src/lib/`: This folder is for library files and should be created by the user as necessary.
57
+
58
+
This directory structure is essential for enabling the Package Explorer feature in the [VS Code Extension](tools/code-extension.mdx#package-explorer), streamlining project management and development processes.
Copy file name to clipboardExpand all lines: docs/tools/code-extension.mdx
+13-32Lines changed: 13 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ The Lingua Franca extension for Visual Studio Code (VS Code) provides syntax-dir
16
16
17
17
You can create a new LF [project](../glossary/glossary.mdx#project) either manually by creating an LF file or by using the [Lingo Package Manager](https://github.com/lf-lang/lingo).
18
18
19
-
#### Option 1: Create an Project Using the Lingo Package Manager
19
+
#### Option 1: Create a Project Using the Lingo Package Manager
20
20
1. After [installing the Lingo Package Manager](https://www.lf-lang.org/docs/installation#lingo), create an empty directory to serve as the root of your new package.
21
21
2. Open the folder in VS Code.
22
22
3. Open the terminal in this folder and run the <kbd>lingo init</kbd> command.
@@ -30,7 +30,7 @@ This will set up a new LF package with the following structure:
30
30
└── └── Lingo.toml # Configuration file for current package
31
31
```
32
32
33
-
#### Option 2: Create a new[LF File](../glossary/glossary.mdx#lf-file)
33
+
#### Option 2: Create a New[LF File](../glossary/glossary.mdx#lf-file)
34
34
1. Go to <kbd>File > New File...</kbd> and select `New Lingua Franca File`.
35
35
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:
36
36
@@ -47,28 +47,9 @@ This will set up a new LF package with the following structure:
47
47
48
48
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.
49
49
50
-
### Opening an Existing LF project
50
+
### Opening an Existing LF Project
51
51
52
-
To open an existing LF project in VS Code, select the [package root](../glossary/glossary.mdx#package-root) as your workspace.
53
-
54
-
The correct structure of the LF package should look like this:
└── └── Lingo.toml # Configuration file for Lingo Package Manager
69
-
```
70
-
71
-
To enable the [Package Explorer](#package-explorer), the workspace of your VS Code editor must be the root of a Lingua Franca package. If the workspace is not recognized as a valid Lingua Franca package, an error message will appear when opening the Package Explorer:
52
+
To open an existing LF project in VS Code, select the [package root](../glossary/glossary.mdx#package-root) as your workspace. Ensure that the selected project adheres to the correct [project structure](../glossary/glossary.mdx#project-structure) to enable the [Package Explorer](#package-explorer). If the workspace is not recognized as a valid Lingua Franca package, an error message will appear when you attempt to open the Package Explorer:
@@ -119,7 +100,7 @@ Once the packages are installed, they will appear in the `./build/lfc_include/`
119
100
```
120
101
├── <Package Name>
121
102
│ ├── Installed Packages
122
-
│ │ ├── installed_package/
103
+
│ │ ├── <Installed Package>
123
104
│ │ │ ├── File_1.lf
124
105
│ │ │ │ ├── Rusable_Reactor_1.lf
125
106
│ │ │ │ ├── Rusable_Reactor_2.lf
@@ -131,17 +112,17 @@ Once the packages are installed, they will appear in the `./build/lfc_include/`
131
112
132
113
In this structure:
133
114
-**\<Package Name\>**: Represents the root folder of the main package.
134
-
-**<InstalledPackage>**: Represents each package listed in `Lingo.toml`, which contains one or more LF projects featuring reusable reactors.
115
+
-**\<Installed Package\>**: Represents each package listed in `Lingo.toml`, which contains one or more LF projects featuring reusable reactors.
135
116
136
117
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.
The hierarchy categorizes tree items into the following types:
141
122
142
-
1.**`package-root`**: Refers to the root folder of each downloaded package.
143
-
2.**`file`**: Represents an LF program within the package.
144
-
3.**`reactor`**: Refers to individual reactors within the LF program.
123
+
1.**package-root**: Refers to the root folder of each downloaded package.
124
+
2.**file**: Represents an LF file within the package.
125
+
3.**reactor**: Refers to individual reactors within the LF file.
145
126
146
127
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:
147
128
@@ -170,8 +151,8 @@ The **Local Libraries** section lists LF programs created by the developer, loca
170
151
│ │ │ ├── Rusable_Reactor_1.lf
171
152
│ │ │ ├── Rusable_Reactor_2.lf
172
153
│ │ ├── File_2.lf
173
-
│ │ │ │ ├── Rusable_Reactor_1.lf
174
-
│ │ │ │ ├── Rusable_Reactor_2.lf
154
+
│ │ │ ├── Rusable_Reactor_1.lf
155
+
│ │ │ ├── Rusable_Reactor_2.lf
175
156
...
176
157
```
177
158
@@ -181,8 +162,8 @@ The image below illustrates the **Local Libraries** section. In this depiction,
181
162
182
163
The hierarchy categorizes tree items into two types:
183
164
184
-
1.**`file`**: Represents the LF program.
185
-
2.**`reactor`**: Represents a reactor within the LF program.
165
+
1.**file**: Represents the LF file.
166
+
2.**reactor**: Represents a reactor within the LF file.
186
167
187
168
Actions for **Local Libraries** are similar to those in the [**Installed Packages**](#installed-packages) section:
0 commit comments