descriptionAn algorithm library based on C/C++
homepage URLhttps://tqfx.org/liba/
repository URLhttps://github.com/tqfx/liba
ownertqfx@tqfx.org
last changeWed, 24 Apr 2024 06:11:02 +0000 (24 14:11 +0800)
last refreshSat, 27 Apr 2024 06:09:34 +0000 (27 08:09 +0200)
content tags
add:
README.md

An algorithm library {#mainpage}

docs conan xmake meson wasm 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 build
meson install -C build

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 # latest

main.rs

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

Python

export LIBA_OPENMP=1
pip install liba # release
pip install git+https://github.com/tqfx/liba # 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 (C) 2020-2024 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/>.

shortlog
3 days ago tqfxmove from present to 2024maintqfx
6 days ago tqfxfix repository.url in package.json
6 days ago tqfxupdate name of upload-artifact
6 days ago tqfxrelease 0.1.120.1.12
6 days ago tqfxremove build,install,clean of liba.o
7 days ago tqfxusing paths filters in workflow docs
7 days ago tqfxremove suffix .git for github url
7 days ago tqfxremove <assert.h> in test.h
7 days ago tqfxremove cython warning: Dereference of null pointer
8 days ago tqfxfix result of rsqrt(-0)
8 days ago tqfxfix cmake install with LIBA_INSTALL="shared;lua"
8 days ago tqfxreplace deprecated function in vcpkg
8 days ago tqfxfix vcpkg warning: /debug/share should not exist
8 days ago tqfxupdate installation behavior
8 days ago tqfxupdate expression matching compiler id
8 days ago tqfxfix runtime error: division by zero
...
tags
6 days ago 0.1.12
11 days ago 0.1.11
2 weeks ago 0.1.10
3 weeks ago 0.1.9
5 weeks ago 0.1.8
6 weeks ago 0.1.7
8 weeks ago 0.1.6
2 months ago 0.1.5
2 months ago 0.1.4
2 months ago 0.1.3
2 months ago 0.1.2
3 months ago 0.1.1
heads
46 hours ago work
3 days ago tqfx
3 days ago main