Wandbox is a social compilation service.
This project is a Pythonic binding to the Wandbox API, and CLI command.
pip install wandbox-api
Bash | C | C# | C++ | CPP |
Crystal | D | Elixir | Erlang | Go |
Groovy | Haskell | Java | JavaScript | Julia |
Lazy K | Lisp | Lua | Nim | OCaml |
OpenSSL | Pascal | Perl | PHP | Pony |
Python | R | Ruby | Rust | Scala |
SQL | Swift | TypeScript | Vim script | Zig |
usage: wandbox [-h] [-v] [-l LANGUAGE] [-c COMPILER] [-x OPTIONS] [-r RUNTIME_OPTIONS] [-n] [-s] [--encoding ENCODING]
[--no-default] [--stdin STDIN] [--retry-wait SECONDS] [--retry COUNT]
{list,compilers,versions,lang,option,permlink,run,template,run-template,user,help} ...
positional arguments:
{list,compilers,versions,lang,option,permlink,run,help}
list show list api response. see `list -h`
compilers show support compilers. see `compilers -h`
versions show support compilers. see `versions -h`
lang show support languages. see `lang -h`
option show compiler options. see `option -h`
version show compiler version from version-command. see `version -h`
permlink get permlink. see `permlink -h`
run build and run command. see `run +h`
template get wandbox template code. see `template -h`
run-template run wandbox template code. see `run-template +h`
user get wandbox user info. see `user -h`
help show subcommand help. see `help -h`
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-l LANGUAGE, --language LANGUAGE
specify language
-c COMPILER, --compiler COMPILER
specify compiler
-x OPTIONS, --options OPTIONS
used options for a compiler
-r RUNTIME_OPTIONS, --runtime-options RUNTIME_OPTIONS
runtime options
-n, --dryrun dryrun
-V, --verbose verbose log
-s, --save generate permanent link.
--encoding ENCODING set encoding
--no-head ignore head compiler version (at auto setup)
--no-default no set default options
--stdin STDIN set stdin
--retry-wait SECONDS wait time for retry when HTTPError occurs
--retry COUNT number of retries when HTTPError occurs
Source files required for runtime are automatically added to the file list.
- wandbox-bash
wandbox-bash run sample.sh
Include files required for compilation are automatically added to the file list.
- wandbox-cc
(wandbox -l C) - wandbox-gcc
(wandbox -l C -c gcc-*-c) - wandbox-clang
(wandbox -l C -c clang-*-c)
wandbox-gcc run sample.c test.c
CXX="wandbox-gcc run" make
- wandbox-cs
(wandbox -l C#)
wandbox-cs run sample.cs test.cs
Include files required for compilation are automatically added to the file list.
- wandbox-cxx
(wandbox -l C++) - wandbox-g++
(wandbox -l C++ -c gcc-*) - wandbox-clang++
(wandbox -l C++ -c clang-*)
usage: wandbox-cxx [-h] [-v] [-c COMPILER] [-x OPTIONS] [-r RUNTIME_OPTIONS] [-n] [-s] [--encoding ENCODING]
[--no-default] [--stdin STDIN] [--retry-wait SECONDS] [--retry COUNT] [--std VERSION]
[--boost VERSION] [--no-warning] [--optimize] [--cpp-pedantic PEDANTIC] [--cpp-verbose] [--sprout] [--msgpack]
{list,compilers,versions,lang,option,permlink,run,template,run-template,user,help} ...
positional arguments:
{list,compilers,versions,lang,option,permlink,run,help}
list show list api response. see `list -h`
compilers show support compilers. see `compilers -h`
versions show support compilers. see `versions -h`
lang show support languages. see `lang -h`
option show compiler options. see `option -h`
version show compiler version from version-command. see `version -h`
permlink get permlink. see `permlink -h`
run build and run command. see `run +h`
template get wandbox template code. see `template -h`
run-template run wandbox template code. see `run-template +h`
user get wandbox user info. see `user -h`
help show subcommand help. see `help -h`
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-c COMPILER, --compiler COMPILER
specify compiler
-x OPTIONS, --options OPTIONS
used options for a compiler
-r RUNTIME_OPTIONS, --runtime-options RUNTIME_OPTIONS
runtime options
-n, --dryrun dryrun
-V, --verbose verbose log
-s, --save generate permanent link.
--encoding ENCODING set encoding
--no-head ignore head compiler version (at auto setup)
--no-default no set default options
--stdin STDIN set stdin
--retry-wait SECONDS wait time for retry when HTTPError occurs
--retry COUNT number of retries when HTTPError occurs
--std VERSION set --std options
--boost VERSION set boost options version X.XX or nothing
--no-warning disable warning option
--optimize use optimization
--cpp-pedantic PEDANTIC
use cpp-pedantic
--cpp-verbose use cpp-verbose
--sprout use sprout
--msgpack use msgpack
wandbox-cxx -c gcc-head run main.cpp -DWANDBOX
CXX="wandbox-g++ run" make
Include files required for compilation are automatically added to the file list.
- wandbox-CPP
(wandbox -l CPP) - wandbox-gcc-PP
(wandbox -l CPP -c gcc-*-pp) - wandbox-clang-PP
(wandbox -l CPP -c clang-*-pp)
wandbox-clang-PP run -CC -nostdinc -E -P sample.cpp test.cpp
Import modules required for compilation are automatically added to the file list.
- wandbox-crystal
(wandbox -l Crystal)
wandbox-crystal run sample.cr
- wandbox-dmd
(wandbox -l D -c dmd-*) - wandbox-ldmd2
(wandbox -l D -c ldc-*) - wandbox-dub
wandbox-dmd run sample.d test2.d packages/test.d
wandbox-dub run
- wandbox-elixir
(wandbox -l Elixir) - wandbox-mix (Experimental)
wandbox-elixir run sample.exs
wandbox-mix run test
- wandbox-erlc
(wandbox -l Erlang)
wandbox-erlc run prog.erl
- wandbox-go
(wandbox -l Go)
wandbox-go run sample.go
- wandbox-groovy
(wandbox -l Groovy)
wandbox-groovy run -cp . sample.groovy
- wandbox-ghc
(wandbox -l Haskell) - wandbox-stack
Note: wandbox-ghc/wandbox-stack add -dynamic compiler option. (output file size workarround.)
wandbox-ghc run sample.hs
wandbox-stack run
- wandbox-java
(wandbox -l Java)
wandbox-java run sample.java test.java
Import files/modules required for runtime are automatically added to the file list.
- wandbox-js
(wandbox -l JavaScript) - wandbox-node
(wandbox -l JavaScript-c nodejs-*) - wandbox-spidermonkey
(wandbox -l JavaScript -c spidermonkey-*)
wandbox-node run --experimental-modules sample.js
- wandbox-julia
(wandbox -l Julia)
wandbox-julia run sample.jl
- wandbox-lazyk
(wandbox -l "Lazy K")
wandbox-lazyk run sample.lazy
- wandbox-sbcl
(wandbox -l Lisp) - wandbox-clisp
(wandbox -l Lisp -c clisp-*)
wandbox-sbcl run sample.lisp
Import files/modules required for compilation are automatically added to the file list.
- wandbox-lua
(wandbox -l Lua) - wandbox-luajit
(wandbox -l Lua -c luajit-*)
wandbox-lua run sample.lua
Import modules/.c required for compilation are automatically added to the file list.
- wandbox-nim
(wandbox -l Nim)
wandbox-nim run sample.nim
- wandbox-ocamlopt
(wandbox -l OCaml) - wandbox-ocaml
(wandbox -l OCaml)
wandbox-ocamlopt run sample.ml
Even just having wandbox would be enough.
- wandbox-ssl
wandbox-ssl genrsa -out test.key 2048
wandbox-ssl rsa -in test.key -pubout -out test.key.pub
Include files required for runtime are automatically added to the file list.
- wandbox-fpc
(wandbox -l Pascal)
wandbox-fpc run sample.pas
Require files/modules required for runtime are automatically added to the file list.
- wandbox-perl
(wandbox -l Perl)
wandbox-perl run sample.pl
Require/Include files required for runtime are automatically added to the file list.
- wandbox-php
(wandbox -l PHP)
wandbox-php run sample.php
Build directory files are automatically added to the file list.
- wandbox-ponyc
(wandbox -l Pony)
wandbox-ponyc run ./sample ./sample2
wandbox-ponyc builds ./sample and ./sample2, Then execute ./sample2
Import files/modules required for runtime are automatically added to the file list.
- wandbox-python
(wandbox -l Python) - wandbox-python2
(wandbox -l Python -c cpython-2.7-*) - wandbox-python3
(wandbox -l Python -c cpython-*) - wandbox-pypy
(wandbox -l Python -c pypy-*) - wandbox-pypy2
(wandbox -l Python -c pypy-2*) - wandbox-pypy3
(wandbox -l Python -c pypy-3*)
wandbox-python3 run sample.py
wandbox-python supports setup.py
wandbox-python -c cpython-head -r test run setup.py
If you open a file, add the file
wandbox-python -c cpython-head -r test run setup.py README.md
Source files are automatically added to the file list.
- wandbox-rscript
(wandbox -l R)
wandbox-rscript run sample.R
Require files required for runtime are automatically added to the file list.
- wandbox-ruby
(wandbox -l Ruby) - wandbox-mruby
(wandbox -l Ruby -c mruby-*)
wandbox-ruby run sample.rb
Module files required for runtime are automatically added to the file list.
- wandbox-rustc
(wandbox -l Rust) - wandbox-cargo
wandbox-rustc run sample.rs
wandbox-cargo run
- wandbox-scalac
(wandbox -l Scala)
wandbox-scalac run *.scala
- wandbox-sqlite
(wandbox -l SQL) - wandbox-sqlite3
(wandbox -l SQL)
wandbox-sqlite3 run SELECT 'Hello, Wandbox!';
- wandbox-swift
(wandbox -l Swift)
wandbox-swift run main.swift
Import files/modules required for compilation are automatically added to the file list.
- wandbox-tsc
(wandbox -l TypeScript)
wandbox-tsc run --module es2015 sample.ts
- wandbox-vim
(wandbox -l "Vim script")
wandbox-vim run -X -N -u NONE -i NONE -V1 -e -s -S sample.vim +qall!
Import files required for compilation are automatically added to the file list.
- wandbox-zig
(wandbox -l Zig)
wandbox-zig run main.zig