The Dlang Tour
To use this package, run the following command in your project's root directory:
The Dlang Online Tour
This is the D language online tour which provides an online introduction to this great system programming language with examples that can be edited, compiled and run online.
The most recent version of this tour can be seen here: http://tour.dlang.org.
Please refer to the document CONTRIBUTING.md for further information on how to add or change existing content.
Compile & Run
Make sure dub is installed and simply run this in
You might want to change the settings in
config.yml to change
the ports the tour is listening to.
Compiling & running of user source code
The source code on the tour can be compiled and then executed online and its output returned to the user. Therefore three different types of execution drivers have been implemented within the dlang-tour:
off: no online compilation allowed. If the user hits Runs an error message will be returned.
stupidlocal: an unsafe method that just runs
rdmdon the local host system and returns its output. Very unsafe and musn't ever be used in production!
rdmdwithin a special Docker container (dlang-tour-rdmd) and returns its output. The driver imposes the Docker container memory and execution time limits. Additional configurations options available in
The execution driver is set in
Caching of the program output can also be enabled in
exec.cache = true). Caching
will only be enabled for the built-in default examples however.
A Docker image is automatically built by Travis CI and pushed to the repository
at https://hub.docker.com/r/stonemaster/dlang-tour/. The Dlang-Tour Docker container
is configured to use Docker itself to compile and run D source code
in the online editor. For that to work the host system's Docker
Unix domain socket has to be mounted to work inside the container. Any
sandbox for compiling will then be started on the host system actually,
and not within the Dlang Tour Docker container itself.
The code for running RDMD in a Docker sandbox can be found here: dlang-tour-rdmd.
So to run the latest dlang-tour version in a Docker container, run the following command:
docker run -d --rm -p 80:8080 -e GOOGLE_ANALYTICS_ID=123 -v /var/run/docker.sock:/var/run/docker.sock \ --name dlang-tour stonemaster/dlang-tour
The tour will be available at your host system on port 80. To stop the container again just run:
docker stop dlang-tour
For further Docker foo please refer to the Docker documentation.
Note: The docker version inside the container must be compatible to that on the host system! Generally a newer version might run on the host system than within the container.
The Docker container is also the suggested way of dlang-tour's deployment.
To enable Google Analytics please specify the environment variable
GOOGLE_ANALYTICS_ID and set it to the tracking ID provided
for your Analytics account.
Memory limit per started
rdmd Docker container which compiles
and runs the user code.
Maximum number of parallel executions of the
rdmd user code
Time limit in seconds the
rdmd Docker container with the user
code is allowed to take until it is killed.
Maximum allowed size in bytes of the generated user program's output.
A deployment guide can be found in the deploy folder.
Boost License. See LICENSE.txt for more details.
- Registered by André Stein
- ~dfmt_integration released 3 years ago
- Copyright © 2015, André Stein
- vibe-d, dyaml, mustache-d
1.1.1 2018-Dec-11 1.1.0 2018-Jul-28 1.0.15 2018-May-29 1.0.14 2018-Mar-26 1.0.13 2018-Jan-31
- Download Stats:
0 downloads today
0 downloads this week
0 downloads this month
210 downloads total
- Short URL: