Welcome to the source code of the Cobalt programming language!
There are a couple of different methods that you can use to install the Cobalt programming language to your machine.
Skip here to find methods for certain Linux distros.
This is the easiest method that will work on any platform.
- Go to the download page and select your OS and architecture and download the binaries.
- Place them wherever you'd like and add them to your PATH.
- You can now use the CLI tools that come with Cobalt.
We only recommend this method if you made changes to the source code and want to test it, but it is a valid method to install Cobalt.
To use this method, you first need to have Rust installed onto your machine, including Cargo.
- Clone this repository:
git clone --depth=1 https://github.com/cobalt-lang/cobalt-lang - Build the binaries and install them to your path:
cargo install --path .OR Build the binaries normally:cargo build --release - This step is only necessary if you built the binaries normally, you can either use them from the
/target/releasedirectory or put them in your PATH variable.
This method is another easy and official way to download the CLI tools. It only applies to certain Linux distros as of now, but we are always looking to expand.
The CLI tools are available on the AUR, maintained officially by us. You can install them with an AUR helper by doing: yay -S cobalt-lang or follow the steps below to do it manually.
- Clone the AUR repository:
git clone https://aur.archlinux.org/cobalt-lang.git - Look at the PKGBUILD file if you'd like to make sure it is secure.
- Make the package:
makepkg -si
- Constant folding and propagation. (goal for v0.11.0)
- Add floating point values (goal for v0.12.0)
- Add static types for variables (goal for v0.13.0)
- Add functions. (goal for v0.14.0)
- Add loops. (goal for v0.15.0)
- Try to do as little cloning as possible VM and parser do inefficient cloning.
- More descriptive and consistent errors (always room for that!)
- Positional errors (the error says what position in the file it's referring to)
- Use &str type wherever possible instead of String.
- Allow variable slots/IDs to be reused from a scope after it's popped in the generator.
- Standard library.
- Bytecode bytes to words translator (just a tool in the future, could maybe be written in Cobalt itself!)
- Catch more errors at the code generation stage.
- More optimizations such as copy propagation, strength reduction,