Files
Aurora.3/code/__defines/rust_g.dm
Erki 45f4652a3a Implement a dll call wrapper (#8944)
Implements a wrapper to the call()() function, meant to be used for calling dylibs.

This is useful for two reasons:

    It allows us to debug the dylib calls (such as timing for the time being).
2020-07-05 18:31:43 +03:00

21 lines
1009 B
Plaintext

// rust_g.dm - DM API for rust_g extension library
#define RUST_G "rust_g"
#define WRITE_LOG(log, text) dll_call(RUST_G, "log_write", log, text) // Using Rust g dll to log faster with less CPU usage.
#define RUSTG_JOB_NO_RESULTS_YET "NO RESULTS YET"
#define RUSTG_JOB_NO_SUCH_JOB "NO SUCH JOB"
#define RUSTG_JOB_ERROR "JOB PANICKED"
#define rustg_udp_shipper_send(addr, text) dll_call(RUST_G, "udp_shipper_send", addr, text)
#define RUSTG_HTTP_METHOD_GET "get"
#define RUSTG_HTTP_METHOD_POST "post"
#define RUSTG_HTTP_METHOD_PUT "put"
#define RUSTG_HTTP_METHOD_DELETE "delete"
#define RUSTG_HTTP_METHOD_PATCH "patch"
#define RUSTG_HTTP_METHOD_HEAD "head"
#define rustg_http_request_blocking(method, url, body, headers) dll_call(RUST_G, "http_request_blocking", method, url, body, headers)
#define rustg_http_request_async(method, url, body, headers) dll_call(RUST_G, "http_request_async", method, url, body, headers)
#define rustg_http_check_request(req_id) dll_call(RUST_G, "http_check_request", req_id)