Skip to content

Commit fed3722

Browse files
authored
Auto merge of #406 - lu-zero:simpler-c-api-instructions, r=pcwalton
Simplify the cargo-c usage and generate the library as libpathfinder
2 parents 2b5c668 + 03017e9 commit fed3722

File tree

3 files changed

+5
-58
lines changed

3 files changed

+5
-58
lines changed

Cargo.lock

Lines changed: 0 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,13 @@ fixes.
9393
The C bindings use [cargo-c](https://github.com/lu-zero/cargo-c). Install `cargo-c` with
9494
`cargo install cargo-c`, and then use a command like:
9595

96-
$ cd c
97-
$ cargo cbuild --prefix=/usr/local
98-
$ cargo cinstall --prefix=/usr/local
96+
$ cargo cinstall --destdir=/tmp/pathfinder-destdir --manifest-path c/Cargo.toml
97+
$ sudo cp -a /tmp/pathfinder-destdir/* /
9998

100-
The resulting library is usable via `pkg-config` as `pathfinder_c`. For examples of use, see the
99+
The resulting library is usable via `pkg-config` as `pathfinder`. For examples of use, see the
101100
examples in the `examples/` directory beginning with `c_`.
102101

103-
`cargo-c` has a variety of other options such as `--destdir`, which may be useful for packagers.
102+
`cargo-c` has a variety of other options such as `--prefix`, which may be useful for packagers.
104103

105104
## Community
106105

c/Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ edition = "2018"
66

77
[lib]
88
crate-type = ["staticlib"]
9+
name = "pathfinder"
910

1011
[dependencies]
1112
font-kit = "0.6"
@@ -52,6 +53,3 @@ metal = "0.18"
5253

5354
[target.'cfg(target_os = "macos")'.dependencies.pathfinder_metal]
5455
path = "../metal"
55-
56-
[build-dependencies]
57-
cbindgen = "0.13"

0 commit comments

Comments
 (0)