thombles / dw2019rust Goto Github PK
View Code? Open in Web Editor NEWA tutorial for using Rust with Swift on iOS (Sep 2019)
A tutorial for using Rust with Swift on iOS (Sep 2019)
Please update the tutorial and revise the "Automated Build" section to use the cargo-lipo tool instead.
This will result in fewer steps and a simpler process.
And here is my template.
When I try to build my framework from Xcode IDE, I alwary meeting = note: ld: library not found for -lSystem
error.
So I have to build it from Terminal typing command line by line, and this time there have no error happened any more.
How do I resolve this issue?
I followed this article https://github.com/thombles/dw2019rust/blob/master/modules/04%20-%20Build%20automation.md
Here is my project https://github.com/ShadowsocksR-Live/overtls#building-ios-framework-1
I have one idea about solving. It is creating a bool value in swift and giving its address to Rust. Then setup a timer in swift and check the bool value continuously. When it's time, change value of bool from its address in Rust and it will trigger the function. This scenario could work? How can I solve this problem in efficient way?
Secondly, is there any original type of bitmap in rust? I've seen many crates. Which one do you recommend?
I've followed the guide but it gives this output with command
nm target/debug/libanvil.a | grep hello
0000000000000000 T _hello_devworld
target/debug/libanvil.a:rustc_std_workspace_alloc-9cf27ed549592a86.rustc_std_workspace_alloc.9703e405-cgu.0.rcgu.o: no symbols
target/debug/libanvil.a:cfg_if-718033b8fe200c22.cfg_if.ecdc0997-cgu.0.rcgu.o: no symbols
target/debug/libanvil.a:rustc_std_workspace_core-b5600cb14c277fae.rustc_std_workspace_core.3407a808-cgu.0.rcgu.o: no symbols
I ignored it but when I run with iOS app it gives this error
Undefined symbols for architecture arm64:
"_hello_devWorld", referenced from:
ExampleRustApp.ViewController.viewDidLoad() -> () in ViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've installed rust with rustup instead of homebrew. My rustup show command give this output
Default host: aarch64-apple-darwin
rustup home: /Users/hakan/.rustup
installed targets for active toolchain
--------------------------------------
aarch64-apple-darwin
aarch64-apple-ios
x86_64-apple-ios
active toolchain
----------------
stable-aarch64-apple-darwin (default)
rustc 1.64.0 (a55dd71d5 2022-09-19)
How can I pass a vector from rust to swift data ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.