kiss_dc

Crates.iokiss_dc
lib.rskiss_dc
version0.0.12
sourcesrc
created_at2020-12-28 16:37:06.961208
updated_at2021-01-08 12:07:19.185365
descriptionA tool for simple communication with a computing server using the KISS rule.
homepagehttps://github.com/FiveDomain/kiss_dc
repositoryhttps://github.com/FiveDomain/kiss_dc
max_upload_size
id328330
size48,929
Konrad Podstawski (FiveDomain)

documentation

README

KISS_DC

alt

KISS_DC is a tool that allows to use a person's computer with a previously prepared script (https://github.com/FiveDomain/KISS_DC_client_example) as a computing unit. This tool allows you to write code in languages such as JS and Python (and after the comilation to .wasm from such languages as Rust, Go, C++, C#, Java, Python or TypeScript. and many others ). One of the planned changes is adding Load Balancer / Computing Balancer.

Simple Python Example

use kiss_dc::*;

fn main() {

let code = "
def fib(until):
    n1 = 0
    n2 = 1
    count = 0

    while count < until:

        n1, n2 = n2, n1 + n2
        count += 1
    return n1

print(fib(50))";

    let exmaple_message = ServerState::new("192.168.7.105:6142").run_server(code, "Madzia", "python");

    if exmaple_message.is_ok() {
        println!("Marek: {}", exmaple_message.unwrap_or(String::from("ServerFuction Crashed")));
    }
    
}

Simple WebAssembly Example

use kiss_dc::*;

fn main() {

    let test_message_js = ServerState::new("192.168.7.103:6142").run_server_wasm("x-y-z-123", "kiss_dc_wasm_module.wasm");

    println!("x-y-z-123: {}", test_message_js.unwrap_or(String::from("ServerFuction Crashed")));
}

In case of a webassembly, a file named dc_kiss_wasm_module.wasm is required in the client server directory.

Commit count: 33

cargo fmt