-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8861f9a
commit 3ae1581
Showing
22 changed files
with
2,910 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
/target | ||
/Cargo.lock | ||
target | ||
Cargo.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# C API for hyper | ||
|
||
This provides auxiliary pieces for a C API to use the hyper library. | ||
|
||
## Unstable | ||
|
||
The C API of hyper is currently **unstable**, which means it's not part of the semver contract as the rest of the Rust API is. | ||
|
||
Because of that, it's only accessible if `--cfg hyper_unstable_ffi` is passed to `rustc` when compiling. The easiest way to do that is setting the `RUSTFLAGS` environment variable. | ||
|
||
## Building | ||
|
||
The C API is part of the Rust library, but isn't compiled by default. Using `cargo`, it can be compiled with the following command: | ||
|
||
``` | ||
RUSTFLAGS="--cfg hyper_unstable_ffi" cargo build --features client,http1,http2,ffi | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
language = "C" | ||
include_guard = "_HYPER_H" | ||
no_includes = true | ||
sys_includes = ["stdint.h", "stddef.h"] | ||
cpp_compat = true | ||
documentation_style = "c" | ||
|
||
[parse.expand] | ||
crates = ["hyper-capi"] | ||
|
||
[export.rename] | ||
"Exec" = "hyper_executor" | ||
"Io" = "hyper_io" | ||
"Task" = "hyper_task" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# | ||
# Build the example client | ||
# | ||
|
||
TARGET = client | ||
|
||
OBJS = client.o | ||
|
||
RPATH=$(PWD)/../../target/debug | ||
CFLAGS = -I../include | ||
LDFLAGS = -L$(RPATH) -Wl,-rpath,$(RPATH) | ||
LIBS = -lhyper | ||
|
||
$(TARGET): $(OBJS) | ||
$(CC) -o $(TARGET) $(OBJS) $(LDFLAGS) $(LIBS) | ||
|
||
upload: upload.o | ||
$(CC) -o upload upload.o $(LDFLAGS) $(LIBS) | ||
|
||
clean: | ||
rm -f $(OBJS) $(TARGET) | ||
rm -f upload upload.o |
Oops, something went wrong.
src/programs/tokenManager/utils.ts