Skip to content
An experimental compiler for IoT applications
TypeScript C Other
Branch: dev
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
bin
compiler
debian
dev/hooks
rpm
src
test
.editorconfig
.gitignore
.npmignore
.travis.yml
API.md
CONTRIBUTING.md
LICENSE.md
Makefile
README.md
npm-shrinkwrap.json
package.json
tsconfig.json

README.md

Fyr

Build Status deb package rpm package npm package Greenkeeper badge

Fyr is a modern systems programming language that combines the versatility of C with the ease and safety of application programming languages like Java, Go or TypeScript. Like C/C++, Fyr can be used for low-level hardware-oriented programming and high-level application programming. In contrast to C, the Fyr compiler guarantees memory safety and thread safety at compilation time.

Fyr is designed to implement all tiers of distributed IoT applications, i.e. embedded devices, server-side code and the Web UI. Furthermore, it can be combined with existing C and JavaScript code.

It is currently in early stages of development, so some features are not yet implemented and others could be removed in the future.

Installation

The compiler currently only supports UNIX-like systems, Windows support is planned for a future release.
We provide deb and rpm packages hosted on packagecloud. An npm package is available in the standard npm registry. Additionally, we maintain a Homebrew Tap containing the fyrlang formula. See the home page for more information.

From Source

Simply clone this repository and run npm install && npm run build. Working node, npm, and gcc executables are required, everything else will be installed by npm.
The fyrc executable can be found in bin/.

The install script also registers a git hook that will automatically rebuild the compiler after git pulls if necessary.

Usage

The package comes with the fyrc binary, which can be used to compile Fyr code into C or binary executables.
A simple hello_world.fyr looks like this:

export func main() int {
    println("Hello World")
    return 0
}

It can be compiled with fyrc -n hello_world.fyr. The generated executable is hello_world and yields Hello World when run.

More examples can be found in the src/ folder of this repository.

Tools

We provide a plugin for Visual Studio Code that supports code highlighting. Integration of a language server is currently in progress but depends on some functionality of the compiler that is not yet fully implemented.

You can’t perform that action at this time.