Coder Social home page Coder Social logo

tlsd / frusty-logger Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sunshine-protocol/frusty-logger

0.0 0.0 0.0 86 KB

A Bridge between Rust log crate and Flutter

License: Other

Java 14.37% Swift 4.18% Objective-C 4.34% Dart 37.16% Ruby 5.50% C 2.82% Rust 31.64%

frusty-logger's Introduction

Frusty Logger

A Bridge between Rust log crate and Flutter debugPrint function

I know I'm terrible at naming packages ๐Ÿ˜…


Setup

Rust Crate

TODO: Publish frusty-logger crate to crates.io

Add frusty-logger to your dependencies

[dependencies]
log = "0.4"
frusty-logger = "0.1.0"

and import it into your project like so

frusty_logger::include_ffi!();

now you ready to go, just use the log crate as you would.

Flutter Setup

TODO: Publish frusty_logger package to pub.dev

Add frusty_logger package to your dependencies

dependencies:
  frusty_logger: ^0.1.0

Then, it is easy to setup, just call

FrustyLogger.init(dynamicLibrary);
FrustyLogger.addListener(print);

usually you will call init directly after loading your dynamicLibrary and passing a referance to FrustyLogger to let it setup the logger and hooking into rust functions.

Done, you should now see logs in your Debug Console :).

Example

See the native/demo crate and the example app.

to Run the Example, simple run

$ cargo make

Fire up Android Emulator and the Run the app

$ cd example
$ flutter run

you should see some loggs on the Debug Console when you press the FAB.

TODO

Here the Things that I want to do before making this ready

  • Test it on iOS (it should just work)
  • Add more Options and customization for the logger
  • Publish on crates.io
  • Add Colors & Emoji
  • Publish on pub.dev

frusty-logger's People

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.