0.7.4 • Published 9 years ago

ezcompilex v0.7.4

Weekly downloads
4
License
-
Repository
github
Last release
9 years ago

compilex is a node.js library which is used to build online code compiler/interpreter websites and webservices.

You can compile and respond back outputs for all the languages that can be compiled by the server.

Some of the online code compiling/judging websites are

Why compilex ?

1) compilex can detect infinite loops in the users program . 2) It can compile programs by getting input from STDIN. 3) Generates statistics for the administrator.

Supported Languages

compilex is currently in initial development stage . As the library grows , so does the list here .

LanguageSupport
C
C++
Java
Python
C#
Visual Basic

Work Flow

1) Get the program as input from the client as a request 2) Use compilex modules to compile the program 3) Get the output and errors in json and string formats 4) Respond the output to the client

Setting Up Compilers

Inorder to compile any programming language , you need to first have the compiler for that programming language in the server machine.

NOTE : Video demos for setting up the compilers and using compilex will be availble soon.

Documentation

var envData = { OS : "windows"}; 
//mono modules for linux is not included till now
compiler.compileCSWithInput( envData , code , input ,  function(data){
    res.send(data);        
});
<h5>10)Visual Basic</h5>
```javascript
    var envData = { OS : "windows"}; 
    compiler.compileVB( envData , code , function(data){
        res.send(data);
    });    
var envData = { OS : "windows"}; 
compiler.compileVBWithInput( envData , code , input ,  function(data){
    res.send(data);        
});
<h5>12)Memory Management </h5>
All the temporary files ( source code and executables ) are created in your temp directory.
flush and flushSync helps you to free the memory by deleting the temporary files.
```javascript
    compiler.flush(function(){
    console.log('All temporary files flushed !'); 
    });

Synchronous version of flush

    compiler.flushSync();