Sign inSign up

chrishellerappsian/docker-nim-cross

By chrishellerappsian

•Updated almost 6 years ago

Cross compiling for Nim

Image
0

5.8K

chrishellerappsian/docker-nim-cross repository overview

⁠Overview

Dockerfile for Nim cross-compiler

⁠packages

⁠Usage

⁠Example compilation

echo 'echo "Hello World"' > hello.nim
docker run --rm -v `pwd`:/usr/local/src \
   chrishellerappsian/docker-nim-cross:latest \
   nim c --os:windows --cpu:amd64 --out:hello64.exe hello.nim

docker run --rm -v `pwd`:/usr/local/src \
    chrishellerappsian/docker-nim-cross:latest \
    nim c --os:macosx --cpu:amd64 --out:hello32.osx.bin hello.nim

Look at example directory.

⁠Directories in container

  • /usr/local/src/: working dir
  • /usr/bin/x86_64-w64-mingw32-gcc: compiler for 64 bit Windows
  • /usr/bin/i686-w64-mingw32-gcc: compiler for 32 bit Windows
  • /opt/osxcross/target/bin/o64-clang: compiler for 64 bit MacOSX
  • /opt/osxcross/target/bin/o32-clang: compiler for 32 bit MacOSX
  • /usr/bin/musl-gcc: compiler for Linux(musl)

⁠default command

default command is bash.

Tag summary

Content type

Image

Digest

Size

916.6 MB

Last updated

almost 6 years ago

docker pull chrishellerappsian/docker-nim-cross