piston-cli
piston-cli copied to clipboard
Shift to piston v2 endpoint
All that has change from v2 (16c585d41d649af8a1be4cd35559d60970f27339) -> v3
- Runtimes can now have their versions selected
- Configuring run time and compile timeouts
- Configuring
compile_memory_limitandrun_memory_limit - Multi-file support (Running folders)
- Addition of
signalandcode
An example request now would look like:
{
"language": "js",
"version": "15.10.0",
"files": [
{
"name": "my_cool_code.js",
"content": "console.log(process.argv)"
}
],
"stdin": "",
"args": [
"1",
"2",
"3"
],
"compile_timeout": 10000,
"run_timeout": 3000,
"compile_memory_limit": -1,
"run_memory_limit": -1
}
Changes to be done
- Add flags to configure
compile_timeout,run_timeout,compile_memory_limit,run_memory_limit, this would be optional flags and can be used onshell,file,linkand the defaultask_input. Remember this would be taken as flags. - Add support for passing folders, on passing folders, the user would be asked to input the name of their main file which is to be run.
- Add
-v/--versionflag which would take the runtime version and we can remove the current--versionflag which is used for getting the piston-cli version to probably--info(?). - Change the message output i,e.
Here is your python output:according to the return code and signal returned by piston v2 api. - Any more ideas are appreciated, This is a basic idea, the flag names and implementation can be discussed on this issue or the discord server
If you are interested in doing some parts of the issue, let me know :D