Git Product home page Git Product logo

arklib's Introduction

ArkLib

This is the home of core ARK library.

Being implemented in Rust, it provides us capability to port all our apps to all common platforms. Right now, Android is supported by using the arklib-android project. And for Linux/macOS/Windows, the library can be used as-is and easily embedded into an app, e.g. built with Tauri. Development docs will come sometime.

The Concept of the library

The purpose of the library is to manage resource index of folders with various user data, as well as to manage user-defined metadata: tags, scores, arbitrary properties like movie title or description. Such a metadata is persisted to filesystem for easier sync and backup. The resource index provides us with content addressing and allows easier storage and versions tracking. We also believe it'll allow easier cross-device sync implementation.

Prerequisites

Build

Like most of Rust projects:

cargo build --release

Run unit tests:

cargo test

Development

For easier testing and debugging, we have the ARK-CLI tool working with ARK-enabled folders.

Benchmarks

arklib relies on the criterion crate for benchmarking to ensure optimal performance. Benchmarks are crucial for evaluating the efficiency of various functionalities within the library.

Running Benchmarks

To execute the benchmarks, run this command:

cargo bench

This command runs all benchmarks and generates a report in HTML format located at target/criterion/report. If you wish to run a specific benchmark, you can specify its name as an argument as in:

cargo bench index_build

Benchmarking Local Files

Our benchmark suite includes tests on local files and directories. These benchmarks are located in the benches/ directory. Each benchmark sets a time limit using group.measurement_time(), which you can adjust manually based on your requirements.

You have the flexibility to benchmark specific files or folders by modifying the variables within the benchmark files. By default, the benchmarks operate on the tests/ directory and its contents. You can change the directory/files by setting the DIR_PATH and FILE_PATHS variables to the desired values.

For pre-benchmark assessment of required time to index a huge local folder, you can modify test_build_resource_index test case in src/index.rs.

arklib's People

Contributors

kirillt avatar hhio618 avatar tareknaser avatar gwendalf avatar j4w3ny avatar sisco0 avatar alvinosh avatar rizary avatar zannis avatar

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.