8000 GitHub - kitlang-dev/kitc: Experimental Rust reimplementation of the Kit compiler (https://github.com/kitlang/kit)
[go: up one dir, main page]

Skip to content

kitlang-dev/kitc

kitlang-rs

Important

Status: Early-stage, actively developed

See ROADMAP.md for planned work and contribution ideas.

kitlang-rs is an early-stage, experimental Rust reimplementation of the Kit compiler1, aiming to make the Kit programming language easier to contribute to and extend.

We have a website at https://www.kitlang.dev2.

Motivation

While the original Kit compiler is written in Haskell, this project was initiated to create a Rust-based alternative. The reasons for not contributing to the original Kit compiler are:

  • I'm not very familiar with Haskell, making it hard to understand and contribute to the existing codebase
  • The purely functional nature of Haskell, which makes it difficult to translate concepts to a multi-paradigm language like Rust
  • A rewrite from scratch offers more flexibility, potentially faster iteration, and freedom in compiler design choices

Quick Start

Here's a simple "Hello World!" example in Kit:

include "stdio.h";

function main() {
    var s: CString = "Hello from Kit!";
    printf("%s\n", s);
}

To compile and run this, save it as hello.kit and then execute:

cargo run --bin kitc compile hello.kit
./hello

Expected output:

Hello from Kit!

Contributing

We warmly welcome contributions!

We have contribution guidelines in CONTRIBUTING.md and a detailed roadmap at ROADMAP.md.

Notable links:

Licensing

kitlang-rs is dual-licensed under the Apache License, Version 2.0 and the MIT License, either at your option.

DISCLAIMER: This project is entirely independent of the original Kit compiler and is not affiliated with the original developers.

Footnotes

  1. If you want to be more pedantic, the more correct wording is transpiler as it outputs C source code, not machine code.

  2. The site is a clone of https://github.com/kitlang/kitlang.github.io, as the original site is down. See issue #157 upstream.

About

Experimental Rust reimplementation of the Kit compiler (https://github.com/kitlang/kit)

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0