Giter Site home page Giter Site logo

thlorenz / rid-examples Goto Github PK

View Code? Open in Web Editor NEW
227.0 227.0 8.0 2.26 MB

Examples showing how to use Rid in order to build Dart/Flutter apps integrated with Rust.

Home Page: http://thlorenz.com/rid-site/docs/examples/

Dart 90.58% Rust 3.20% Shell 0.74% Kotlin 0.25% Ruby 0.80% Swift 0.85% Objective-C 0.11% CMake 1.30% C++ 1.63% C 0.12% HTML 0.43% Starlark 0.01%
dart ffi flutter rust wasm

rid-examples's Introduction

rid-examples

Examples showing how to use Rid in order to build Dart/Flutter apps integrated with Rust.

What is Rid?

Rid stands for Rust integrates Dart and is a tool I am working on that allows to call Rust functions from Dart and Flutter applications by simply annotating them. Its main goal is to make it super easy to implement your UI in Flutter and the logic in Rust.

This in turn allows you to benefit from the respective strength of each platform.

Learn more by following the Getting Started guide.

How does Rid work?

Rid consumes the annotations added to your Rust code to generate all the FFI boilerplate to interact with them from Dart /Flutter.

Additionally it generates extension methods on entities, such as models in order to expose an API on the Dart/Flutter end that is super fun to work with.

Learn more rids application architecture.

Examples

Flutter

Dart Only

Is Rid open sourced?

Rid is Sponsorware and thus not open sourced yet.

Please learn more here about how you can sponsor rid via a monthly contribution and when rid will be fully open sourced.

LICENSE

MIT

rid-examples's People

Contributors

lattice0 avatar mglolenstine avatar thlorenz 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rid-examples's Issues

todo example build failing on macOS without additional steps

(Apologies if this is not the place to report this, and awesome work on rid โ€“ super happy to be sponsoring your efforts!)

I'm successful at building and running the todo example on Linux with the provided steps, but failing at it on a M1 based Mac on macOS 11.3. rid-build and rid-ffi in the rid repo itself build happily (I have nightly rust toolchain installed), flutter doctor reports success, etc.

./sh/bindgen in flutter/todo however fails thusly:

2021-09-26 16:20:26,839 DEBUG [rid_build::ffigen::run_ffigen] Running '"dart" "run" "ffigen" "--config" "/var/folders/h0/dgzvb85s2v719b_p2mxggkyr0000gn/T/.tmp6WxOrH/ffigen_config.yaml"' from: '"/Users/mz2/Developer/rid-examples/flutter/todo"'
thread 'main' panicked at 'Build failed: 
'dart run ffigen' failed to run successfully
stderr: 
stdout: Running in Directory: '/Users/mz2/Developer/rid-examples/flutter/todo'
[SEVERE] : Couldn't find dynamic library in default locations.
[SEVERE] : Please supply one or more path/to/llvm in ffigen's config under the key 'llvm-path'.

I have tried providing llvm-path via the pubspec.yaml (I thought it's the pubspec.yaml in flutter/todo/plugin?) by adding

ffigen:
  llvm-path: /Users/mz2/homebrew/opt/llvm

(I installed llvm via homebrew, also tried the version I have via Xcode 13 with no luck)

Given there indeed exists /Users/mz2/homebrew/opt/llvm/include and /Users/mz2/homebrew/opt/llvm/lib under that path, I must be providing the LLVM path somehow incorrectly, or to the wrong context? Also tried passing the actual path to libclang.dylib with DYLD_LIBRARY_PATH ./sh/bindgen but that didn't make a difference either.

Again, thanks for your work and sorry if this is not the place this issue should be reported.

rid_build

Hello
In the cargo.toml there is a dependency rid_build
I don't understand where I find it

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.