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: blog/2024-11-11-package.md
+21-26Lines changed: 21 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ authors: [vinzbarbuto]
5
5
tags: [packages, packaging, lingua franca, docs]
6
6
---
7
7
8
-
The Lingua Franca (LF) [Package Explorer](/docs/tools/code-extension#package-explorer) is a powerful feature within the Lingua Franca VS Code extension, built to streamline package management for developers. Supporting both local and remote sources, the Package Explorer enables effortless listing and management of packages—whether defined locally by developers or installed through the Lingo Package Manager. This integration aligns with the Lingua Franca community’s vision for a collaborative and reusable ecosystem. Developers can create and publish their own packages, enabling others to easily incorporate these resources into their projects. This collaborative model not only enhances programmability and accelerates product development but also simplifies the design of complex Lingua Franca applications.
8
+
The Lingua Franca (LF) [Package Explorer](/docs/tools/code-extension#package-explorer) is a new feature within the Lingua Franca Visual Studio Code extension, built to streamline package management for developers. Supporting both local and remote sources, the Package Explorer enables effortless listing and management of packages—whether defined locally by developers or installed through the Lingo Package Manager. This integration aligns with the Lingua Franca community’s vision for a collaborative and reusable ecosystem. Developers can create and publish their own packages, enabling others to easily incorporate these resources into their projects. This collaborative model not only enhances programmability and accelerates product development but also simplifies the design of complex Lingua Franca applications.
9
9
10
10
{/* truncate */}
11
11
@@ -17,18 +17,17 @@ In this guide, we’ll walk you through the essential steps to create and publis
17
17
2.[**Configuring the `Lingo.toml` File**](#configuring-the-lingotoml-file)
18
18
Set up the `Lingo.toml` configuration to ensure compatibility with the Lingo Package Manager, making your package easy to download and install.
19
19
20
-
3.[**Publishing to the Community Repository**](#publishing-to-the-community-repository)
21
-
Learn how to publish your package to the [Lingua Franca Community Package Repository](https://github.com/lf-pkgs) to share it with the broader community.
20
+
3.[**Publishing to your (public) repository**](#publishing-a-package)
21
+
Learn how to publish your package to share it with the broader community.
22
22
23
23
By the end of this guide, you'll have a fully configured, shareable package ready to distribute within the Lingua Franca ecosystem.
24
24
25
25
## Creating a New Package
26
26
You can create a new [LF package](/docs/glossary/#package) either manually by creating an [LF file](/docs/glossary/#lf-file) or by using the [Lingo Package Manager](https://github.com/lf-lang/lingo).
27
27
28
-
#### Option 1: Create a Project Using the Lingo Package Manager
28
+
#### Option 1: Create a Project Using the Lingo Package Manager (Recommended)
29
29
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.
30
-
2. Open the folder in VS Code.
31
-
3. Open the terminal in this folder and run the <kbd>lingo init</kbd> command.
30
+
2. Open the terminal in this folder and run the <kbd>lingo init</kbd> command.
32
31
33
32
This will set up a new LF package with the following structure:
34
33
@@ -58,7 +57,9 @@ If you manually create the `Lingo.toml` file, place it adjacent to the `src` fol
58
57
59
58
### Add `src/lib/` for Local Libraries
60
59
61
-
To include local libraries, create a `lib` directory within the `src/` folder and place your LF files there. These files contain reusable reactors that can be used within the same package or, if published, in other packages via the Lingo Package Manager. This setup makes it easy to manage and reuse libraries across Lingua Franca projects. The `lib` directory should be placed alongside the `src` directory, organized as follows:
60
+
To include local libraries in your Lingua Franca project, create a `lib` directory within the `src/` folder and place your LF files there. These files contain reusable reactors that can be used within the same package or, if published, in other packages via the Lingo Package Manager. The `src/lib` directory is the default location for Lingua Franca files your project exports, enabling other libraries to use them. This setup simplifies managing and reusing libraries across Lingua Franca projects.
61
+
62
+
The `lib` directory should be placed alongside the `src` directory, organized as follows:
62
63
63
64
```
64
65
├── .
@@ -114,28 +115,22 @@ platform = "Native"
114
115
115
116
The `Lingo.toml` can also include additional sections for dependencies and other purpose-specific configurations, however, these are optional and can be added as needed.
116
117
117
-
## Publishing to the Community Repository
118
-
119
-
Once you've created your package and configured the `Lingo.toml` file, you’re ready to publish it in the [Lingua Franca Packages](https://github.com/lf-pkgs) organization. Publishing your package here allows other developers to easily find, install, and use it in their projects.
120
-
121
-
To publish your package, follow these steps:
118
+
## Publishing a Package
122
119
123
-
1.**Push your package to your GitHub repository**
124
-
Uploading your package to GitHub lets you share it with others right away, even before it becomes part of the organization.
120
+
Publishing your package makes it accessible to other developers, enabling them to discover, install, and use it in their projects. Before publishing, ensure your package is complete and the `Lingo.toml` file is properly configured.
125
121
126
-
2.**Name your repository following the `<name>-<target>` scheme**
127
-
Use lowercase letters and hyphens in the format `<name>-<target>` (e.g., `package-python`). The `<name>` part should be descriptive and unique, while the `<target>` should be the target language for the package.
122
+
Follow these steps to publish your package:
128
123
129
-
3.**Include the name of the current maintainer in the repository description.**
130
-
This helps others know who to contact if they have questions or need assistance.
124
+
#### 1. Push Your Package to Your GitHub Repository
125
+
Upload your package to your own (public) GitHub repository. This allows you to share it immediately.
131
126
132
-
3.**Request membership in the Lingua Franca Packages organization**
133
-
To join the organization, reach out to the Lingua Franca Packages [owners](https://github.com/orgs/lf-pkgs/people) with a brief overview of your package. This message should include:
134
-
-**Motivations**: Describe why you created the package and what problems it solves.
135
-
-**Usage**: Outline how others can use the package, highlighting key features or functionalities.
136
-
-**Relevant Links**: Include a link to the repository (essential) along with any other resources, such as documentation, demos, or example projects that showcase the package in action.
127
+
#### 2. Follow the `<name>-<target>` Naming Scheme
128
+
Name your repository using the format `<name>-<target>`. For example, `package-python`.
129
+
- Use lowercase letters and hyphens.
130
+
- Ensure `<name>` is descriptive and unique.
131
+
- Specify `<target>`as the package's target language.
137
132
138
-
This information will help the organization understand the value of your package and how it contributes to the Lingua Franca community.
133
+
#### 3. Add the Maintainer's Name to the Repository Description
134
+
This helps others know who to contact for questions or assistance.
139
135
140
-
4.**Transfer your repository to the Lingua Franca Packages organization**
141
-
Once you're a member, transfer your repository to the organization to make it available to the broader community.
136
+
By following these steps, you ensure your package is properly organized and ready for community use.
0 commit comments