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

Rust support for kirkstone @ 2024.10.0 #42

Draft
wants to merge 2 commits into
base: kirkstone
Choose a base branch
from
Draft
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
29 changes: 29 additions & 0 deletions recipes-backports/cxxbrige-cmd/cxxbridge-cmd_1.0.110.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"

SRC_URI = " crate://crates.io/anstyle/1.0.4 \
crate://crates.io/clap/4.4.7 \
crate://crates.io/clap_builder/4.4.7 \
crate://crates.io/clap_lex/0.6.0 \
crate://crates.io/codespan-reporting/0.11.1 \
crate://crates.io/cxxbridge-cmd/1.0.110 \
crate://crates.io/proc-macro2/1.0.69 \
crate://crates.io/quote/1.0.33 \
crate://crates.io/strsim/0.10.0 \
crate://crates.io/syn/2.0.38 \
crate://crates.io/termcolor/1.3.0 \
crate://crates.io/unicode-ident/1.0.12 \
crate://crates.io/unicode-width/0.1.11 \
crate://crates.io/winapi/0.3.9 \
crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \
crate://crates.io/winapi-util/0.1.6 \
crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \
"

inherit cargo

S = "${WORKDIR}/cxxbridge-cmd-1.0.110"

CARGO_SRC_DIR = ""

BBCLASSEXTEND = "native"
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"

SRC_URI = "git://github.com/EVerest/everest-utils.git;branch=main;protocol=https"

SRCREV = "dc09ddf8b21987311eaaf53e9a8f2f35e7974a49"
SRCREV = "8ca7ba7e6776c50514ec97dcf304acccbdb7f466"

S = "${WORKDIR}/git"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"

SRC_URI = "git://github.com/EVerest/everest-cmake.git;branch=main;protocol=https"

SRCREV = "4805f09542e58f4d17202277527d6326fbcd27c3"
SRCREV = "6ac5e03f226b5545d72ca16f3faa4984461e30f6"

S = "${WORKDIR}/git"

Expand Down
200 changes: 200 additions & 0 deletions recipes-core/everest/everest-core-rust-crates.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
SRC_URI += " \
crate://crates.io/addr2line/0.21.0 \
crate://crates.io/adler/1.0.2 \
crate://crates.io/aho-corasick/1.1.2 \
crate://crates.io/android-tzdata/0.1.1 \
crate://crates.io/android_system_properties/0.1.5 \
crate://crates.io/anstyle/1.0.6 \
crate://crates.io/anyhow/1.0.75 \
crate://crates.io/argh/0.1.12 \
crate://crates.io/argh_derive/0.1.12 \
crate://crates.io/argh_shared/0.1.12 \
crate://crates.io/async-stream/0.3.5 \
crate://crates.io/async-stream-impl/0.3.5 \
crate://crates.io/async-trait/0.1.78 \
crate://crates.io/autocfg/1.1.0 \
crate://crates.io/axum/0.6.20 \
crate://crates.io/axum-core/0.3.4 \
crate://crates.io/backtrace/0.3.69 \
crate://crates.io/base64/0.13.1 \
crate://crates.io/bitflags/1.3.2 \
crate://crates.io/bumpalo/3.15.3 \
crate://crates.io/bytes/1.5.0 \
crate://crates.io/cc/1.0.83 \
crate://crates.io/cfg-if/1.0.0 \
crate://crates.io/chrono/0.4.35 \
crate://crates.io/convert_case/0.6.0 \
crate://crates.io/core-foundation-sys/0.8.6 \
crate://crates.io/cxx/1.0.110 \
crate://crates.io/cxxbridge-flags/1.0.110 \
crate://crates.io/cxxbridge-macro/1.0.110 \
crate://crates.io/data-encoding/2.5.0 \
crate://crates.io/deranged/0.3.11 \
crate://crates.io/difflib/0.4.0 \
crate://crates.io/downcast/0.11.0 \
crate://crates.io/either/1.10.0 \
crate://crates.io/endian-type/0.1.2 \
crate://crates.io/enum-as-inner/0.6.0 \
crate://crates.io/env_logger/0.10.2 \
crate://crates.io/equivalent/1.0.1 \
crate://crates.io/float-cmp/0.9.0 \
crate://crates.io/fnv/1.0.7 \
crate://crates.io/form_urlencoded/1.2.1 \
crate://crates.io/fragile/2.0.0 \
crate://crates.io/futures/0.3.30 \
crate://crates.io/futures-channel/0.3.30 \
crate://crates.io/futures-core/0.3.30 \
crate://crates.io/futures-executor/0.3.30 \
crate://crates.io/futures-io/0.3.30 \
crate://crates.io/futures-macro/0.3.30 \
crate://crates.io/futures-sink/0.3.30 \
crate://crates.io/futures-task/0.3.30 \
crate://crates.io/futures-util/0.3.30 \
crate://crates.io/getrandom/0.2.12 \
crate://crates.io/gimli/0.28.1 \
crate://crates.io/h2/0.3.25 \
crate://crates.io/hashbrown/0.12.3 \
crate://crates.io/hashbrown/0.14.3 \
crate://crates.io/heck/0.4.1 \
crate://crates.io/hermit-abi/0.3.9 \
crate://crates.io/hex/0.4.3 \
crate://crates.io/http/0.2.12 \
crate://crates.io/http-body/0.4.6 \
crate://crates.io/httparse/1.8.0 \
crate://crates.io/httpdate/1.0.3 \
crate://crates.io/humantime/2.1.0 \
crate://crates.io/hyper/0.14.28 \
crate://crates.io/hyper-timeout/0.4.1 \
crate://crates.io/iana-time-zone/0.1.60 \
crate://crates.io/iana-time-zone-haiku/0.1.2 \
crate://crates.io/idna/0.4.0 \
crate://crates.io/idna/0.5.0 \
crate://crates.io/indexmap/1.9.3 \
crate://crates.io/indexmap/2.1.0 \
crate://crates.io/ipnet/2.9.0 \
crate://crates.io/is-terminal/0.4.12 \
crate://crates.io/itertools/0.10.5 \
crate://crates.io/itoa/1.0.9 \
crate://crates.io/js-sys/0.3.69 \
crate://crates.io/lazy_static/1.4.0 \
crate://crates.io/libc/0.2.150 \
crate://crates.io/link-cplusplus/1.0.9 \
crate://crates.io/log/0.4.20 \
crate://crates.io/matchit/0.7.3 \
crate://crates.io/memchr/2.7.1 \
crate://crates.io/mime/0.3.17 \
crate://crates.io/minijinja/1.0.10 \
crate://crates.io/miniz_oxide/0.7.2 \
crate://crates.io/mio/0.8.11 \
crate://crates.io/mockall/0.11.4 \
crate://crates.io/mockall/0.12.1 \
crate://crates.io/mockall_derive/0.11.4 \
crate://crates.io/mockall_derive/0.12.1 \
crate://crates.io/mockall_double/0.3.1 \
crate://crates.io/nibble_vec/0.1.0 \
crate://crates.io/normalize-line-endings/0.3.0 \
crate://crates.io/num-conv/0.1.0 \
crate://crates.io/num-derive/0.4.2 \
crate://crates.io/num-traits/0.2.18 \
crate://crates.io/num_cpus/1.16.0 \
crate://crates.io/object/0.32.2 \
crate://crates.io/once_cell/1.19.0 \
crate://crates.io/percent-encoding/2.3.1 \
crate://crates.io/pin-project/1.1.5 \
crate://crates.io/pin-project-internal/1.1.5 \
crate://crates.io/pin-project-lite/0.2.13 \
crate://crates.io/pin-utils/0.1.0 \
crate://crates.io/powerfmt/0.2.0 \
crate://crates.io/ppv-lite86/0.2.17 \
crate://crates.io/predicates/2.1.5 \
crate://crates.io/predicates/3.1.0 \
crate://crates.io/predicates-core/1.0.6 \
crate://crates.io/predicates-tree/1.0.9 \
crate://crates.io/pretty-hex/0.4.1 \
crate://crates.io/proc-macro2/1.0.79 \
crate://crates.io/prost/0.11.9 \
crate://crates.io/prost-derive/0.11.9 \
crate://crates.io/quote/1.0.35 \
crate://crates.io/radix_trie/0.2.1 \
crate://crates.io/rand/0.8.5 \
crate://crates.io/rand_chacha/0.3.1 \
crate://crates.io/rand_core/0.6.4 \
crate://crates.io/regex/1.10.3 \
crate://crates.io/regex-automata/0.4.6 \
crate://crates.io/regex-syntax/0.8.2 \
crate://crates.io/rustc-demangle/0.1.23 \
crate://crates.io/rustversion/1.0.14 \
crate://crates.io/ryu/1.0.15 \
crate://crates.io/serde/1.0.193 \
crate://crates.io/serde_derive/1.0.193 \
crate://crates.io/serde_json/1.0.108 \
crate://crates.io/serde_yaml/0.9.27 \
crate://crates.io/slab/0.4.9 \
crate://crates.io/smallvec/1.13.1 \
crate://crates.io/socket2/0.5.6 \
crate://crates.io/syn/1.0.109 \
crate://crates.io/syn/2.0.53 \
crate://crates.io/sync_wrapper/0.1.2 \
crate://crates.io/termcolor/1.4.1 \
crate://crates.io/termtree/0.4.1 \
crate://crates.io/thiserror/1.0.50 \
crate://crates.io/thiserror-impl/1.0.50 \
crate://crates.io/time/0.3.34 \
crate://crates.io/time-core/0.1.2 \
crate://crates.io/time-macros/0.2.17 \
crate://crates.io/tinyvec/1.6.0 \
crate://crates.io/tinyvec_macros/0.1.1 \
crate://crates.io/tokio/1.36.0 \
crate://crates.io/tokio-io-timeout/1.2.0 \
crate://crates.io/tokio-macros/2.2.0 \
crate://crates.io/tokio-stream/0.1.15 \
crate://crates.io/tokio-util/0.7.10 \
crate://crates.io/tonic/0.8.3 \
crate://crates.io/tower/0.4.13 \
crate://crates.io/tower-layer/0.3.2 \
crate://crates.io/tower-service/0.3.2 \
crate://crates.io/tracing/0.1.40 \
crate://crates.io/tracing-attributes/0.1.27 \
crate://crates.io/tracing-core/0.1.32 \
crate://crates.io/tracing-futures/0.2.5 \
crate://crates.io/trust-dns-client/0.23.2 \
crate://crates.io/trust-dns-proto/0.23.2 \
crate://crates.io/try-lock/0.2.5 \
crate://crates.io/unicode-bidi/0.3.15 \
crate://crates.io/unicode-ident/1.0.12 \
crate://crates.io/unicode-normalization/0.1.23 \
crate://crates.io/unicode-segmentation/1.10.1 \
crate://crates.io/unsafe-libyaml/0.2.9 \
crate://crates.io/url/2.5.0 \
crate://crates.io/want/0.3.1 \
crate://crates.io/wasi/0.11.0+wasi-snapshot-preview1 \
crate://crates.io/wasm-bindgen/0.2.92 \
crate://crates.io/wasm-bindgen-backend/0.2.92 \
crate://crates.io/wasm-bindgen-macro/0.2.92 \
crate://crates.io/wasm-bindgen-macro-support/0.2.92 \
crate://crates.io/wasm-bindgen-shared/0.2.92 \
crate://crates.io/winapi/0.3.9 \
crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \
crate://crates.io/winapi-util/0.1.6 \
crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \
crate://crates.io/windows-core/0.52.0 \
crate://crates.io/windows-sys/0.48.0 \
crate://crates.io/windows-sys/0.52.0 \
crate://crates.io/windows-targets/0.48.5 \
crate://crates.io/windows-targets/0.52.4 \
crate://crates.io/windows_aarch64_gnullvm/0.48.5 \
crate://crates.io/windows_aarch64_gnullvm/0.52.4 \
crate://crates.io/windows_aarch64_msvc/0.48.5 \
crate://crates.io/windows_aarch64_msvc/0.52.4 \
crate://crates.io/windows_i686_gnu/0.48.5 \
crate://crates.io/windows_i686_gnu/0.52.4 \
crate://crates.io/windows_i686_msvc/0.48.5 \
crate://crates.io/windows_i686_msvc/0.52.4 \
crate://crates.io/windows_x86_64_gnu/0.48.5 \
crate://crates.io/windows_x86_64_gnu/0.52.4 \
crate://crates.io/windows_x86_64_gnullvm/0.48.5 \
crate://crates.io/windows_x86_64_gnullvm/0.52.4 \
crate://crates.io/windows_x86_64_msvc/0.48.5 \
crate://crates.io/windows_x86_64_msvc/0.52.4 \
crate://crates.io/yore/1.1.0 \
"
71 changes: 71 additions & 0 deletions recipes-core/everest/everest-core-rust.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"

# SRCREV and SRC_URI is defined here because it's shared between
# everest-core and everest-core-rust
require everest-core.inc

# rust crate dependencies
require everest-core-rust-crates.inc

inherit cargo

S = "${WORKDIR}/git"

CARGO_SRC_DIR = "modules"

# list of EVerest modules relative to the modules directory to be built
EVEREST_MODULES = "RsPaymentTerminal RsIskraMeter rust_examples/RsExample rust_examples/RsExampleUser"

DEPENDS = "\
everest-framework \
"

FILES:${PN} += "${libdir}/everest/* ${datadir}/everest/*"

# needed for zvt dependency of RsPaymentTerminal
do_compile[network] = "1"
# also needed for zvt_feig_terminal depenency of RsPaymentTerminal
# cargo from meta-lts-mixins does not like the git dependency of RsPaymentTerminal
CARGO_BUILD_FLAGS:remove = "--frozen"

do_configure:prepend() {
export EVEREST_LIB_DIR="${STAGING_DIR_TARGET}/usr/lib/"
export EVEREST_RS_FRAMEWORK_BINARY_LOCATION="${STAGING_DIR_TARGET}/usr/lib/"
}

do_compile:prepend() {
export EVEREST_LIB_DIR="${STAGING_DIR_TARGET}/usr/lib/"
export EVEREST_RS_FRAMEWORK_BINARY_LOCATION="${STAGING_DIR_TARGET}/usr/lib/"
export EVEREST_CORE_ROOT="${WORKDIR}/git"
EVERESTRS_LOCATION="${STAGING_DIR_TARGET}/${datadir}/everest/everestrs"
if [ ! -d "${EVERESTRS_LOCATION}" ]; then
bbfatal "Could not find location of everestrs. Did you enable rust support in everest-framework PACKAGECONFIG?"
fi
echo "[workspace]" > ${WORKDIR}/git/modules/Cargo.toml
echo "resolver = \"2\"" >> ${WORKDIR}/git/modules/Cargo.toml
echo "members = [" >> ${WORKDIR}/git/modules/Cargo.toml
for EVEREST_MODULE in ${EVEREST_MODULES}
do
echo " \"${EVEREST_MODULE}\"," >> ${WORKDIR}/git/modules/Cargo.toml
done
echo "]" >> ${WORKDIR}/git/modules/Cargo.toml
echo "[workspace.dependencies]" >> ${WORKDIR}/git/modules/Cargo.toml
echo "everestrs = { path = \"${STAGING_DIR_TARGET}/${datadir}/everest/everestrs/everestrs\" }" >> ${WORKDIR}/git/modules/Cargo.toml
echo "everestrs-build = { path = \"${STAGING_DIR_TARGET}/${datadir}/everest/everestrs/everestrs-build\" }" >> ${WORKDIR}/git/modules/Cargo.toml
}

# By default cargo installs the modules into /usr/bin which we do not want and fix here
do_install:append(){
INSTALLED_BIN=$(ls -l "${D}/usr/bin/")
for EVEREST_MODULE_PATH in ${EVEREST_MODULES}
do
EVEREST_MODULE=$(basename ${EVEREST_MODULE_PATH})
bbnote "Installing EVerest Rust module: ${EVEREST_MODULE}"
mkdir -p ${D}/usr/libexec/everest/modules/${EVEREST_MODULE}
mv ${D}/usr/bin/${EVEREST_MODULE} ${D}/usr/libexec/everest/modules/${EVEREST_MODULE}
cp ${WORKDIR}/git/modules/${EVEREST_MODULE_PATH}/manifest.yaml ${D}/usr/libexec/everest/modules/${EVEREST_MODULE}
done

rm -r ${D}/usr/bin/
}
6 changes: 6 additions & 0 deletions recipes-core/everest/everest-core.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SRC_URI = "git://github.com/EVerest/everest-core.git;branch=main;protocol=https \
"

SRCREV = "5e967358322fabd34e66a34f2919588df3ebb33f"

PV = "2024.10.0"
Loading