Nim README

The project's README from github.com/nim-lang/Nim. As one markdown file: README.md.

Nim

Build Status

This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. For more information about Nim, including downloads and documentation for the latest release, check out Nim's website or bleeding edge docs.

Community

Join the IRC chat Join the Discord server Join the Gitter chat Join the Matrix room Get help View Nim posts on Stack Overflow Follow @nim_lang on Twitter

Compiling

The compiler currently officially supports the following platform and architecture combinations:

Operating System Architectures Supported
Windows (Windows XP or greater) x86 and x86_64
Linux (most distributions) x86, x86_64, ppc64, and armv6l
Mac OS X (10.4 or greater) x86, x86_64, ppc64, and Apple Silicon (ARM64)

More platforms are supported, however, they are not tested regularly and they may not be as stable as the above-listed platforms.

Compiling the Nim compiler is quite straightforward if you follow these steps:

First, the C source of an older version of the Nim compiler is needed to bootstrap the latest version because the Nim compiler itself is written in the Nim programming language. Those C sources are available within the nim-lang/csources_v3 repository.

Next, to build from source you will need:

Windows Note: Cygwin and similar POSIX runtime environments are not supported.

Then, if you are on a *nix system or Windows, the following steps should compile Nim from source using gcc, git, and the koch build tool.

Note: The following commands are for the development version of the compiler. For most users, installing the latest stable version is enough. Check out the installation instructions on the website to do so: https://nim-lang.org/install.html.

For package maintainers: see packaging guidelines.

First, get Nim from GitHub:

git clone https://github.com/nim-lang/Nim.git
cd Nim

Next, run the appropriate build shell script for your platform:

Finally, once you have finished the build steps (on Windows, Mac, or Linux) you should add the bin directory to your PATH.

See also bootstrapping the compiler.

See also reproducible builds.

Koch

koch is the build tool used to build various parts of Nim and to generate documentation and the website, among other things. The koch tool can also be used to run the Nim test suite.

Assuming that you added Nim's bin directory to your PATH, you may execute the tests using ./koch tests. The tests take a while to run, but you can run a subset of tests by specifying a category (for example ./koch tests cat async).

For more information on the koch build tool please see the documentation within the doc/koch.md file.

Nimble

nimble is Nim's package manager. To learn more about it, see the nim-lang/nimble repository.

Contributors

This project exists thanks to all the people who contribute.

Contributing

Backers on Open Collective Sponsors on Open Collective Donate Bitcoins Open Source Helpers

See detailed contributing guidelines. We welcome all contributions to Nim regardless of how small or large they are. Everything from spelling fixes to new modules to be included in the standard library are welcomed and appreciated. Before you start contributing, you should familiarize yourself with the following repository structure:

If you are not familiar with making a pull request using GitHub and/or git, please read this guide.

Ideally, you should make sure that all tests pass before submitting a pull request. However, if you are short on time, you can just run the tests specific to your changes by only running the corresponding categories of tests. CI verifies that all tests pass before allowing the pull request to be accepted, so only running specific tests should be harmless. Integration tests should go in tests/untestable.

If you're looking for ways to contribute, please look at our issue tracker. There are always plenty of issues labeled Easy; these should be a good starting point for an initial contribution to Nim.

You can also help with the development of Nim by making donations. Donations can be made using:

If you have any questions feel free to submit a question on the Nim forum, or via IRC on the #nim channel.

Backers

Thank you to all our backers! [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

You can also see a list of all our sponsors/backers from various payment services on the sponsors page of our website.

License

The compiler and the standard library are licensed under the MIT license, except for some modules which explicitly state otherwise. As a result, you may use any compatible license (essentially any license) for your own programs developed with Nim. You are explicitly permitted to develop commercial applications using Nim.

Please read the copying.txt file for more details.

Copyright © 2006-2026 Andreas Rumpf, all rights reserved.

Nim (nim-lang/Nim)

Searching Database…

18.3K ·GitHub
这是什么?Nim 是一种静态类型、编译型的系统编程语言,融合了 Python、Ada 和 Modula 的设计理念,注重效率、表达力和优雅。本仓库包含 Nim 编译器、标准库、工具和文档。
Nim 是我可以编译成原生二进制文件的语言吗,还是像 JVM 那样运行在虚拟机上?Nim 编译为原生代码。编译器自身的自举过程是:先用旧版 Nim 编译器生成 C 源代码,再用 gcc 或 clang 等 C 编译器进行编译。
在自己编译 Nim 之前,需要先安装什么?需要一个 C 编译器(gcc 6.x+、clang、Visual C++ 或 Intel C++),以及 git 或 wget 二者之一,用来拉取源码仓库。在 Windows 上,推荐的最低版本为 MinGW 4.3.0(GCC 8.10)或更高,且不支持类 Cygwin 的环境。
哪些平台是官方支持的,哪些只是社区测试过的?官方支持的组合包括:Windows(x86/x86_64)、Linux(x86、x86_64、ppc64、armv6l)和 macOS(x86、x86_64、ppc64、Apple Silicon ARM64)。其他平台也存在,但没有定期测试,稳定性可能较差。
什么是 Nimble?Nimble 是 Nim 官方的包管理器,维护在独立的 nim-lang/nimble 仓库中,用于安装和管理第三方 Nim 包。
什么是 Koch?如何运行测试套件?Koch 是用于编译 Nim 部分组件、生成文档和官网以及运行测试套件的构建工具。通过 ./koch tests 运行测试,也可以像 ./koch tests cat async 这样按可选分类进行过滤。
仓库是如何组织的?compiler/ 存放编译器源码(另含 nimsuggest),lib/ 存放标准库(包含 pure、impure、wrappers 子目录),doc/ 存放 reStructuredText 文档,tests/ 存放按类别划分的编译器和标准库测试。
我可以在哪里提问或讨论 Nim 的开发?Nim 论坛是提问和讨论的主要场所。实时聊天还可以通过 IRC(Libera Chat 上的 #nim)、Discord、Gitter、Matrix 和 Telegram 进行。
What are similar projects?spinel, Odin, elixir, Singeli, rust, crystal, v, carbon-lang
Creator
nim-lang
Size
124.9 MB
Stars
18.3K
Updated
CommitOct 16
Age
16y
Commits · 90 Days