A static typed low-level compiled programming language inspired by Rust and C
📑 Documentation | 💾 Installation | 🤝 Contributing | 📜 License | 🔄 State
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.
More examples can be found in the examples directory
A list of all the features, that are already implemented or planned.
x86_64 linux
macro
and import
preprocessorstdlib
i8
i16
i32
i64
u8
u16
u32
u64
f32
f64
f80
bool
char
void
&
[]
'c[]
struct
union
enum
{}
(tuples)if
match
for
while
loop
ret
break
continue
noop
with
do-while
do-unless
defer
for
, while
, do-while
and loop
extern
functions and globalssizeof
typeof
alignof
len
__version__
__system__
__architecture__
__time__
__compile_type__
__main_file__
__file__
__line__
__func__
asm
code blocksc17
libc
-header implementationglfw
and OpenGL
/GLU
header filescURL
header implementationstdlib
based on linux syscalls (in progress)Please refer to INSTALL.md for installation instructions and information about compatability
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
For more examples, please refer to the
examples/
directory in this repository.
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:
(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 is found in the editors/ subdirectory.
Supported editors include:
Note For quick installation, use the
install.sh
script in the respective subdirectory.
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
CSpydr is licensed under the MIT License.
regex.csp
: https://github.com/kokke/tiny-regex-c.git