Skip to content

Commit

Permalink
update legacy winlibs
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Nov 23, 2023
1 parent 7f8c1d3 commit dbc1595
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ It is neither necessary nor recommended to install system libraries, but 'libnng

For R >= 4.2 using the 'Rtools42' or 'Rtools43' toolchains, 'libnng' v1.6.0 alpha (a54820f patched) and 'libmbedtls' v3.5.1 will be automatically compiled from the package sources during installation.

For previous R versions, pre-compiled 'libnng' v1.6.0 alpha (a54820f) and 'libmbedtls' v3.5.1 libraries are downloaded and used for installation instead.
For previous R versions, pre-compiled 'libnng' v1.6.0 alpha (a54820f patched) and 'libmbedtls' v3.5.1 libraries are downloaded and used for installation instead.

[« Back to ToC](#table-of-contents)

Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ aio
#> < recvAio >
#> - $data for message data
aio$data |> str()
#> num [1:100000000] -0.4016 -1.1204 0.0317 -0.1929 -0.4284 ...
#> num [1:100000000] 0.247 -0.744 0.243 -0.578 0.487 ...
```

As `call_aio()` is blocking and will wait for completion, an alternative
Expand Down Expand Up @@ -536,7 +536,7 @@ throughout, or alternatively ‘localhost’, but not a mixture of the two.
cert <- write_cert(cn = "127.0.0.1")
str(cert)
#> List of 2
#> $ server: chr [1:2] "-----BEGIN CERTIFICATE-----\nMIIFOTCCAyGgAwIBAgIBATANBgkqhkiG9w0BAQsFADA0MRIwEAYDVQQDDAkxMjcu\nMC4wLjExETAPBgNV"| __truncated__ "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAki3ZU+tHR5YHDm5tt20RNITY0Mg7hnez0arQzuaDn3JG4rl3\n1zgO4O0a/jzv"| __truncated__
#> $ server: chr [1:2] "-----BEGIN CERTIFICATE-----\nMIIFOTCCAyGgAwIBAgIBATANBgkqhkiG9w0BAQsFADA0MRIwEAYDVQQDDAkxMjcu\nMC4wLjExETAPBgNV"| __truncated__ "-----BEGIN RSA PRIVATE KEY-----\nMIIJKQIBAAKCAgEA9SHLY3NAPjiznsVgpEvUwSMgVV9kvjS5Bh8ix+580alCjuHK\nNe5rMDhq50ER"| __truncated__
#> $ client: chr [1:2] "-----BEGIN CERTIFICATE-----\nMIIFOTCCAyGgAwIBAgIBATANBgkqhkiG9w0BAQsFADA0MRIwEAYDVQQDDAkxMjcu\nMC4wLjExETAPBgNV"| __truncated__ ""

ser <- tls_config(server = cert$server)
Expand Down Expand Up @@ -705,7 +705,7 @@ ncurl("https://postman-echo.com/get")
#> NULL
#>
#> $data
#> [1] "{\n \"args\": {},\n \"headers\": {\n \"x-forwarded-proto\": \"https\",\n \"x-forwarded-port\": \"443\",\n \"host\": \"postman-echo.com\",\n \"x-amzn-trace-id\": \"Root=1-65593e08-1063be555f206acc33ebb9d9\"\n },\n \"url\": \"https://postman-echo.com/get\"\n}"
#> [1] "{\n \"args\": {},\n \"headers\": {\n \"x-forwarded-proto\": \"https\",\n \"x-forwarded-port\": \"443\",\n \"host\": \"postman-echo.com\",\n \"x-amzn-trace-id\": \"Root=1-655e9beb-3e8ce3383e7fffe77efa4317\"\n },\n \"url\": \"https://postman-echo.com/get\"\n}"
```

For advanced use, supports additional HTTP methods such as POST or PUT.
Expand All @@ -724,10 +724,10 @@ res

call_aio(res)$headers
#> $date
#> [1] "Sat, 18 Nov 2023 22:43:21 GMT"
#> [1] "Thu, 23 Nov 2023 00:25:15 GMT"

res$data
#> [1] "{\n \"args\": {},\n \"data\": {\n \"key\": \"value\"\n },\n \"files\": {},\n \"form\": {},\n \"headers\": {\n \"x-forwarded-proto\": \"https\",\n \"x-forwarded-port\": \"443\",\n \"host\": \"postman-echo.com\",\n \"x-amzn-trace-id\": \"Root=1-65593e09-466c82e6480fd83a25abb62a\",\n \"content-length\": \"16\",\n \"content-type\": \"application/json\",\n \"authorization\": \"Bearer APIKEY\"\n },\n \"json\": {\n \"key\": \"value\"\n },\n \"url\": \"https://postman-echo.com/post\"\n}"
#> [1] "{\n \"args\": {},\n \"data\": {\n \"key\": \"value\"\n },\n \"files\": {},\n \"form\": {},\n \"headers\": {\n \"x-forwarded-proto\": \"https\",\n \"x-forwarded-port\": \"443\",\n \"host\": \"postman-echo.com\",\n \"x-amzn-trace-id\": \"Root=1-655e9beb-2f4e479e361b97f022e7e658\",\n \"content-length\": \"16\",\n \"content-type\": \"application/json\",\n \"authorization\": \"Bearer APIKEY\"\n },\n \"json\": {\n \"key\": \"value\"\n },\n \"url\": \"https://postman-echo.com/post\"\n}"
```

In this respect, it may be used as a performant and lightweight method
Expand Down Expand Up @@ -758,7 +758,7 @@ transact(sess)
#>
#> $headers
#> $headers$Date
#> [1] "Sat, 18 Nov 2023 22:43:21 GMT"
#> [1] "Thu, 23 Nov 2023 00:25:16 GMT"
#>
#> $headers$`Content-Type`
#> [1] "application/json; charset=utf-8"
Expand All @@ -771,8 +771,8 @@ transact(sess)
#> [76] 77 61 72 64 65 64 2d 70 6f 72 74 22 3a 20 22 34 34 33 22 2c 0a 20 20 20 20
#> [101] 22 68 6f 73 74 22 3a 20 22 70 6f 73 74 6d 61 6e 2d 65 63 68 6f 2e 63 6f 6d
#> [126] 22 2c 0a 20 20 20 20 22 78 2d 61 6d 7a 6e 2d 74 72 61 63 65 2d 69 64 22 3a
#> [151] 20 22 52 6f 6f 74 3d 31 2d 36 35 35 39 33 65 30 39 2d 30 31 38 63 30 61 31
#> [176] 66 36 30 34 61 32 66 64 66 31 30 37 66 65 33 61 34 22 2c 0a 20 20 20 20 22
#> [151] 20 22 52 6f 6f 74 3d 31 2d 36 35 35 65 39 62 65 63 2d 32 32 61 38 35 32 37
#> [176] 37 31 36 66 65 30 33 31 35 33 62 30 65 37 66 62 39 22 2c 0a 20 20 20 20 22
#> [201] 63 6f 6e 74 65 6e 74 2d 74 79 70 65 22 3a 20 22 61 70 70 6c 69 63 61 74 69
#> [226] 6f 6e 2f 6a 73 6f 6e 22 2c 0a 20 20 20 20 22 61 75 74 68 6f 72 69 7a 61 74
#> [251] 69 6f 6e 22 3a 20 22 42 65 61 72 65 72 20 41 50 49 4b 45 59 22 0a 20 20 7d
Expand Down Expand Up @@ -963,8 +963,8 @@ For R \>= 4.2 using the ‘Rtools42’ or ‘Rtools43’ toolchains, ‘libnng
v1.6.0 alpha (a54820f patched) and ‘libmbedtls’ v3.5.1 will be
automatically compiled from the package sources during installation.

For previous R versions, pre-compiled ‘libnng’ v1.6.0 alpha (a54820f)
and ‘libmbedtls’ v3.5.1 libraries are downloaded and used for
For previous R versions, pre-compiled ‘libnng’ v1.6.0 alpha (a54820f
patched) and ‘libmbedtls’ v3.5.1 libraries are downloaded and used for
installation instead.

[« Back to ToC](#table-of-contents)
Expand Down
6 changes: 3 additions & 3 deletions src/Makevars.win
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ else
ARC="i386"
endif

PKG_CFLAGS=-I../src-${ARC}/rwinlib-1.6.0af_3.5.1/include -DNNG_STATIC_LIB $(C_VISIBILITY)
PKG_LIBS=-L../src-${ARC}/rwinlib-1.6.0af_3.5.1/lib${R_ARCH} -lnng -lmbedtls -lmbedx509 -lmbedcrypto -lbcrypt -lws2_32
PKG_CFLAGS=-I../src-${ARC}/rwinlib-1.6.0ap_3.5.1/include -DNNG_STATIC_LIB $(C_VISIBILITY)
PKG_LIBS=-L../src-${ARC}/rwinlib-1.6.0ap_3.5.1/lib${R_ARCH} -lnng -lmbedtls -lmbedx509 -lmbedcrypto -lbcrypt -lws2_32

all: winlibs

winlibs:
curl -sL https://github.com/shikokuchuo/rwinlib/archive/refs/tags/v1.6.0af_3.5.1.zip -o nng.zip
curl -sL https://github.com/shikokuchuo/rwinlib/archive/refs/tags/v1.6.0ap_3.5.1.zip -o nng.zip
unzip -q nng.zip
rm -f nng.zip

0 comments on commit dbc1595

Please sign in to comment.