diff --git a/nim/README-short.txt b/nim/README-short.txt new file mode 100644 index 000000000000..1a3073397ee9 --- /dev/null +++ b/nim/README-short.txt @@ -0,0 +1 @@ +Nim is a statically typed, imperative programming language focusing on efficiency and elegance. \ No newline at end of file diff --git a/nim/content.md b/nim/content.md new file mode 100644 index 000000000000..f5288810df8a --- /dev/null +++ b/nim/content.md @@ -0,0 +1,49 @@ +# What is Nim? + +[Nim](https://nim-lang.org/) is a statically typed, imperative programming language that focuses on efficiency, expressiveness, and elegance. It is designed to be as fast as C and as readable as Python, while offering a powerful macro system for metaprogramming. + +> [nim-lang.org](https://nim-lang.org/) + +%%LOGO%% + +# How to use this image + +## Compile and run a Nim program (C backend) + +To compile a file named `main.nim` and execute it immediately: + +```console +$ docker run --rm -v "$PWD":/usr/src/app -w /usr/src/app %%IMAGE%% nim c -r main.nim +``` + +## Compile to JavaScript + +Nim can compile to JavaScript. This image includes Node.js to serve as the runtime: + +```console +$ docker run --rm -v "$PWD":/usr/src/app -w /usr/src/app %%IMAGE%% nim js -r main.nim +``` + +## Managing packages with Nimble + +The image is configured with SSL support to allow Nimble to install packages from remote repositories: + +```console +$ docker run --rm -v "$PWD":/usr/src/app -w /usr/src/app %%IMAGE%% nimble install -y +``` + +## Dockerfile example + +```dockerfile +FROM %%IMAGE%% + +WORKDIR /usr/src/app + +COPY *.nimble . +RUN nimble install --depsOnly -y + +COPY . . +RUN nimble build + +CMD ["./yourapp"] +``` diff --git a/nim/github-repo b/nim/github-repo new file mode 100644 index 000000000000..3b5de0920c62 --- /dev/null +++ b/nim/github-repo @@ -0,0 +1 @@ +https://github.com/nim-lang/docker-images diff --git a/nim/license.md b/nim/license.md new file mode 100644 index 000000000000..3429ce7ac1f6 --- /dev/null +++ b/nim/license.md @@ -0,0 +1 @@ +View [license information](https://github.com/nim-lang/Nim/blob/devel/copying.txt) for the software contained in this image. diff --git a/nim/logo.png b/nim/logo.png new file mode 100644 index 000000000000..5c39fcf3e567 Binary files /dev/null and b/nim/logo.png differ diff --git a/nim/maintainer.md b/nim/maintainer.md new file mode 100644 index 000000000000..a1e7f154b609 --- /dev/null +++ b/nim/maintainer.md @@ -0,0 +1 @@ +[Nim Core Team](%%GITHUB-REPO%%) diff --git a/nim/metadata.json b/nim/metadata.json new file mode 100644 index 000000000000..39ac749c7f11 --- /dev/null +++ b/nim/metadata.json @@ -0,0 +1,7 @@ +{ + "hub": { + "categories": [ + "languages-and-frameworks" + ] + } +}