-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(capi): Move CAPI generation to its own crate (#234)
* refactor(capi): Move CAPI generation to its own crate * reduce Biscuit visibility * remove capi.rs * add `print_block_source` c binding * add test for `biscuit_print_block_source` + use `inttypes.h` macros for handling cross-platform `uint64_t` type * remove `block()` usage and C-API usage
- Loading branch information
1 parent
bf2f22a
commit 4e6b2c8
Showing
13 changed files
with
425 additions
and
357 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
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 @@ | ||
[workspace] | ||
members = ["biscuit-auth", "biscuit-quote", "biscuit-parser"] | ||
members = ["biscuit-auth", "biscuit-quote", "biscuit-parser", "biscuit-capi"] |
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
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
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,30 @@ | ||
[package] | ||
name = "biscuit-capi" | ||
version = "5.0.0" # Should keep the same version as biscuit-auth | ||
description = "C API for Biscuit" | ||
authors = ["Geoffroy Couprie <contact@geoffroycouprie.com>"] | ||
edition = "2018" | ||
license = "Apache-2.0" | ||
documentation = "https://docs.rs/biscuit-auth" | ||
homepage = "https://github.com/biscuit-auth/biscuit" | ||
repository = "https://github.com/biscuit-auth/biscuit-rust" | ||
|
||
[dependencies] | ||
biscuit-auth = { version = "5.0.0", path = "../biscuit-auth", features = [ | ||
"datalog-macro", | ||
"serde-error", | ||
] } | ||
inline-c = { version = "0.1", optional = true } | ||
rand = "0.8" | ||
|
||
[features] | ||
default = [] | ||
capi = ["inline-c"] | ||
|
||
[package.metadata.capi.library] | ||
# Used as the library name and defaults to the crate name. This might get | ||
# prefixed with `lib` depending on the target platform. | ||
name = "biscuit_auth" | ||
|
||
[package.metadata.capi.header] | ||
name = "biscuit_auth" |
Oops, something went wrong.