diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2022-03-18 14:59:34 +0900 |
---|---|---|
committer | 坂本 貴史 <o-takashi@sakamocchi.jp> | 2022-03-18 15:15:25 +0900 |
commit | 713d6839846f2df5d35f38c76eb5c1f1193e8f0d (patch) | |
tree | 3c15da81dd5b10df5631012113da1c6378289a81 | |
parent | bdcf3ab371ea20af2c4b4e6753bbba37fd19c88e (diff) | |
download | hinawa-rs-713d6839846f2df5d35f38c76eb5c1f1193e8f0d.tar.gz |
migrate to gir v0.15
The upstream of gtk-rs/gir got changes which loses backward
compatibility. This commit follows to it so that:
* Rust language v1.57 or later (edition 2021)
* glib/gobject crate v0.15
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r-- | Makefile | 34 | ||||
-rw-r--r-- | README.rst | 21 | ||||
l--------- | generate.py | 1 | ||||
m--------- | gir | 0 | ||||
m--------- | gir-files | 0 | ||||
-rw-r--r-- | hinawa-sys/Gir.toml (renamed from conf/gir-hinawa-sys.toml) | 0 |
6 files changed, 19 insertions, 37 deletions
diff --git a/Makefile b/Makefile deleted file mode 100644 index 11c7952..0000000 --- a/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/make -f - -GIR_EXEC = gir/target/release/gir - -.PHONY: all clean test - -all: hinawa-sys hinawa - -clean: - rm -rf gir-files/Hinawa-3.0.gir - rm -rf hinawa-sys - rm -rf hinawa/src/auto hinawa/target hinawa/Cargo.lock - -gir/Cargo.toml: - git submodule update --init gir - -$(GIR_EXEC): gir/Cargo.toml - cd gir && cargo build --release - -gir-files/GLib-2.0.toml: - git submodule update --init gir-files - -gir-files/Hinawa-3.0.gir: Hinawa-3.0.gir gir-files/GLib-2.0.toml - cp Hinawa-3.0.gir gir-files/Hinawa-3.0.gir - -hinawa-sys/src: conf/gir-hinawa-sys.toml gir-files/Hinawa-3.0.gir $(GIR_EXEC) - $(GIR_EXEC) -c conf/gir-hinawa-sys.toml -d gir-files -m sys -o hinawa-sys - -hinawa-sys: hinawa-sys/src - -hinawa/src/auto: conf/gir-hinawa.toml gir-files/Hinawa-3.0.gir $(GIR_EXEC) - $(GIR_EXEC) -c conf/gir-hinawa.toml -d gir-files -m normal -o hinawa - -hinawa: hinawa-sys hinawa/src/auto @@ -2,15 +2,15 @@ hinawa Rust bindings ==================== -2021/11/17 +2022/03/17 Takashi Sakamoto Introduction ============ -* This repository includes FFI and API bindings for ``libhinawa 2`` which provides ``Hinawa-3.0.gir``. +* This repository includes FFI and API bindings for ``libhinawa2`` which provides ``Hinawa-3.0.gir``. - * https://github.com/alsa-project/libhinawa + * `<https://github.com/alsa-project/libhinawa>`_ * Unfortunately, it includes no support for ``libhinawa 1`` or former (``Hinawa-2.0.gir`` or ``Hinawa-1.0.gir``). @@ -19,6 +19,12 @@ License MIT License +Dependencies +============ + +* Rust version 1.57 or later (edition 2021) +* `libhinawa <https://github.com/alsa-project/libhinawa>`_ + Sample code =========== @@ -57,3 +63,12 @@ Read 1 quadlet from address ``0xfffff0000404`` on the node represented as ``/dev cntr.quit(); th.join().unwrap(); } + +How to generate FFI and API crates +================================== + +:: + + $ ./generator.py + +end diff --git a/generate.py b/generate.py new file mode 120000 index 0000000..09c770c --- /dev/null +++ b/generate.py @@ -0,0 +1 @@ +gir/generator.py
\ No newline at end of file diff --git a/gir b/gir -Subproject a6737c72ae70ee7a17ae4ac7729905f9bb87e4e +Subproject 78e3d3c223436bd056b312fe54d845eea8d29f2 diff --git a/gir-files b/gir-files -Subproject c31e734527636b4ace7972e1c61f8da17cc4f67 +Subproject 5ca60543e148201f01474866273c35a2c79fc6d diff --git a/conf/gir-hinawa-sys.toml b/hinawa-sys/Gir.toml index 8364af6..8364af6 100644 --- a/conf/gir-hinawa-sys.toml +++ b/hinawa-sys/Gir.toml |