Nature, a C-built systems language with its own linkers and no LLVM
The Nature Programming Language
At a glance
- What is it?
- Nature is a general-purpose systems language whose compiler, assembler and ELF, Mach-O and COFF/PE linkers are written in C. This article covers install, cross-compiling, the formatter, and the gaps its author lists.
- Who is it for?
- Pick Nature if you want to try a small Go-influenced systems language that cross-compiles to six targets without a host toolchain, and you are happy with prototypes and small to medium programs. Skip it for large production systems, since its author states it has not been tested in large-scale projects.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly C, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.
Star history
- nature-lang/nature2,258 ★ · +3
| Repository | 2026-10-12 | 2026-11-25 |
|---|---|---|
| nature-lang/nature | 2.3k | 2.3k |
3 Stars in the last 44 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
A compiler that skips LLVM and ships its own assembler and three linkers
Nature compiles straight to machine code for the target platform. Its author wrote the compiler, the assembler and the ELF, Mach-O and COFF/PE linkers inside the repository, so an ordinary build needs neither LLVM nor a host linker. The top level of the repository shows the layout: a C codebase built with CMakeLists.txt, a build.zig and build.zig.zon alongside it, and directories named cmd, runtime, src, std, lib, nls and package.
The design philosophy points at Go for both design and runtime architecture. Files are the module unit, and dependencies are declared in a package.toml. The runtime is also plain C, with a garbage collector the project describes as having very short stop-the-world pauses, an allocator modelled on tcmalloc, shared-stack coroutines and libuv-based IO.
The practical effect is a short dependency chain. If something goes wrong in linking, the code to read is Nature's own, not a system tool's.
Installing means unpacking a release tarball and setting NATURE_ROOT if you move it
There is no package-manager install in the repository. You download a release archive from the GitHub releases page, extract it, give the files correct permissions, and move the nature folder to /usr/local/. Then /usr/local/nature/bin goes on your PATH.
Installing anywhere else has a cost. The NATURE_ROOT environment variable must be set by hand to the new directory, and the compiler will not find its standard library or sysroots otherwise. The archive also bundles target sysroots and statically linked third-party runtimes, which is how builds avoid depending on the host.
The repository also contains an INSTALL.sh and a Dockerfile, but the only documented route is the tarball. The Dockerfile starts from alpine:latest, rewrites the apk mirror to mirrors.tuna.tsinghua.edu.cn, and copies in release/nature-${VERSION}-linux-amd64.tar.gz, so it expects a release archive to be sitting in a local release directory before docker build runs. It is not a ready-made public image recipe.
The official check after installing is a version command:
nature -vOne command builds hello world, and one flag turns it into a Windows .exe
A minimal program imports fmt and calls fmt.printf from main. Saved as main.n, it builds and runs in one line:
nature build main.n && ./mainCross-compiling to Windows x64 uses a flag:
nature build --target windows_amd64 main.nThat produces main.exe through Nature's built-in COFF/PE linker and a bundled Windows sysroot. Clang, LLD, MSVC, the Windows SDK, MinGW and Zig are all stated as not required on the end-user build path. The wording is "from a supported host", and the README does not enumerate which hosts qualify.
The current targets are linux_amd64, linux_arm64, linux_riscv64, darwin_amd64, darwin_arm64 and windows_amd64. There is no 32-bit entry and no BSD entry in that list, and a C target and a WASM3.0 target are both listed as unfinished.
The formatter has no style options, and nature fmt and nls fmt share one core
Nature ships exactly one canonical format. The author calls it convention over configuration: there are no style profiles and no tunable rules, so a team cannot argue its way to a different brace style.
Two commands expose the same core. nature fmt is the toolchain command, and nls fmt is the underlying binary the language server and wrapper call. Editor formatting goes through LSP textDocument/formatting and produces identical output.
With no flags, nature fmt prints to stdout and leaves files alone. Reading from stdin works when no path is given, and a directory is walked recursively for .n files only. The flags that matter in practice:
nature fmt -w path/to/file.n
nature fmt --check path/to/file.n
nature fmt --diff path/to/file.n
nature fmt -l src/
nature fmt -e path/to/file.n-w rewrites in place. --check and --diff both exit with status 1 when a file would change, which makes them usable as CI gates. -l lists files that differ, and -e reports every lexer error instead of only the first. The nls binary accepts the same options, with --write as the long form of -w.
The formatter refuses to guess when the syntax is invalid
Formatting broken code is not supported. When a file has a syntax error, the formatter reports the error and produces no best-effort output. Anyone who relies on format-on-save while typing half-finished code will see the formatter stay silent or complain until the file parses.
--write also cannot be combined with --check or --diff. A CI step that wants to both verify and fix needs two separate invocations, and the fix step has to run without the check flag.
The author states that formatter output is intended to be stable and idempotent. That is an intent, not a guarantee backed by a described test suite, so running nature fmt --check twice over a freshly formatted tree is a cheap way to confirm it on your own code before wiring it into a pipeline.
Unsafe mode, LLM adaptation and two extra targets are still unfinished
The project describes itself as having reached an early usable version with core syntax in place. The same paragraph lists what remains: an unsafe runtime mode, LLM coding adaptation, C target adaptation and WASM3.0 target adaptation.
The missing unsafe mode matters for a systems language. Memory safety is a headline claim, so code that must bypass it for hardware access or tight layout control has no sanctioned path yet. The C FFI is described as zero-overhead for calls into the C standard library, which covers calling out, but it is not the same as an unsafe escape hatch inside Nature code.
The tested surface is also stated plainly. A set of test cases and standard libraries covers basic functionality and syntax, and a set of small to medium projects covers overall usability. Large-scale projects have not been tried. A team planning a large codebase would be the first to find whatever that gap hides.
The repository was pushed to on 2026-10-23 and has cut weekly releases, with weekly.2026.44 on 2026-10-26, weekly.2026.43 on 2026-10-19 and weekly.2026.42 on 2026-10-12. A weekly cadence means the compiler you install this month can differ from next month's.
Real programs to read: dbdriver, llama.n, tetris, parker and a WebView package
The strongest evidence of what Nature can currently build sits in a set of external repositories the project links. weiwenhao/dbdriver covers MySQL, PostgreSQL and Redis drivers, and weiwenhao/nature-sqlite is a SQLite driver. weiwenhao/emoji-api is an API framework example.
Two entries stretch the language in different directions. weiwenhao/parker is a lightweight container packaging tool and runtime, and weiwenhao/llama.n is a Llama2 inference implementation. weiwenhao/tetris is built on raylib, which exercises the C FFI, and wzzc-dev/nature-webview is a WebView package.
More language examples live in tests/features/cases inside the main repository. The documentation set consists of a quick start, a syntax reference and a standard library reference at nature-lang.org, plus a browser playground.
A centralized package manager called npkg exists, and the package layout uses package.toml. The README gives no commands for npkg in the text shown, so how packages are published or pinned has to be learned from the site.
Editorial conclusion
Pick Nature if you want to try a small Go-influenced systems language that cross-compiles to six targets without a host toolchain, and you are happy with prototypes and small to medium programs. Skip it for large production systems, since its author states it has not been tested in large-scale projects. Before committing, build one of your own medium-sized programs with nature build and check that the missing unsafe mode does not block you.
Frequently asked questions
What platforms can the Nature programming language compile for?
The current version supports linux_amd64, linux_arm64, linux_riscv64, darwin_amd64, darwin_arm64 and windows_amd64. C and WASM3.0 targets are listed as not yet done.
How do I install Nature if I do not use /usr/local?
Extract the release archive to your chosen directory, add its bin folder to PATH, and set the NATURE_ROOT environment variable to that directory.
Does Nature need LLVM or a system linker to build programs?
No. Nature has its own compiler and assembler plus built-in ELF, Mach-O and COFF/PE linkers, so LLVM and a host linker are not required on the ordinary build path.
Can I check Nature code formatting in CI?
Yes. nature fmt --check path/to/file.n exits with status 1 if any file would change, and nature fmt --diff does the same while printing a unified diff.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/nature-lang-nature)Star history chart for your README
[](https://hysenlabs.com/projects/nature-lang-nature)Was this useful?