Skip to content

Linux related #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions packages/documentation/copy/en/developer/Getting_Started_Linux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
title: Getting started on Linux
layout: docs
permalink: /docs/handbook/getting-started-linux
oneline: "Quick start with Lingua Franca on Linux"
preamble: >
---

# Getting started on Linux

## Installation

### Debian & Other

Sadly there are currently no packaged version of the lingua-franca compiler in debian distributions so there is
really only the manual way. But we offer prebuild binaries [here](https://github.com/lf-lang/lingua-franca/releases).
Please note that you need a modern version of java 17 or greater.

If you want to compile the lingua-franca compiler from scratch there is a [guide](/docs/handbook/download) for that.
Alternatively you can use the prebuild lfc.

**Short instructions for downloading lfc**
```bash
wget https://github.com/lf-lang/lingua-franca/releases/download/v0.2.0/lfc_0.2.0.tar.gz
tar xf lfc_0.2.0.tar.gz
export PATH="$(pwd)/lfc_0.2.0/bin/":$PATH // maybe add that to you bashrc/zshrc aliases
lfc ./src/yourproject.lf
```

### Arch

There are packaged version of [lfc](https://aur.archlinux.org/packages/lfc-bin) and [epoch](https://aur.archlinux.org/packages/epoch-bin) the arch user repository.

```bash
yay -S lfc-bin
```

Alternatively you can install it by hand.

```bash
git clone https://aur.archlinux.org/packages/lfc-bin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for manually downloading and building the package instead of using an AUR helper like yay?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There shouldn't be :-) We should write some distro-specific instructions for cases where installation can be done with a simple one-liner.

cd lfc-bin
makepkg -si
```

### Nixos

For nixos users there is a already a package since the **nixos-22.05** release. Lingua-franca develops quite rapidly so the version packaged for nixpkgs may lack behind.

```
nix-shell -p lingua-franca
lfc ./src/youproject.lf
```

If you want to use the cpp-target and are using nix there is already great tooling built for this [here](https://github.com/lf-lang/reactor-cpp/blob/master/CONTRIBUTING.md).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The above presumably not include LF.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the commands above show how you temporarily install lfc into your shell environment.

## Development

### Vim

There is an simple Vim syntax highlighting [plugin](https://github.com/lf-lang/lingua-franca.vim).
This vim plugin can also be found inside the nixpkgs (`vimPlugins.lingua-franca-vim`).

### Integrated Development Environments

Lingua-Franca has integration's into two big ides [epoch](/docs/handbook/epoch-ide)(modified version of eclipse) or a [vs-code plugin](/docs/handbook/code-extension).