summary refs log tree commit diff stats
path: root/lib/wrappers/zip/zzip.nim
blob: 73fd53c34546335b013a0c50855273b15f5f6c29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#
#
#            Nim's Runtime Library
#        (c) Copyright 2008 Andreas Rumpf
#
#    See the file "copying.txt", included in this
#    distribution, for details about the copyright.
#

## This module is an interface to the zzip library. 

#   Author: 
#   Guido Draheim <guidod@gmx.de>
#   Tomi Ollila <Tomi.Ollila@iki.fi>
#   Copyright (c) 1999,2000,2001,2002,2003,2004 Guido Draheim
#          All rights reserved, 
#             usage allowed under the restrictions of the
#         Lesser GNU General Public License 
#             or alternatively the restrictions 
#             of the Mozilla Public License 1.1

when defined(windows):
  const
    dllname = "zzip.dll"
else:
  const 
    dllname = "libzzip.so"

type 
  TZZipError* = int32
const
  ZZIP_ERROR* = -4096'i32
  ZZIP_NO_ERROR* = 0'i32            # no error, may be used if user sets it.
  ZZIP_OUTOFMEM* = ZZIP_ERROR - 20'i32  # out of memory  
  ZZIP_DIR_OPEN* = ZZIP_ERROR - 21'i32  # failed to open zipfile, see errno for details 
  ZZIP_DIR_STAT* = ZZIP_ERROR - 22'i32  # failed to fstat zipfile, see errno for details
  ZZIP_DIR_SEEK* = ZZIP_ERROR - 23'i32  # failed to lseek zipfile, see errno for details
  ZZIP_DIR_READ* = ZZIP_ERROR - 24'i32  # failed to read zipfile, see errno for details  
  ZZIP_DIR_TOO_SHORT* = ZZIP_ERROR - 25'i32
  ZZIP_DIR_EDH_MISSING* = ZZIP_ERROR - 26'i32
  ZZIP_DIRSIZE* = ZZIP_ERROR - 27'i32
  ZZIP_ENOENT* = ZZIP_ERROR - 28'i32
  ZZIP_UNSUPP_COMPR* = ZZIP_ERROR - 29'i32
  ZZIP_CORRUPTED* = ZZIP_ERROR - 31'i32
  ZZIP_UNDEF* = ZZIP_ERROR - 32'i32
  ZZIP_DIR_LARGEFILE* = ZZIP_ERROR - 33'i32

  ZZIP_CASELESS* = 1'i32 shl 12'i32
  ZZIP_NOPATHS* = 1'i32 shl 13'i32
  ZZIP_PREFERZIP* = 1'i32 shl 14'i32
  ZZIP_ONLYZIP* = 1'i32 shl 16'i32
  ZZIP_FACTORY* = 1'i32 shl 17'i32
  ZZIP_ALLOWREAL* = 1'i32 shl 18'i32
  ZZIP_THREADED* = 1'i32 shl 19'i32
  
type
  TZZipDir* {.final, pure.} = object
  TZZipFile* {.final, pure.} = object
  TZZipPluginIO* {.final, pure.} = object

  TZZipDirent* {.final, pure.} = object  
    d_compr*: int32  ## compression method
    d_csize*: int32  ## compressed size  
    st_size*: int32  ## file size / decompressed size
    d_name*: cstring ## file name / strdupped name

  TZZipStat* = TZZipDirent    

proc zzip_strerror*(errcode: int32): cstring  {.cdecl, dynlib: dllname, 
    importc: "zzip_strerror".}
proc zzip_strerror_of*(dir: ptr TZZipDir): cstring  {.cdecl, dynlib: dllname, 
    importc: "zzip_strerror_of".}
proc zzip_errno*(errcode: int32): int32 {.cdecl, dynlib: dllname, 
    importc: "zzip_errno".}

proc zzip_geterror*(dir: ptr TZZipDir): int32 {.cdecl, dynlib: dllname, 
    importc: "zzip_error".}
proc zzip_seterror*(dir: ptr TZZipDir, errcode: int32) {.cdecl, dynlib: dllname, 
    importc: "zzip_seterror".}
proc zzip_compr_str*(compr: int32): cstring {.cdecl, dynlib: dllname, 
    importc: "zzip_compr_str".}
proc zzip_dirhandle*(fp: ptr TZZipFile): ptr TZZipDir {.cdecl, dynlib: dllname, 
    importc: "zzip_dirhandle".}
proc zzip_dirfd*(dir: ptr TZZipDir): int32 {.cdecl, dynlib: dllname, 
    importc: "zzip_dirfd".}
proc zzip_dir_real*(dir: ptr TZZipDir): int32 {.cdecl, dynlib: dllname, 
    importc: "zzip_dir_real".}
proc zzip_file_real*(fp: ptr TZZipFile): int32 {.cdecl, dynlib: dllname, 
    importc: "zzip_file_real".}
proc zzip_realdir*(dir: ptr TZZipDir): pointer {.cdecl, dynlib: dllname, 
    importc: "zzip_realdir".}
proc zzip_realfd*(fp: ptr TZZipFile): int32 {.cdecl, dynlib: dllname, 
    importc: "zzip_realfd".}

proc zzip_dir_alloc*(fileext: cstringArray): ptr TZZipDir {.cdecl, 
    dynlib: dllname, importc: "zzip_dir_alloc".}
proc zzip_dir_free*(para1: ptr TZZipDir): int32 {.cdecl, dynlib: dllname, 
    importc: "zzip_dir_free".}

proc zzip_dir_fdopen*(fd: int32, errcode_p: ptr TZZipError): ptr TZZipDir {.cdecl, 
    dynlib: dllname, importc: "zzip_dir_fdopen".}
proc zzip_dir_open*(filename: cstring, errcode_p: ptr TZZipError): ptr TZZipDir {.
    cdecl, dynlib: dllname, importc: "zzip_dir_open".}
proc zzip_dir_close*(dir: ptr TZZipDir) {.cdecl, dynlib: dllname, 
    importc: "zzip_dir_close".}
proc zzip_dir_read*(dir: ptr TZZipDir, dirent: ptr TZZipDirent): int32 {.cdecl, 
    dynlib: dllname, importc: "zzip_dir_read".}

proc zzip_opendir*(filename: cstring): ptr TZZipDir {.cdecl, dynlib: dllname, 
    importc: "zzip_opendir".}
proc zzip_closedir*(dir: ptr TZZipDir) {.cdecl, dynlib: dllname, 
    importc: "zzip_closedir".}
proc zzip_readdir*(dir: ptr TZZipDir): ptr TZZipDirent {.cdecl, dynlib: dllname, 
    importc: "zzip_readdir".}
proc zzip_rewinddir*(dir: ptr TZZipDir) {.cdecl, dynlib: dllname, 
                                      importc: "zzip_rewinddir".}
proc zzip_telldir*(dir: ptr TZZipDir): int {.cdecl, dynlib: dllname, 
    importc: "zzip_telldir".}
proc zzip_seekdir*(dir: ptr TZZipDir, offset: int) {.cdecl, dynlib: dllname, 
    importc: "zzip_seekdir".}

proc zzip_file_open*(dir: ptr TZZipDir, name: cstring, flags: int32): ptr TZZipFile {.
    cdecl, dynlib: dllname, importc: "zzip_file_open".}
proc zzip_file_close*(fp: ptr TZZipFile) {.cdecl, dynlib: dllname, 
    importc: "zzip_file_close".}
proc zzip_file_read*(fp: ptr TZZipFile, buf: pointer, length: int): int {.
    cdecl, dynlib: dllname, importc: "zzip_file_read".}
proc zzip_open*(name: cstring, flags: int32): ptr TZZipFile {.cdecl, 
    dynlib: dllname, importc: "zzip_open".}
proc zzip_close*(fp: ptr TZZipFile) {.cdecl, dynlib: dllname, 
    importc: "zzip_close".}
proc zzip_read*(fp: ptr TZZipFile, buf: pointer, length: int): int {.
    cdecl, dynlib: dllname, importc: "zzip_read".}

proc zzip_freopen*(name: cstring, mode: cstring, para3: ptr TZZipFile): ptr TZZipFile {.
    cdecl, dynlib: dllname, importc: "zzip_freopen".}
proc zzip_fopen*(name: cstring, mode: cstring): ptr TZZipFile {.cdecl, 
    dynlib: dllname, importc: "zzip_fopen".}
proc zzip_fread*(p: pointer, size: int, nmemb: int, 
                 file: ptr TZZipFile): int {.cdecl, dynlib: dllname, 
    importc: "zzip_fread".}
proc zzip_fclose*(fp: ptr TZZipFile) {.cdecl, dynlib: dllname, 
    importc: "zzip_fclose".}

proc zzip_rewind*(fp: ptr TZZipFile): int32 {.cdecl, dynlib: dllname, 
    importc: "zzip_rewind".}
proc zzip_seek*(fp: ptr TZZipFile, offset: int, whence: int32): int {.
    cdecl, dynlib: dllname, importc: "zzip_seek".}
proc zzip_tell*(fp: ptr TZZipFile): int {.cdecl, dynlib: dllname, 
    importc: "zzip_tell".}

proc zzip_dir_stat*(dir: ptr TZZipDir, name: cstring, zs: ptr TZZipStat, 
                    flags: int32): int32 {.cdecl, dynlib: dllname, 
    importc: "zzip_dir_stat".}
proc zzip_file_stat*(fp: ptr TZZipFile, zs: ptr TZZipStat): int32 {.cdecl, 
    dynlib: dllname, importc: "zzip_file_stat".}
proc zzip_fstat*(fp: ptr TZZipFile, zs: ptr TZZipStat): int32 {.cdecl, dynlib: dllname, 
    importc: "zzip_fstat".}

proc zzip_open_shared_io*(stream: ptr TZZipFile, name: cstring, 
                          o_flags: int32, o_modes: int32, ext: cstringArray, 
                          io: ptr TZZipPluginIO): ptr TZZipFile {.cdecl, 
    dynlib: dllname, importc: "zzip_open_shared_io".}
proc zzip_open_ext_io*(name: cstring, o_flags: int32, o_modes: int32, 
                       ext: cstringArray, io: ptr TZZipPluginIO): ptr TZZipFile {.
    cdecl, dynlib: dllname, importc: "zzip_open_ext_io".}
proc zzip_opendir_ext_io*(name: cstring, o_modes: int32, 
                          ext: cstringArray, io: ptr TZZipPluginIO): ptr TZZipDir {.
    cdecl, dynlib: dllname, importc: "zzip_opendir_ext_io".}
proc zzip_dir_open_ext_io*(filename: cstring, errcode_p: ptr TZZipError, 
                           ext: cstringArray, io: ptr TZZipPluginIO): ptr TZZipDir {.
    cdecl, dynlib: dllname, importc: "zzip_dir_open_ext_io".}
ganize readme.md' href='/ahoang/Nim/commit/readme.md?h=devel&id=03b05bd346c1ecc18d1b7aa9e8731056efd6645a'>03b05bd34 ^
ae8eb1ec3 ^
03b05bd34 ^




229a62384 ^
03b05bd34 ^



da2fd42e6 ^
03b05bd34 ^

229a62384 ^
03b05bd34 ^




342834d7f ^
03b05bd34 ^




a16e6bd22 ^
342834d7f ^


6b38b37b4 ^
342834d7f ^


















6b38b37b4 ^
342834d7f ^
a16e6bd22 ^
03b05bd34 ^
ae8eb1ec3 ^
03b05bd34 ^


1a7fdb09d ^
03b05bd34 ^
bc0b4fbc9 ^
03b05bd34 ^




908b2cc2e ^
03b05bd34 ^
b67dea7a3 ^

9c34d6ee0 ^
03b05bd34 ^
60d437427 ^
03b05bd34 ^



dce0b3b00 ^

03b05bd34 ^

528069a96 ^
03b05bd34 ^



03b05bd34 ^

03b05bd34 ^
d1cf04a38 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232

                                                                                                            
                                                                                                                                                                                        
 
                                                                                  
                                                                         
                                                                                                                 
 
            
 
                                              
                                                            





                                                                                        
                                                                                  
                                                 

                                                                                

                                                                               
                                                                                   
                                                       

                                                                                  
                                                          
 
            
 

                                                                     
 

                                                                           
                                                       
 
                                                                             
                                                   
 



                                                                              
                                                                  
                                                        
 
                                         
 



                                                                               
                                                                            
                           




                                                                          
                                                                                  
 
                                                                                 
                                                                    
 
                                                                                 


                                                                                         
                                                                                                   
 
 
                           
 
   

                                             
   
 
                                                               
 

                             
 
                                                                               
                                              
 
                                                                           
 
       
 

                                                                             
                                  
 
                                                                             
                                                                        
                                                               
                            
 

                                                                            
 
         
 

                                                                    


               
                                                            
                                                                                                                                         
 
               
 
                                                                                                                                                                                          

                                                                              
                                                                                                                           
 
                                                                                         



                                                                             

                                                                                     
                                                                                    
                                                            
                                                                                                                          

                                                                               
                                             
                                                                      

                                                                            
                                                                                


                                                                                 
                                                                                       




                                                                                  
                                                                                   



                                                                                 
                                                    

                                                                                         
                                                                                   




                                                                                   
                                                   




                                                                   
 


          
                                                                                        


















                                                                                                                                                                 
                                                                                                                                                            
 
          
                                                                                
                                                                               


                                                                                 
                                                                 
 
                                                          




                                                              
                                       
                                           

                                                                                                       
                                     
                                            
                                     



                                                                                 

                                                                

                                                                                            
                                                                                                                                             



                                                                                                          

                                                                                                                         
                                                                                  
                                                
# <img src="https://raw.githubusercontent.com/nim-lang/assets/master/Art/logo-crown.png" height="28px"/> Nim

[![Build Status](https://dev.azure.com/nim-lang/Nim/_apis/build/status/nim-lang.Nim?branchName=devel)](https://dev.azure.com/nim-lang/Nim/_build/latest?definitionId=1&branchName=devel)

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][nim-site] or [bleeding edge docs](https://nim-lang.github.io/Nim/).

## Community

[![Join the IRC chat][badge-nim-irc]][nim-irc]
[![Join the Discord server][badge-nim-discord]][nim-discord]
[![Join the Gitter chat][badge-nim-gitter]][nim-gitter]
[![Get help][badge-nim-forum-gethelp]][nim-forum]
[![View Nim posts on Stack Overflow][badge-nim-stackoverflow]][nim-stackoverflow-newest]
[![Follow @nim_lang on Twitter][badge-nim-twitter]][nim-twitter]

* The [forum][nim-forum] - the best place to ask questions and to discuss Nim.
* [#nim IRC Channel (Libera Chat)][nim-irc] - a place to discuss Nim in real-time.
  Also where most development decisions get made.
* [Discord][nim-discord] - an additional place to discuss Nim in real-time. Most
  channels there are bridged to IRC.
* [Gitter][nim-gitter] - an additional place to discuss Nim in real-time. There
  is a bridge between Gitter and the IRC channel.
* [Telegram][nim-telegram] - an additional place to discuss Nim in real-time. There
  is the official Telegram channel. Not bridged to IRC.
* [Stack Overflow][nim-stackoverflow] - a popular Q/A site for programming related
  topics that includes posts about Nim.
* [Github Wiki][nim-wiki] - Misc user-contributed content.

## Compiling

The compiler currently officially 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 greater) - x86, x86_64 and ppc64

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_v1``][csources-v1-repo] repository.

Next, to build from source you will need:

  * A C compiler such as ``gcc`` 3.x/later or an alternative such as ``clang``,
    ``Visual C++`` or ``Intel C++``. It is recommended to use ``gcc`` 3.x or
    later.
  * Either ``git`` or ``wget`` to download the needed source repositories.
  * The ``build-essential`` package when using ``gcc`` on Ubuntu (and likely
    other distros as well).
  * On Windows MinGW 4.3.0 (GCC 8.10) is the minimum recommended compiler.
  * Nim hosts a known working MinGW distribution:
    * [MinGW32.7z](https://nim-lang.org/download/mingw32.7z)
    * [MinGW64.7z](https://nim-lang.org/download/mingw64.7z)

**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](https://nim-lang.github.io/Nim/packaging.html).


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:

* `build_all.sh` (Linux, Mac)
* `build_all.bat` (Windows)

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

See also [rebuilding the compiler](doc/intern.rst#rebuilding-the-compiler).

## 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.rst](doc/koch.rst) file.

## Nimble

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

## Contributors

This project exists thanks to all the people who contribute.
<a href="https://github.com/nim-lang/Nim/graphs/contributors"><img src="https://opencollective.com/Nim/contributors.svg?width=890" /></a>

## Contributing

[![Backers on Open Collective](https://opencollective.com/nim/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/nim/sponsors/badge.svg)](#sponsors)
[![Setup a bounty via Bountysource][badge-nim-bountysource]][nim-bountysource]
[![Donate Bitcoins][badge-nim-bitcoin]][nim-bitcoin]
[![Open Source Helpers](https://www.codetriage.com/nim-lang/nim/badges/users.svg)](https://www.codetriage.com/nim-lang/nim)

See [detailed contributing guidelines](https://nim-lang.github.io/Nim/contributing.html).
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:

* ``bin/``, ``build/`` - these directories are empty, but are used when Nim is built.
* ``compiler/`` - the compiler source code. Also includes nimfix, and plugins within
  ``compiler/nimfix`` and ``compiler/plugins`` respectively.
* ``nimsuggest`` - the nimsuggest tool that previously lived in the [``nim-lang/nimsuggest``][nimsuggest-repo] repository.
* ``config/`` - the configuration for the compiler and documentation generator.
* ``doc/`` - the documentation files in reStructuredText format.
* ``lib/`` - the standard library, including:
    * ``pure/`` - modules in the standard library written in pure Nim.
    * ``impure/`` - modules in the standard library written in pure Nim with
    dependencies written in other languages.
    * ``wrappers/`` - modules that wrap dependencies written in other languages.
* ``tests/`` - contains categorized tests for the compiler and standard library.
* ``tools/`` - the tools including ``niminst`` and ``nimweb`` (mostly invoked via
  ``koch``).
* ``koch.nim`` - the tool used to bootstrap Nim, generate C sources, build the website,
  and generate the documentation.

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

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. Travis 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][nim-issues].
There are always plenty of issues labeled [``Easy``][nim-issues-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:

* [Open Collective](https://opencollective.com/nim)
* [Bountysource][nim-bountysource]
* [Bitcoin][nim-bitcoin]

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


## Backers

Thank you to all our backers! [[Become a backer](https://opencollective.com/Nim#backer)]

<a href="https://opencollective.com/Nim#backers" target="_blank"><img src="https://opencollective.com/Nim/backers.svg?width=890"></a>


## Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/Nim#sponsor)]

<a href="https://opencollective.com/Nim/sponsor/0/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/1/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/2/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/3/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/4/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/5/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/6/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/7/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/8/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/Nim/sponsor/9/website" target="_blank"><img src="https://opencollective.com/Nim/sponsor/9/avatar.svg"></a>

You can also see a list of all our sponsors/backers from various payment services on the [sponsors page](https://nim-lang.org/sponsors.html) 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](copying.txt) file for more details.

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

[nim-site]: https://nim-lang.org
[nim-forum]: https://forum.nim-lang.org
[nim-issues]: https://github.com/nim-lang/Nim/issues
[nim-issues-easy]: https://github.com/nim-lang/Nim/labels/Easy
[nim-irc]: https://web.libera.chat/#nim
[nim-twitter]: https://twitter.com/nim_lang
[nim-stackoverflow]: https://stackoverflow.com/questions/tagged/nim-lang
[nim-stackoverflow-newest]: https://stackoverflow.com/questions/tagged/nim-lang?sort=newest&pageSize=15
[nim-discord]: https://discord.gg/nim
[nim-gitter]: https://gitter.im/nim-lang/Nim
[nim-telegram]: https://t.me/nim_lang
[nim-bountysource]: https://www.bountysource.com/teams/nim
[nim-bitcoin]: https://blockchain.info/address/1BXfuKM2uvoD6mbx4g5xM3eQhLzkCK77tJ
[nimble-repo]: https://github.com/nim-lang/nimble
[nimsuggest-repo]: https://github.com/nim-lang/nimsuggest
[csources-repo-deprecated]: https://github.com/nim-lang/csources
[csources-v1-repo]: https://github.com/nim-lang/csources_v1
[badge-nim-travisci]: https://img.shields.io/travis/nim-lang/Nim/devel.svg?style=flat-square
[badge-nim-irc]: https://img.shields.io/badge/chat-on_irc-blue.svg?style=flat-square
[badge-nim-discord]: https://img.shields.io/discord/371759389889003530?color=blue&label=discord&logo=discord&logoColor=gold&style=flat-square
[badge-nim-gitter]: https://img.shields.io/badge/chat-on_gitter-blue.svg?style=flat-square
[badge-nim-forum-gethelp]: https://img.shields.io/badge/Forum-get%20help-4eb899.svg?style=flat-square
[badge-nim-twitter]: https://img.shields.io/twitter/follow/nim_lang.svg?style=social
[badge-nim-stackoverflow]: https://img.shields.io/badge/stackoverflow-nim_tag-yellow.svg?style=flat-square
[badge-nim-bountysource]: https://img.shields.io/bountysource/team/nim/activity.svg?style=flat-square
[badge-nim-bitcoin]: https://img.shields.io/badge/bitcoin-1BXfuKM2uvoD6mbx4g5xM3eQhLzkCK77tJ-D69134.svg?style=flat-square
[pull-request-instructions]: https://help.github.com/articles/using-pull-requests/
[nim-wiki]: https://github.com/nim-lang/Nim/wiki