#algorithm #fuzzy #pid

no-std liba

An algorithm library based on C/C++ language

9 releases

0.1.1-rc8 Jul 22, 2023
0.1.1-rc7 Jul 17, 2023
0.1.1-rc6 May 19, 2023
0.1.1-rc3 Nov 26, 2022
0.1.0 May 23, 2022

#283 in Algorithms

26 downloads per month

MPL-2.0 license

515KB
15K SLoC

C 10K SLoC // 0.1% comments Python 1.5K SLoC // 0.0% comments Rust 1K SLoC // 0.0% comments Lua 743 SLoC // 0.0% comments C++ 508 SLoC Java 409 SLoC // 0.6% comments JavaScript 203 SLoC

An algorithm library {#mainpage}

docs conan xmake meson msvc linux macos mingw msys2 freebsd

documentation

required tools

optional tools

build

xmake

xmake f
xmake
xmake i

cmake

cmake -S . -B build
cmake --build build
cmake --install build

meson

meson setup builddir
meson install -C builddir

vcpkg

cmake -S . -B build -DLIBA_VCPKG=1
cp -r build/vcpkg/* $VCPKG_INSTALLATION_ROOT
cp -r -Force build/vcpkg/* $ENV:VCPKG_INSTALLATION_ROOT

conan

conan create .

cargo

cargo build --release

cython

python setup.py build_ext --inplace

usage

C/C++

xmake.lua

add_requires("a")

CMakeLists.txt

find_package(liba CONFIG REQUIRED)
target_link_libraries(<TARGET> PRIVATE alib) # static
target_link_libraries(<TARGET> PRIVATE liba) # shared

conanfile.txt

[requires]
liba/[~0.1]

Lua

local liba = require("liba")
print("version", liba.version())

Java

public class test {
    public static void main(String[] args) {
        System.out.println("version " + liba.version());
    }
}

Rust

Cargo.toml

[dependencies]
liba = { git = "https://github.com/tqfx/liba.git" }

main.rs

use liba;
fn main() {
    println!("version {}", liba::version());
}

Python

import liba
print("version", liba.version())

QuickJS

import * as liba from "liba.so";
console.log("version", liba.VERSION)

Copyright (C) 2020-present tqfx, All rights reserved.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

No runtime deps