Note: This project is under development. Some breaking changes will be occured.
wan
is a command-line client of Wandbox, written in Rust.
It provides a way to interact with Wandbox from commandline.
Rust toolchain is required for installation. If you don't have installed Rust toolchain yet, visit official page of rustup to download installer.
$ cargo install --git https://github.com/ubnt-intrepid/wan.git
Post a code to Wandbox, and retrieve compilation/execution results.
<filename>
<filenames>...
-
--compiler=<compiler>
- Compiler name
By default, the compiler name is automatically detect by extension of<filename>
. -
--options=<options>
- Prepared options for used compiler
If you want to use multiple options, join them by a comma. -
--compiler-options=<options>
- Additional options for compiler
Arguments are joined by space(s). -
--runtime-options=<options>
- Arguments to pass (compiled) executable
Arguments are joined by space(s). -
--stdin=[stdin str]
- Standard input -
--permlink
- Generate permlink -
--browse
- Open permlink URL -
--verbose
- Display verbose output
// hello.cpp
#include <iostream>
#include <vector>
int main(int argc, char* argv[]) {
std::cout << "Hello, wandbox ^ω^" << std::endl;
std::cout << "Runtime arguments:" << std::endl;
int i = 0;
for (auto&& arg: std::vector<char*>(argv, argv+argc)) {
std::cout << i++ << ": " << arg << std::endl;
}
return 0;
}
$ wan compile hoge.cpp --compiler=clang-head --runtime-options="a b c"
Get compiler information from Wandbox and list to standard output.
- none
-
--name-only
- Display only compiler name -
--name <name>
- Filter by compiler name (with regex format) -
--lang <lang>
- Filter by language (with regex format)
$ wan list
Get a result specified a permlink from Wandbox
<link>
- Permlink
- none
$ wan permlink xxxxxxxx
Configuration file are located at ~/.config/wan/config.json
(or ~/AppData/Roaming/wan/config.json
on Windows).
For example, if you want to use local Wandbox service:
{
"url": "http://127.0.0.1:3500"
}
- rhysd/wandbox-vim - for Vimmers
- kosh04/emacs-wandbox - for Emacs users
- wraith13/wandbox-vscode - for VSCode users
- mattn/wandbox-run - Run wandbox as shebang (my inspiration source for developing this project)
- osyo-manga/gem-wandbox - written in Ruby
- rbtnn/go-wandbox - written in Golang
- srz-zumix/wandbox-api - Python
- Planeshifter/node-wandbox-api - Node.js