Comments (3)
OpenCVのリンク
iOS向けのOpenCVのリンク方法は下記で議論されている。
twistedfall/opencv-rust#270
現状はうまくリンクできていないので、OpenCV使用部分をコメントアウトする。
from ailia_yolox_rust.
iOSでのテスト
iOSでテストする場合、static link libraryをビルドした後、Xcodeから呼び出す。
https://mozilla.github.io/firefox-browser-architecture/experiments/2017-09-06-rust-on-ios.html
アプリはsrc/main.rsだが、ライブラリはsrc/lib.rsに記載する。エクスポートするシンボルを下記のように定義する。
#[no_mangle]
pub extern fn ailia_rust_test() {
ビルドする。
export AILIA_INC_DIR=/Users/kyakuno/Desktop/ailia_release/ailia_1_216_0/library/include
export AILIA_BIN_DIR=/Users/kyakuno/Desktop/ailia_release/ailia_1_216_0/library/ios
cargo clean
cargo --config 'build.rustflags="-l framework=Accelerate -l framework=MetalPerformanceShaders -l framework=Metal"' build --target aarch64-apple-ios
target/aarch64-apple-ios/debug/libyolox_blog.aにバイナリができる。
xcodeのmmから下記のように呼び出す。
extern "C"{
extern void ailia_rust_test(void);
}
using namespace std;
void test_ailia(bool cpu) {
ailia_rust_test();
}
from ailia_yolox_rust.
ailia SDK 1.2.16対応
ailia SDK 1.2.16では、ビットコードがバイナリに含まれなくなっており、シンボル情報もar -xで消去している。
rustはarchive形式のStatic Link Libraryしか読み込むことができないため、下記の操作でarchive化する必要がある。
lipo libailia.a -thin arm64 -output libailia-arm64-base.a
ar -r libailia-arm64.a libailia-arm64-base.a
from ailia_yolox_rust.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ailia_yolox_rust.