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

Use Rust 1.77 C-string literals #40

Merged
merged 1 commit into from
Jul 3, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
ci:
strategy:
matrix:
rust: [stable, 1.64.0]
rust: [stable, 1.77.0]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"fontconfig-sys",
"fontconfig"
Expand Down
7 changes: 3 additions & 4 deletions fontconfig-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "yeslogic-fontconfig-sys"
version = "5.0.0"
edition = "2018"
rust-version = "1.64"
version = "6.0.0"
edition = "2021"
rust-version = "1.77"
authors = [
"Austin Bonander <[email protected]>",
"The Servo Project Developers",
Expand All @@ -24,7 +24,6 @@ links = "fontconfig"
name = "fontconfig_sys"

[dependencies]
cstr = "0.2.11"
dlib = "0.5.0"
# This can't be optional because build.rs can't conditionally enable an
# optional dependency:
Expand Down
118 changes: 58 additions & 60 deletions fontconfig-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ pub type FcType = enum__FcType;
pub mod constants {
use std::ffi::CStr;

use cstr::cstr;

use super::c_int;

pub const FC_WEIGHT_THIN: c_int = 0;
Expand Down Expand Up @@ -114,64 +112,64 @@ pub mod constants {
pub const FC_CHARSET_DONE: u32 = u32::MAX;
pub const FC_UTF8_MAX_LEN: c_int = 6;

pub const FC_FAMILY: &CStr = cstr!("family");
pub const FC_STYLE: &CStr = cstr!("style");
pub const FC_SLANT: &CStr = cstr!("slant");
pub const FC_WEIGHT: &CStr = cstr!("weight");
pub const FC_SIZE: &CStr = cstr!("size");
pub const FC_ASPECT: &CStr = cstr!("aspect");
pub const FC_PIXEL_SIZE: &CStr = cstr!("pixelsize");
pub const FC_SPACING: &CStr = cstr!("spacing");
pub const FC_FOUNDRY: &CStr = cstr!("foundry");
pub const FC_ANTIALIAS: &CStr = cstr!("antialias");
pub const FC_HINTING: &CStr = cstr!("hinting");
pub const FC_HINT_STYLE: &CStr = cstr!("hintstyle");
pub const FC_VERTICAL_LAYOUT: &CStr = cstr!("verticallayout");
pub const FC_AUTOHINT: &CStr = cstr!("autohint");
pub const FC_GLOBAL_ADVANCE: &CStr = cstr!("globaladvance");
pub const FC_WIDTH: &CStr = cstr!("width");
pub const FC_FILE: &CStr = cstr!("file");
pub const FC_INDEX: &CStr = cstr!("index");
pub const FC_FT_FACE: &CStr = cstr!("ftface");
pub const FC_RASTERIZER: &CStr = cstr!("rasterizer");
pub const FC_OUTLINE: &CStr = cstr!("outline");
pub const FC_SCALABLE: &CStr = cstr!("scalable");
pub const FC_COLOR: &CStr = cstr!("color");
pub const FC_VARIABLE: &CStr = cstr!("variable");
pub const FC_SCALE: &CStr = cstr!("scale");
pub const FC_SYMBOL: &CStr = cstr!("symbol");
pub const FC_DPI: &CStr = cstr!("dpi");
pub const FC_RGBA: &CStr = cstr!("rgba");
pub const FC_MINSPACE: &CStr = cstr!("minspace");
pub const FC_SOURCE: &CStr = cstr!("source");
pub const FC_CHARSET: &CStr = cstr!("charset");
pub const FC_LANG: &CStr = cstr!("lang");
pub const FC_FONTVERSION: &CStr = cstr!("fontversion");
pub const FC_FULLNAME: &CStr = cstr!("fullname");
pub const FC_FAMILYLANG: &CStr = cstr!("familylang");
pub const FC_STYLELANG: &CStr = cstr!("stylelang");
pub const FC_FULLNAMELANG: &CStr = cstr!("fullnamelang");
pub const FC_CAPABILITY: &CStr = cstr!("capability");
pub const FC_FONTFORMAT: &CStr = cstr!("fontformat");
pub const FC_EMBOLDEN: &CStr = cstr!("embolden");
pub const FC_EMBEDDED_BITMAP: &CStr = cstr!("embeddedbitmap");
pub const FC_DECORATIVE: &CStr = cstr!("decorative");
pub const FC_LCD_FILTER: &CStr = cstr!("lcdfilter");
pub const FC_FONT_FEATURES: &CStr = cstr!("fontfeatures");
pub const FC_FONT_VARIATIONS: &CStr = cstr!("fontvariations");
pub const FC_NAMELANG: &CStr = cstr!("namelang");
pub const FC_PRGNAME: &CStr = cstr!("prgname");
pub const FC_HASH: &CStr = cstr!("hash");
pub const FC_POSTSCRIPT_NAME: &CStr = cstr!("postscriptname");
pub const FC_FONT_HAS_HINT: &CStr = cstr!("fonthashint");
pub const FC_CACHE_SUFFIX: &CStr = cstr!(".cache-");
pub const FC_DIR_CACHE_FILE: &CStr = cstr!("fonts.cache-");
pub const FC_USER_CACHE_FILE: &CStr = cstr!(".fonts.cache-");
pub const FC_CHARWIDTH: &CStr = cstr!("charwidth");
pub const FC_CHAR_WIDTH: &CStr = cstr!("charwidth");
pub const FC_CHAR_HEIGHT: &CStr = cstr!("charheight");
pub const FC_MATRIX: &CStr = cstr!("matrix");
pub const FC_ORDER: &CStr = cstr!("order");
pub const FC_FAMILY: &CStr = c"family";
pub const FC_STYLE: &CStr = c"style";
pub const FC_SLANT: &CStr = c"slant";
pub const FC_WEIGHT: &CStr = c"weight";
pub const FC_SIZE: &CStr = c"size";
pub const FC_ASPECT: &CStr = c"aspect";
pub const FC_PIXEL_SIZE: &CStr = c"pixelsize";
pub const FC_SPACING: &CStr = c"spacing";
pub const FC_FOUNDRY: &CStr = c"foundry";
pub const FC_ANTIALIAS: &CStr = c"antialias";
pub const FC_HINTING: &CStr = c"hinting";
pub const FC_HINT_STYLE: &CStr = c"hintstyle";
pub const FC_VERTICAL_LAYOUT: &CStr = c"verticallayout";
pub const FC_AUTOHINT: &CStr = c"autohint";
pub const FC_GLOBAL_ADVANCE: &CStr = c"globaladvance";
pub const FC_WIDTH: &CStr = c"width";
pub const FC_FILE: &CStr = c"file";
pub const FC_INDEX: &CStr = c"index";
pub const FC_FT_FACE: &CStr = c"ftface";
pub const FC_RASTERIZER: &CStr = c"rasterizer";
pub const FC_OUTLINE: &CStr = c"outline";
pub const FC_SCALABLE: &CStr = c"scalable";
pub const FC_COLOR: &CStr = c"color";
pub const FC_VARIABLE: &CStr = c"variable";
pub const FC_SCALE: &CStr = c"scale";
pub const FC_SYMBOL: &CStr = c"symbol";
pub const FC_DPI: &CStr = c"dpi";
pub const FC_RGBA: &CStr = c"rgba";
pub const FC_MINSPACE: &CStr = c"minspace";
pub const FC_SOURCE: &CStr = c"source";
pub const FC_CHARSET: &CStr = c"charset";
pub const FC_LANG: &CStr = c"lang";
pub const FC_FONTVERSION: &CStr = c"fontversion";
pub const FC_FULLNAME: &CStr = c"fullname";
pub const FC_FAMILYLANG: &CStr = c"familylang";
pub const FC_STYLELANG: &CStr = c"stylelang";
pub const FC_FULLNAMELANG: &CStr = c"fullnamelang";
pub const FC_CAPABILITY: &CStr = c"capability";
pub const FC_FONTFORMAT: &CStr = c"fontformat";
pub const FC_EMBOLDEN: &CStr = c"embolden";
pub const FC_EMBEDDED_BITMAP: &CStr = c"embeddedbitmap";
pub const FC_DECORATIVE: &CStr = c"decorative";
pub const FC_LCD_FILTER: &CStr = c"lcdfilter";
pub const FC_FONT_FEATURES: &CStr = c"fontfeatures";
pub const FC_FONT_VARIATIONS: &CStr = c"fontvariations";
pub const FC_NAMELANG: &CStr = c"namelang";
pub const FC_PRGNAME: &CStr = c"prgname";
pub const FC_HASH: &CStr = c"hash";
pub const FC_POSTSCRIPT_NAME: &CStr = c"postscriptname";
pub const FC_FONT_HAS_HINT: &CStr = c"fonthashint";
pub const FC_CACHE_SUFFIX: &CStr = c".cache-";
pub const FC_DIR_CACHE_FILE: &CStr = c"fonts.cache-";
pub const FC_USER_CACHE_FILE: &CStr = c".fonts.cache-";
pub const FC_CHARWIDTH: &CStr = c"charwidth";
pub const FC_CHAR_WIDTH: &CStr = c"charwidth";
pub const FC_CHAR_HEIGHT: &CStr = c"charheight";
pub const FC_MATRIX: &CStr = c"matrix";
pub const FC_ORDER: &CStr = c"order";
}

#[repr(C)]
Expand Down
6 changes: 3 additions & 3 deletions fontconfig/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "fontconfig"
version = "0.8.0"
edition = "2018"
rust-version = "1.64"
edition = "2021"
rust-version = "1.77"
authors = [
"Austin Bonander <[email protected]>",
"Manuel Reinhardt <[email protected]>",
Expand All @@ -19,7 +19,7 @@ documentation = "https://docs.rs/crate/fontconfig"
repository = "https://github.com/yeslogic/fontconfig-rs"

[dependencies.yeslogic-fontconfig-sys]
version = "5.0.0"
version = "6.0.0"
path = "../fontconfig-sys"

[features]
Expand Down
Loading