GithubHelp home page GithubHelp logo

dw2019rust's People

Contributors

thombles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

dw2019rust's Issues

Updates for Xcode in 2024

Thank-you for creating this documentation. It looks like it's going to save me some time maintaining multiple copies of the same code. Surprisingly things mostly work the same as before. Just a few notes as I work through this.

  1. When creating the iOS project, the project options have different names. I chose "New Project", "iOS", "App". There might be a neater way to do this, but I updated the ContentView.swift file to have a testing() function that is called from the view code:
    // Add a testing() function to the ContentView.swift file
    func testing() -> String {
        lookup();
        let wl = wordlength("happy");
        let wc = wordcount(20);
        print("hello \(wl) \(wc)")
        return "hello";

    }

    var body: some View {
        VStack {
            Image(systemName: "globe")
                .imageScale(.large)
                .foregroundStyle(.tint)
            Text(testing()) // Get text from new test function
        }
        .padding()
    }
  1. The build script won't run unless you go to the "Build Settings" tab and find the "User Script Sandboxing" value and set it to "No"

How can I trigger swift function from Rust?

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?

Giving some errors while checking run compatibility for c and swift on m1 mac

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.