mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 09:24:36 +00:00
- add additional parameters parsing (other implementations will just
ignore them). E.g. if in RST we have:
.. code:: nim
:test: "nim c $1"
...
then in Markdown that will be:
```nim test="nim c $1"
...
```
- implement Markdown interpretation of additional indentation which is
less than 4 spaces (>=4 spaces is a code block but it's not
implemented yet). RST interpretes it as quoted block, for Markdown it's
just normal paragraphs.
- add separate `md2html` and `md2tex` commands. This is to separate
Markdown behavior in cases when it diverges w.r.t. RST significantly —
most conspicously like in the case of additional indentation above, and
also currently the contradicting inline rule of Markdown is also turned
on only in `md2html` and `md2tex`. **Rationale:** mixing Markdown and
RST arbitrarily is a way to nowhere, we need to provide a way to fix the
particular behavior. Note that still all commands have **both** Markdown
and RST features **enabled**. In this PR `*.nim` files can be processed
only in Markdown mode, while `md2html` is for `*.md` files and
`rst2html` for `*.rst` files.
- rename `*.rst` files to `.*md` as our current default behavior is
already Markdown-ish
- convert code blocks in `docgen.rst` to Markdown style as an example.
Other code blocks will be converted in the follow-up PRs
- fix indentation inside Markdown code blocks — additional indentation
is preserved there
- allow more than 3 backticks open/close blocks (tildas \~ are still not
allowed to avoid conflict with RST adornment headings) see also
https://github.com/nim-lang/RFCs/issues/355
- better error messages
- (other) fix a bug that admonitions cannot be used in sandbox mode; fix
annoying warning on line 2711
78 lines
1.9 KiB
Markdown
78 lines
1.9 KiB
Markdown
=============
|
|
Packaging Nim
|
|
=============
|
|
|
|
This page provide hints on distributing Nim using OS packages.
|
|
|
|
See `distros <distros.html>`_ for tools to detect Linux distribution at runtime.
|
|
|
|
See `here <intern.html#bootstrapping-the-compiler-reproducible-builds>`_ for how to
|
|
compile reproducible builds.
|
|
|
|
Supported architectures
|
|
-----------------------
|
|
|
|
Nim runs on a wide variety of platforms. Support on amd64 and i386 is tested regularly, while less popular platforms are tested by the community.
|
|
|
|
- amd64
|
|
- arm64 (aka aarch64)
|
|
- armel
|
|
- armhf
|
|
- i386
|
|
- m68k
|
|
- mips64el
|
|
- mipsel
|
|
- powerpc
|
|
- ppc64
|
|
- ppc64el (aka ppc64le)
|
|
- riscv64
|
|
|
|
The following platforms are seldomly tested:
|
|
|
|
- alpha
|
|
- hppa
|
|
- ia64
|
|
- mips
|
|
- s390x
|
|
- sparc64
|
|
|
|
Packaging for Linux
|
|
-------------------
|
|
|
|
See https://github.com/nim-lang/Nim/labels/Installation for installation-related bugs.
|
|
|
|
Build Nim from the released tarball at https://nim-lang.org/install_unix.html
|
|
It is different from the GitHub sources as it contains Nimble, C sources & other tools.
|
|
|
|
The Debian package ships bash and ksh completion and manpages that can be reused.
|
|
|
|
Hints on the build process:
|
|
|
|
.. code:: cmd
|
|
|
|
# build from C sources and then using koch
|
|
make -j # supports parallel build
|
|
# alternatively: ./build.sh --os $os_type --cpu $cpu_arch
|
|
./bin/nim c -d:release koch
|
|
./koch boot -d:release
|
|
|
|
# optionally generate docs into doc/html
|
|
./koch docs
|
|
|
|
./koch tools
|
|
|
|
# extract files to be really installed
|
|
./install.sh <tempdir>
|
|
|
|
# also include the tools
|
|
for fn in nimble nimsuggest nimgrep; do cp ./bin/$fn <tempdir>/nim/bin/; done
|
|
|
|
What to install:
|
|
|
|
- The expected stdlib location is /usr/lib/nim
|
|
- Global configuration files under /etc/nim
|
|
- Optionally: manpages, documentation, shell completion
|
|
- When installing documentation, .idx files are not required
|
|
- The "compiler" directory contains compiler sources and should not be part of the compiler binary package
|
|
|