Home

Awesome

<div align="center"> <p> <img width="200" src="./assets/csp-logo-big.svg"></img> </p> <h1>The CSpydr Programming Language</h1>

📑 Documentation | 💾 Installation | 🤝 Contributing | 📜 License | 🔄 State

License Issues GitHub pull requests Platform Stars Forks GitHub repo size Lines of code

</div>

CSpydr is a low-level, static typed, free and open-source, compiled programming language inspired by Rust and C. This repository contains cspc (the CSpydr Programming Language Compiler), as well as CSpydr's Standard Library, a code-linting utility, some code examples and unit tests.

Code Examples

<details> <summary><b>Hello World</b></summary>

helloworld.csp

</details> <details> <summary><b>Fibonacci</b></summary>

fibonacci.csp

</details> <details> <summary><b>Lambda Functions</b></summary>

lambda.csp

</details> <details> <summary><b>Read File</b></summary>

read_file.csp

</details> <details> <summary><b>Random Number Generator</b></summary>

random.csp

</details> <details> <summary><b>Time & Timer API</b></summary>

time.csp

</details>

More examples can be found in the examples directory

Current State

A list of all the features, that are already implemented or planned.

cspc Compiler features:
CSpydr Language features:
CSpydr Standard library features

Installation

Please refer to INSTALL.md for installation instructions and information about compatability

Hello, World!

A simple hello-world program:

import "io.csp";

fn main(): i32
{
    std::io::puts("Hello, World!");
    <- 0;
}

Running this program is as easy as entering the following command:

$ cspc run hello-world.csp

Examples

For more examples, please refer to the examples/ directory in this repository.

Usage

To compile a CSpydr program use the following command:

$ cspc build <your file>

To directly run a program use this command:

$ cspc run <your file>

To launch a special debug shell, start your program using the debug action: <br/> (not finished yet!)

$ cspc debug <your file>

Get help using this command:

$ cspc --help

(I will write a proper documentation in the future!)

Editor support

Editor support is found in the editors/ subdirectory.

Supported editors include:

Note For quick installation, use the install.sh script in the respective subdirectory.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update the unit tests as appropriate.

View CONTRIBUTING.md for more information

License

CSpydr is licensed under the MIT License.

Resources | Reference | Inspiration