Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace cbindgen with cargo-c #343

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions c/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[package]
name = "pathfinder_c"
name = "pathfinder"
version = "0.1.0"
authors = ["Patrick Walton <[email protected]>"]
edition = "2018"
build = "build.rs"

[lib]
crate-type = ["staticlib"]
Expand Down Expand Up @@ -47,6 +46,3 @@ metal = "0.17"

[target.'cfg(target_os = "macos")'.dependencies.pathfinder_metal]
path = "../metal"

[build-dependencies]
cbindgen = "0.13"
27 changes: 27 additions & 0 deletions c/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Pathfinder C bindings

To generate these bindings, you first need to install [cargo-c](https://crates.io/crates/cargo-c).

* On ArchLinux:
```
# pacman -S cargo-c
```
* Anywhere else:
```
$ cargo install cargo-c
```

Now you can generate the C header, library and pkg-config file, and install them for your user using this command:
```
$ cargo cinstall --prefix=$HOME/.local
```

Or if you want to install it system-wide:
```
# cargo cinstall --prefix=/usr/local
```

Another option, for packagers, is to install it to a temporary directory then put its content in a package:
```
$ cargo cinstall --prefix=/usr --destdir=$XDG_RUNTIME_DIR/staging
```
20 changes: 0 additions & 20 deletions c/build.rs

This file was deleted.