Skip to content

Commit

Permalink
Bump bindgen and dependencies (#677)
Browse files Browse the repository at this point in the history
* Bump bindgen and dependencies

* Update nix
  • Loading branch information
Riey authored Jul 30, 2024
1 parent 01eefe4 commit bc4f64d
Show file tree
Hide file tree
Showing 11 changed files with 1,105 additions and 794 deletions.
1,832 changes: 1,062 additions & 770 deletions Cargo.lock

Large diffs are not rendered by default.

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 = [
"src/engine/capi",
"src/engine/candidate",
Expand Down
6 changes: 3 additions & 3 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let
testArgs = if debug then "" else "--release";
in
with pkgs;
llvmPackages_14.stdenv.mkDerivation rec {
llvmPackages_18.stdenv.mkDerivation rec {
name = "kime";
src = ./.;
buildInputs = deps.kimeBuildInputs;
Expand All @@ -17,9 +17,9 @@ llvmPackages_14.stdenv.mkDerivation rec {
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
#sha256 = "0000000000000000000000000000000000000000000000000000";
sha256 = "sha256-/o9b7YvrpV+IujkllFWAz6Mg4CbS9BInF8antfZ0Vsw=";
sha256 = "sha256-hlTxyaE/300CBGIJtFzIh6CT5PcmmqWt8CN428sr2U8=";
};
LIBCLANG_PATH = "${pkgs.llvmPackages_14.libclang.lib}/lib";
LIBCLANG_PATH = "${pkgs.llvmPackages_18.libclang.lib}/lib";
dontUseCmakeConfigure = true;
dontWrapQtApps = true;
buildPhase = if debug then "bash scripts/build.sh -ad" else "bash scripts/build.sh -ar";
Expand Down
30 changes: 24 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
description = "A very basic flake";
description = "Korean IME";

inputs = {
nixpkgs.url = github:NixOS/nixpkgs;
Expand Down
6 changes: 3 additions & 3 deletions nix/deps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ with pkgs;
kimeNativeBuildInputs = [
python3 # xcb 0.9.0
pkg-config
llvmPackages_14.clang
llvmPackages_14.libclang.lib
llvmPackages_14.bintools
llvmPackages_18.clang
llvmPackages_18.libclang.lib
llvmPackages_18.bintools
rustc cargo
cmake
extra-cmake-modules
Expand Down
8 changes: 4 additions & 4 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
}:
let
deps = import ./nix/deps.nix { pkgs = pkgs; };
stdenv = pkgs.llvmPackages_14.stdenv;
stdenv = pkgs.llvmPackages_18.stdenv;
mkShell = (pkgs.mkShell.override { stdenv = stdenv; });
in
mkShell {
Expand All @@ -13,11 +13,11 @@ mkShell {
buildInputs = deps.kimeBuildInputs;
nativeBuildInputs = deps.kimeNativeBuildInputs ++ (with pkgs; [
rustfmt
gnome.gedit
llvmPackages_14.lldb
pkgs.gedit
llvmPackages_18.lldb
]);
CMAKE_EXPORT_COMPILE_COMMANDS = 1;
LIBCLANG_PATH = "${pkgs.llvmPackages_14.libclang.lib}/lib";
LIBCLANG_PATH = "${pkgs.llvmPackages_18.libclang.lib}/lib";
LD_LIBRARY_PATH = "./target/debug:${pkgs.wayland}/lib:${pkgs.libGL}/lib:${pkgs.libxkbcommon}/lib";
G_MESSAGES_DEBUG = "kime";
GTK_IM_MODULE = "kime";
Expand Down
2 changes: 1 addition & 1 deletion src/engine/backends/hangul/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub use layout::Layout;
pub use state::HangulEngine;

#[derive(Hash, Serialize, Deserialize, Debug, EnumSetType)]
#[enumset(serialize_as_list)]
#[enumset(serialize_repr = "list")]
pub enum Addon {
ComposeChoseongSsang,
ComposeJungseongSsang,
Expand Down
4 changes: 2 additions & 2 deletions src/engine/cffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ kime-engine-capi = { path = "../capi" }
kime-engine-config = { path = "../config" }

[build-dependencies]
bindgen = { version = "0.63", default-features = false }
cbindgen = { version = "0.24", default-features = false }
bindgen = { version = "0.69.4", default-features = false }
cbindgen = { version = "0.26.0", default-features = false }
2 changes: 1 addition & 1 deletion src/engine/cffi/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn main() {
.allowlist_var("kime::.+")
.allowlist_type("kime::.+")
.allowlist_function("kime::.+")
.parse_callbacks(Box::new(bindgen::CargoCallbacks))
.parse_callbacks(Box::new(bindgen::CargoCallbacks::new()))
.generate()
.unwrap();

Expand Down
6 changes: 3 additions & 3 deletions src/engine/config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ pub use log::LevelFilter;

#[derive(Debug, EnumSetType, Enum, PartialOrd, Ord)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", enumset(serialize_as_list))]
#[cfg_attr(feature = "serde", enumset(serialize_repr = "list"))]
#[repr(u32)]
pub enum InputCategory {
Latin,
Expand All @@ -25,7 +25,7 @@ pub enum InputCategory {

#[derive(Debug, EnumSetType, Enum, PartialOrd, Ord)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", enumset(serialize_as_list))]
#[cfg_attr(feature = "serde", enumset(serialize_repr = "list"))]
#[repr(u32)]
pub enum InputMode {
Math,
Expand Down Expand Up @@ -93,7 +93,7 @@ impl Default for IconColor {

#[derive(EnumSetType)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde", enumset(serialize_as_list))]
#[cfg_attr(feature = "serde", enumset(serialize_repr = "list"))]
pub enum DaemonModule {
Xim,
Wayland,
Expand Down

0 comments on commit bc4f64d

Please sign in to comment.