Skip to content
This repository has been archived by the owner on Jul 5, 2018. It is now read-only.
/ core-rdmd Public archive

Docker container that runs RDMD internally

Notifications You must be signed in to change notification settings

dlang-tour/core-rdmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Docker container for running rdmd

This docker image provides the current version of the rdmd compiler of the D programming language. The container takes source code encoded as Base64 on the command line and decodes it internally and passes it to rdmd. The compiler tries to compile the source and, if successful, outputs the program's output. Compiler errors will also be output, to stderr.

This container is used in the dlang-tour to support online compilation of user code in a safe sandbox.

Usage

Given a source code:

$ source='void main() { import std.stdio; writeln("Hello World"); }

Convert it to Base64:

$ bsource=$(echo $source | base64 -w0)

Run the docker container passing the base64 source as command line parameter:

$ docker run --rm stonemaster/dlang-tour-rdmd $bsource
Hello World

Docker image

The docker image gets built after every push to master and pushed to DockerHub.

License

Boost license.

About

Docker container that runs RDMD internally

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages