nature  by nature-lang

Open-source programming language and compiler

created 5 years ago
2,022 stars

Top 22.4% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

The Nature Programming Language is a general-purpose, compiled language aiming for a concise and reliable development experience, particularly for cross-platform software. It targets developers seeking an alternative to Go with enhanced expressiveness, a richer type system, and more control over memory management and concurrency.

How It Works

Nature compiles directly to native machine code without LLVM or a VM, leveraging a pure C implementation for its runtime and compiler. It emphasizes static linking with musl libc for simple deployment and cross-platform compatibility. Key features include a comprehensive type system (generics, unions, interfaces, null-safety), a high-performance GC with short stop-the-world pauses, and efficient shared-stack concurrency. It integrates libuv for I/O and allows direct C standard library calls.

Quick Start & Requirements

  • Install: Download and extract the installer, move to /usr/local/, and add /usr/local/nature/bin to your PATH. Alternatively, set the NATURE_ROOT environment variable.
  • Verify: Run nature -v.
  • Compile & Run: nature build main.n && ./main
  • Prerequisites: None explicitly stated beyond standard OS tools for compilation.
  • Docs: Quick Start, Syntax, Playground

Highlighted Details

  • No LLVM or VM dependency, compiles directly to machine code.
  • Purely static linking with musl libc for dependency-free binaries.
  • High-performance GC with short STW pauses and shared-stack concurrency.
  • Built-in libuv for I/O event loops.

Maintenance & Community

The project is usable with stable syntax APIs before v1.0, though minor syntax changes may occur. Major upcoming work includes standard library refinement, user feedback, validation, and bug fixing. Community links are not provided in the README.

Licensing & Compatibility

The compiler frontend, backend, and runtime are licensed under Apache License 2.0. Nature source files and standard libraries use the MIT license. This is generally permissive for commercial use and closed-source linking.

Limitations & Caveats

Cross-compilation to Darwin platforms is currently blocked due to a missing macho linker. While usable, the language has not been tested on medium-to-large scale projects and may contain numerous bugs. Features like collaborative scheduling and WASM/RISC-V compilation are listed as future work.

Health Check
Last commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
4
Issues (30d)
3
Star History
1,303 stars in the last 90 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Nat Friedman Nat Friedman(Former CEO of GitHub), and
32 more.

llama.cpp by ggml-org

0.4%
84k
C/C++ library for local LLM inference
created 2 years ago
updated 23 hours ago
Feedback? Help us improve.