Skip to content

Commit

Permalink
Rust-G Hashing Update (goonstation#4216)
Browse files Browse the repository at this point in the history
* ugh stupid fucking http options
* APPARENTLY, they don't even test the code smh
* how about we just ignore it entirely
  • Loading branch information
ZeWaka authored Apr 4, 2021
1 parent 2a08a77 commit f13e98d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions _std/rust_g.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@
#define rustg_git_revparse(rev) call(RUST_G, "rg_git_revparse")(rev)
#define rustg_git_commit_date(rev) call(RUST_G, "rg_git_commit_date")(rev)

#define rustg_hash_string(algorithm, text) call(RUST_G, "hash_string")(algorithm, text)
#define rustg_hash_file(algorithm, fname) call(RUST_G, "hash_file")(algorithm, fname)

#define RUSTG_HASH_MD5 "md5"
#define RUSTG_HASH_SHA1 "sha1"
#define RUSTG_HASH_SHA256 "sha256"
#define RUSTG_HASH_SHA512 "sha512"
#define RUSTG_HASH_XXH64 "xxh64"
#define RUSTG_HASH_BASE64 "base64"

#ifdef RUSTG_OVERRIDE_BUILTINS
#define md5(thing) (isfile(thing) ? rustg_hash_file(RUSTG_HASH_MD5, "[thing]") : rustg_hash_string(RUSTG_HASH_MD5, thing))
#endif

#define RUSTG_HTTP_METHOD_GET "get"
#define RUSTG_HTTP_METHOD_PUT "put"
#define RUSTG_HTTP_METHOD_DELETE "delete"
Expand Down
1 change: 1 addition & 0 deletions buildByond.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ BYOND_MINOR_VERSION=1549

SPACEMAN_DMM_VERSION=suite-1.6

# f1f33c6
RUST_G_VERSION=0.4.7

NODE_VERSION=12
Expand Down
2 changes: 1 addition & 1 deletion code/datums/http.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
*/
/datum/http_request/proc/execute_blocking()
CRASH("Attempted to execute a blocking HTTP request")
// _raw_response = rustg_http_request_blocking(method, url, body, headers)
// _raw_response = rustg_http_request_blocking(method, url, body, headers, build_options()))

/**
* Async execution starter
Expand Down
Binary file modified rust_g.dll
Binary file not shown.

0 comments on commit f13e98d

Please sign in to comment.