Skip to main content

An algorithm library based on C/C++ language

Project description

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("alib") -- static
add_requires("liba") -- shared

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

luarocks install liba # release
luarocks install liba --dev # latest

main.lua

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

Java

Main.java

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

Rust

Cargo.toml

cargo add liba # release
cargo add --git https://github.com/tqfx/liba.git # latest

main.rs

use liba;
fn main() {
    println!(
        "version {}.{}.{}+{}",
        liba::version::major(),
        liba::version::minor(),
        liba::version::patch(),
        liba::version::tweak()
    );
}

Python

pip install liba # release
pip install git+https://github.com/tqfx/liba.git # latest

main.py

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

JavaScript

npm i @tqfx/liba

index.js

import liba from "@tqfx/liba";
console.log("version", liba.VERSION);

QuickJS

main.js

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

Copyright {#copyright}

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/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

liba-0.1.9.tar.gz (269.3 kB view details)

Uploaded Source

File details

Details for the file liba-0.1.9.tar.gz.

File metadata

  • Download URL: liba-0.1.9.tar.gz
  • Upload date:
  • Size: 269.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for liba-0.1.9.tar.gz
Algorithm Hash digest
SHA256 0ef2217a654487da956f2b3684ef65056bb90be4579859cd4859fbbed658d4ba
MD5 c3759fa729a056d6c8d841280919bdc2
BLAKE2b-256 acbc368c264d046489a2f3d130ea00f13e593a4374d9341b69f551aacaa485ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page