Skip to content

Commit

Permalink
bump to 3.0.0
Browse files Browse the repository at this point in the history
- update readme to clarify versioning & fix #13.
- fix compilation error.
  • Loading branch information
joseluis committed Dec 2, 2021
1 parent 2acee18 commit 5d7cc1b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "libnotcurses-sys"
version = "2.4.8"
version = "3.0.0"
authors = [
"nick black <dankamongmen@gmail.com>",
"José Luis Cruz <joseluis@andamira.net>"
Expand Down
23 changes: 10 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,23 @@
[notcurses C library](https://www.github.com/dankamongmen/notcurses/)

It is built with several layers of zero-overhead abstractions
over the C functions and pointers accessed through FFI.
over the C functions and pointers, accessed through FFI.

It adds greater safety and type correctness over the underlying C library API,
while trying to remain very close to it.

```
notcurses : C library
libnotcurses-sys ← : C⇄Rust bridge library *(you are here)*
notcurses-rs : Rust library
```
## Versioning

## Versioning & compatibility
Current libnotcurses-sys **`3.0.0`** is compatible with notcurses API **`3.0.0`**.

Current major version 2 is not following semver.
Both project's version number are independent from each other. Historically,
version *1* and *2* of this library didn't follow semver, but was tied to the
API version, never enjoying a major version *0* for exploratory development.

Major next version 3 will follow semver with the caveat of being considered a
development version similar as if it were a major version 0.
This is why version **3** is following semver as if it were major version *0*.

Each release will indicate the compatibility with a specific version of the
notcurses C API library.
This means a rapid pace of development of the API, while any breaking changes
happening wont be reflected by a major version bump.

## Example

Expand Down Expand Up @@ -58,7 +55,7 @@ For the types that don't allocate, most are based on primitives like `i32`,
`u32`, `u64`… without a name in the C library. In Rust they are type aliased
(e.g.: `NcChannel`, `NcChannelPair`, `NcRgb`, `NcColor`…), to
leverage type checking, and they implement methods through traits
(e.g. `NcChannelMethods` must be in scope to use the `NcChannel` methods.
(e.g. `NcChannelApi` must be in scope to use the `NcChannel` methods.

## Official C API docs

Expand Down
2 changes: 1 addition & 1 deletion build/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::path::PathBuf;

fn main() {
let plib = pkg_config::Config::new()
.atleast_version("2.4.8")
.atleast_version("3.0.0")
.probe("notcurses")
.unwrap();

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub use macros::*;
pub use notcurses::{Nc, NcOptions};
pub use palette::{NcPalette, NcPaletteIndex};
pub use pixel::{NcPixel, NcPixelApi, NcPixelGeometry, NcPixelImpl, NcPixelImplApi};
pub use plane::{NcPlane, NcPlaneBuilder, NcPlaneOptions, NcPlaneOptionsBuilder};
pub use plane::{NcPlane, NcPlaneOptions, NcPlaneOptionsBuilder};
pub use r#box::{NcBoxMask, NcBoxMaskApi};
pub use resizecb::{NcResizeCb, NcResizeCbApi, NcResizeCbUnsafe};
pub use scale::{NcScale, NcScaleApi};
Expand Down
7 changes: 1 addition & 6 deletions src/plane/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@ use crate::{
c_api, cstring, error, error_ref, error_ref_mut, rstring_free, Nc, NcAlign, NcAlpha, NcBlitter,
NcBoxMask, NcCell, NcChannel, NcChannels, NcComponent, NcDim, NcError, NcFadeCb, NcFile,
NcIntResult, NcIntResultApi, NcOffset, NcPaletteIndex, NcPixelGeometry, NcPlane,
NcPlaneBuilder, NcPlaneOptions, NcResizeCb, NcResult, NcRgb, NcRgba, NcStyle, NcTime,
NcPlaneOptions, NcResizeCb, NcResult, NcRgb, NcRgba, NcStyle, NcTime,
};

/// # NcPlane constructors & destructors
impl NcPlane {
/// Returns a builder object for `NcPlane`.
pub fn builder<'nc, 'parent>() -> NcPlaneBuilder<'nc, 'parent> {
NcPlaneBuilder::default()
}

/// Creates a new `NcPlane` child of `parent` plane.
///
/// Will be placed at the offset `y`×`x` (relative to the origin of `parent`)
Expand Down

0 comments on commit 5d7cc1b

Please sign in to comment.