An experimental statically typed systems programming language designed to be a goofy cousin to C++.
<a href="https://atlas77-lang.github.io/atlas77-docs/docs/latest/index.html"><strong>Explore the docs »</strong></a>
<a href="https://atlas77-lang.github.io/atlas77-docs/playground.html">Playground</a>
·
<a href="https://github.com/atlas77-lang/Atlas77/issues/new?labels=bug&template=bug-report---.md">Report Bug</a>
·
<a href="https://github.com/atlas77-lang/Atlas77/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
Atlas77 is an experimental statically typed wannabe systems language designed around a small core and everything else be userland. It compiles to C code, which is then compiled to machine code either using an external C compiler of your own (GCC/Clang/MSVC/...) or by using the embedded TinyCC compiler.
[!Note] A cranelift/LLVM backend is planned for the future, but for now, I'll keep focusing on the C backend as it is easier for me.
The 2 core philosophies are simple: - Keep the core language tiny, make everything else userland. - Safety opt-in: you pay for what you use.
[!Note] If you find the code to be messy, it's because it kinda is. I am sort of "speedrunning" the bootstrapping of the language, so the Rust implementation is not really the main focus right now.
sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shOr directly from their website: Rust
sh
cargo install atlas_77[!Note] I recommend you to build it yourself, as the version on Cargo is not up to date at all. The cargo version is lacking behind regarding bug fixes.
sh
atlas_77 --helpimport "std/io"
fun main() {
println("Hello, World!");
}
import "std/io";
fun fib(n: int64) -> int64 {
if n <= 1 {
return n;
}
return fib(n - 1) + fib(n - 2);
}
fun main() {
let n: int64 = 10;
print(fib(n));
}
For more examples, see the examples folder
There never was any official v0.1 or v0.2 releases, they were just internal milestones.
Deprecated, if you want to know more about the v0.3.x, check the releases page.
Deprecated, if you want to know more about the v0.4, check the releases page.
[!Warning] This version no longer compiles for some reason, so the source code is still accessible, but you can't build it.
The v0.5 was a complete rewrite of Atlas77, but because of some major design issues in syntax, semantic, memory management, compiler and everything it didn't get any more updates after the v0.5.2 (which is still accessible).
Deprecated, if you want to know more about the v0.5.x, check the releases page.
The v0.6.x series was a redesign of Atlas77 using everything that worked in the v0.5, but making it better and more consistent. It introduced a lot of new features and improvements, including, but not limited to: - Generics for functions and structs (not for struct methods yet) - Multi file projects that works similarly to this semantically (yes it's bad, but it will be fixed in later versions):
```c
ifndef MYMODULE_ATLAS77
define MYMODULE_ATLAS77
endif
`` - **Unions** to allow for more flexible data structures - **Enums**, only the C-like enums are supported for now - Static access to struct methods (no static fields yet) - **References** with&and dereferencing with*NB: They are kinda broken in this version, it's fixed in v0.7.x - Improved standard library with more modules and functions - Many bug fixes and performance improvements - Introducing ofstd::copyable` constraints for generics to allow only copyable types It's only there for the groundwork of move/copy semantics in v0.7.xDeprecated, if you want to know more about the v0.6.x, check the releases page.
This version will focus on correctness, fix
_copy constructor semanticsmemcpy<T>(&T) -> T for explicit shallow copiesThis version was another rewrite, though partial in this case. It introduced and removed some features, and stabilized the language design by a lot. Here are the key features and changes:
new(), default(), with_capacity(), etc...). #[c_name("foo")] attributes has been added to the compiler to let you have extern function/struct/union names properly generated in the C output despite being in a namespace or having been renamed in atlas77 for convenience or clarity.NB: TinyCC isn't stable yet on all platforms, so for now, I recommend you to use your own C compiler, but in the future, I'll try to make it work on all platforms.
atlas.toml configuration file has been added. It lets you tell the compiler which object files to link against, which header to find and build against. A small, somewhat working package command has also been added to let you generate a .atlas file from a C header so you can quickly setup a wrapper. It also isolates the header and mangle the names with a custom namespace (It also generates a atlas77-your_header.h & atlas77-your_header.c to properly separate them). e.g.: for raylib, every C function/types will start with raylib_ and they will be generated into the raylib namespace in atlas77.std::trivially_copyable by default, meaning they will get bitwise copied upon assignment or when passed to a function. Types with a custom destructor are not considered std::trivially_copyable, meaning they can't be passed to another variable/function/struct by value, unless you take(), .copy() or move() them.NB: There are still issues with auto clean up of scopes in some edge cases, but for the most part, it works as intended.
let x = MyStruct { ... }; or let arr = [1, 2, 3];. The language will automatically call the destructor of the object/array when it goes out of scope, so you don't have to worry about memory leaks in this case.sizeof<T>(), alignof<T>(), move(T). A lot more to come.type_of<T>() and type_id<T>(). It's relatively crude and most probably innefficient as of writing this, but at least it exists. A small core::type_info type has been added so you can manipulate and checks a bit the information of a type.As the language is still in alpha (not 1.0 yet), I won't make "alpha"/"beta" build, it doesn't really make sense.
The beta phase (before v1.0.0) will focus on stabilizing the language. All features will be finalized, tested extensively, and optimized for real-world use. This phase will serve as a release candidate.
See the open issues for a full list of proposed features (and known issues).
I am making this language for myself, to learn more about programming languages, compilers, VMs and all that stuff.
I'll try to make it easy to use, but still a bit "cringey". I hope I can at least hit one of the long-term goals.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)Made with contrib.rocks.
Here is a list of repositories that helped me a lot while making Atlas77:
I either used them as inspiration, reference or learning material.
Distributed under the MIT License. See LICENSE-MIT.md for more information.
Your Name - @Gipson62_ - J.H.Gipson62@gmail.com
Project Link: https://github.com/atlas77-lang/Atlas77
$ claude mcp add atlas77 \
-- python -m otcore.mcp_server <graph>