Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
trevyn committed Jan 28, 2024
1 parent 0f4c3be commit 8fb1288
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Changelog

## 0.2.0 - 2024-01-28

- Use the `links` key and `cargo:include` to communicate the include path to the dependent crate, simplifying usage. [(cargo reference doc)](https://doc.rust-lang.org/cargo/reference/build-script-examples.html#using-another-sys-crate)

## 0.1.0 - 2024-01-09

- Initial release
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
description = "The parts of OpenBSD libc that make sense on wasm32-unknown-unknown."
edition = "2018"
keywords = ["libc", "wasm32-unknown-unknown"]
keywords = ["libc"]
license = "BSD-3-Clause AND ISC AND MIT"
links = "wasm32-unknown-unknown-openbsd-libc"
name = "wasm32-unknown-unknown-openbsd-libc"
repository = "https://github.com/trevyn/wasm32-unknown-unknown-openbsd-libc"
version = "0.1.0"
version = "0.2.0"

[build-dependencies]
cc = "1"
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,14 @@ A small chunk of OpenBSD's libc, conveniently packaged as a Rust crate.
Created for compiling C code that relies on a reasonable subset of libc to `wasm32-unknown-unknown`.

```toml
[dependencies]
wasm32-unknown-unknown-openbsd-libc = "0.1"

[build-dependencies]
wasm32-unknown-unknown-openbsd-libc = "0.1"
[target.wasm32-unknown-unknown.dependencies]
wasm32-unknown-unknown-openbsd-libc = "0.2"
```

In your `build.rs` using `cc`:

```rust
cfg.includes(wasm32_unknown_unknown_openbsd_libc::includes());
cfg.include(std::env::var_os("DEP_WASM32_UNKNOWN_UNKNOWN_OPENBSD_LIBC_INCLUDE").unwrap());

println!("cargo:rustc-link-lib=wasm32-unknown-unknown-openbsd-libc");
```

0 comments on commit 8fb1288

Please sign in to comment.