Skip to content

Jet4You/Jet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jet Lang 🚀

Project development Current Status

A prototype implementation of the Jet language.

Note
This project is in a very early stage of the development.

The project works only on Windows at the moment, because I decided to play with C++20 modules and try to get the most out of it. We use CMake as our build tool.

What is Jet

A C-like, general-purpose programming language that compiles to a native code (through LLVM IR).

Goals:

  • Rust-like syntax
  • C++-like feature set (and more)
  • Optional garbage collection with no performance compromises
  • Extremely fast compile times based on a modular design
  • Prototype fast, improve with no limits
  • Simplicity is a priority
  • Possibility to run in a VM

To read more about the language, see the docs.

Hello world code

fn main {
  println("Hello, {} from Jet!", "World");
}

See more examples here.

Folder structure

The repository is divided into several main and component projects. They are organized in the Projects folder.

Some of the main projects are:

  • Compiler App (jetc) - a frontend of the Compiler library,
  • Compiler - the base library for compiler implementation. producing an executable.
  • Core - a common library providing basic language-related code that is shared among the other main projects.
  • Parser - provides the grammar and generates AST for the language.

For a more detailed description of the projects, refer to the Projects directory.

Usage

Download the latest release (if available) and run the following command:

jetc main

This command compiles a file module called main.jet. If you didn't create one yet follow the next steps.

Basic application

Create a file named main.jet with the following content:

fn main {
  println("Hello, {}!", "World");
}

Now run the command mentioned above. The compiler should create a new executable called main.exe. Run the program with:

.\main.exe

License

The project is licensed under the Apache 2.0 license. See the LICENSE file for details.

Project created by Paweł Syska.

About

A new implementation of the Jet language using C++20 modules.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors