Skip to content

Commit 599a628

Browse files
authored
Merge pull request #32 from thomcc/extended
Expose most of mimalloc API from libmimalloc-sys
2 parents d604cb6 + 8fd014e commit 599a628

File tree

8 files changed

+848
-4
lines changed

8 files changed

+848
-4
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ jobs:
5858
command: test
5959
args: --no-default-features
6060

61+
- name: Test libmimalloc-sys crate bindings.
62+
uses: actions-rs/cargo@v1
63+
with:
64+
command: run
65+
args: -p libmimalloc-sys-test
66+
6167
lint:
6268
name: Rustfmt / Clippy
6369
runs-on: ubuntu-latest
@@ -84,3 +90,36 @@ jobs:
8490
with:
8591
command: clippy
8692
args: --workspace -- -D warnings
93+
94+
# Detect cases where documentation links would be dead
95+
doc:
96+
name: Check documentation
97+
runs-on: ubuntu-latest
98+
steps:
99+
100+
- uses: actions/checkout@v2
101+
with:
102+
submodules: recursive
103+
104+
- uses: actions-rs/toolchain@v1
105+
with:
106+
profile: minimal
107+
toolchain: nightly
108+
override: true
109+
110+
# Note: We need to use nightly rust, and `cargo rustdoc` (yes, not `cargo
111+
# doc`) to actually get it to respect -D warnings... Using nightly also
112+
# gets us the nicer syntax for linking to functions, and is in-line with
113+
# what docs.rs uses.
114+
115+
- name: 'Check documentation links in `mimalloc`'
116+
uses: actions-rs/cargo@v1
117+
with:
118+
command: rustdoc
119+
args: -- -D warnings
120+
121+
- name: 'Check documentation links in `libmimalloc-sys`'
122+
uses: actions-rs/cargo@v1
123+
with:
124+
command: rustdoc
125+
args: -p libmimalloc-sys -- -D warnings

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ license = "MIT"
1414
readme = "README.md"
1515

1616
[workspace]
17-
members = ["libmimalloc-sys"]
17+
members = ["libmimalloc-sys", "libmimalloc-sys/sys-test"]
1818

1919
[badges]
2020
travis-ci = { repository = "purpleprotocol/mimalloc_rust" }

libmimalloc-sys/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,16 @@ license = "MIT"
1111
links = "mimalloc"
1212

1313
[dependencies]
14+
cty = { version = "0.2", optional = true }
1415

1516
[build-dependencies]
1617
cmake = "0.1"
1718

1819
[features]
1920
secure = []
2021
override = []
22+
extended = ["cty"]
23+
24+
# Show `extended` on docs.rs since it's the full API surface.
25+
[package.metadata.docs.rs]
26+
features = ["extended"]

0 commit comments

Comments
 (0)