Go to file
Reimer Behrends 80356f1cc7 Avoid unnecessary #include triggered by importc vars.
When a C variable or macro is imported via an {.importc.} var or
let statement, but no definition is needed and the variable does
not have an initializer part, then there is also no need to generate
an #include for the associated header until and unless the variable
is actually used. The header is already generated upon use, but
unnecessarily also when the variable is defined.

This is an issue with the posix module in particular, where a lot
of unnecessary header files are being included because relevant
constants are defined via importc vars, and those header files
may not even be available on a given system.

This patch omits the generation of the #include directive for those
definitions where they aren't needed.
2014-09-19 03:34:00 +02:00
2014-09-11 00:34:59 +02:00
2014-09-11 00:34:59 +02:00
2014-06-30 16:45:55 +02:00
2014-08-19 22:57:49 +02:00
2014-02-02 00:02:08 +01:00
2012-09-03 19:44:25 +01:00
2014-04-19 22:42:22 +02:00
2014-04-19 22:42:22 +02:00
2014-08-12 08:47:31 +02:00

Nimrod Compiler

This repo contains the Nimrod compiler, Nimrod's stdlib, tools and documentation.

Compiling

Compiling the Nimrod compiler is quite straightforward. Because the Nimrod compiler itself is written in the Nimrod programming language the C source of an older version of the compiler are needed to bootstrap the latest version. The C sources are available in a separate repo here.

Pre-compiled snapshots of the compiler are also available on Nimbuild. Your platform however may not currently be built for.

The compiler currently supports the following platform and architecture combinations:

  • Windows (Windows XP or greater) - x86 and x86_64
  • Linux (most, if not all, distributions) - x86, x86_64, ppc64 and armv6l
  • Mac OS X 10.04 or higher - x86, x86_64 and ppc64

In reality a lot more are supported, however they are not tested regularly.

To build from source you will need:

  • gcc 3.x or later recommended. Other alternatives which may work are: clang, Visual C++, Intel's C++ compiler
  • git or wget

If you are on a fairly modern *nix system, the following steps should work:

$ git clone git://github.com/Araq/Nimrod.git
$ cd Nimrod
$ git clone --depth 1 git://github.com/nimrod-code/csources
$ cd csources && sh build.sh
$ cd ..
$ bin/nimrod c koch
$ ./koch boot -d:release

koch install [dir] may then be used to install Nimrod, or you can simply add it to your PATH. More koch related options are documented in doc/koch.txt.

The above steps can be performed on Windows in a similar fashion, the build.bat and build64.bat (for x86_64 systems) are provided to be used instead of build.sh.

Getting help

A forum is available if you have any questions, and you can also get help in the IRC channel on Freenode in #nimrod. If you ask questions on StackOverflow use the nimrod tag.

License

The compiler and the standard library are licensed under the MIT license, except for some modules where the documentation suggests otherwise. This means that you can use any license for your own programs developed with Nimrod, allowing you to create commercial applications.

Read copying.txt for more details.

Copyright (c) 2004-2014 Andreas Rumpf. All rights reserved.

Description
Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
Readme 713 MiB
Languages
Nim 96.2%
HTML 1.8%
Python 0.5%
C 0.4%
Shell 0.4%
Other 0.6%