1 # An algorithm library {#mainpage}
3 [![docs](https://github.com/tqfx/liba/actions/workflows/docs.yml/badge.svg)](https://github.com/tqfx/liba/actions/workflows/docs.yml)
4 [![conan](https://github.com/tqfx/liba/actions/workflows/conan.yml/badge.svg)](https://github.com/tqfx/liba/actions/workflows/conan.yml)
5 [![xmake](https://github.com/tqfx/liba/actions/workflows/xmake.yml/badge.svg)](https://github.com/tqfx/liba/actions/workflows/xmake.yml)
6 [![meson](https://github.com/tqfx/liba/actions/workflows/meson.yml/badge.svg)](https://github.com/tqfx/liba/actions/workflows/meson.yml)
7 [![msvc](https://github.com/tqfx/liba/actions/workflows/msvc.yml/badge.svg)](https://github.com/tqfx/liba/actions/workflows/msvc.yml)
8 [![linux](https://github.com/tqfx/liba/actions/workflows/linux.yml/badge.svg)](https://github.com/tqfx/liba/actions/workflows/linux.yml)
9 [![macos](https://github.com/tqfx/liba/actions/workflows/macos.yml/badge.svg)](https://github.com/tqfx/liba/actions/workflows/macos.yml)
10 [![mingw](https://github.com/tqfx/liba/actions/workflows/mingw.yml/badge.svg)](https://github.com/tqfx/liba/actions/workflows/mingw.yml)
11 [![msys2](https://github.com/tqfx/liba/actions/workflows/msys2.yml/badge.svg)](https://github.com/tqfx/liba/actions/workflows/msys2.yml)
12 [![freebsd](https://github.com/tqfx/liba/actions/workflows/freebsd.yml/badge.svg)](https://github.com/tqfx/liba/actions/workflows/freebsd.yml)
16 - [C/C++](https://tqfx.org/liba/)
17 - [Lua](https://tqfx.org/liba/lua/)
18 - [Java](https://tqfx.org/liba/java/)
19 - [Rust](https://tqfx.org/liba/rust/liba/)
23 - C/C++ compiler: [tcc](https://bellard.org/tcc) or [gnu](https://gcc.gnu.org) or [llvm](https://clang.llvm.org) or [msvc](https://visualstudio.microsoft.com/visual-cpp-build-tools) etc
27 - [lua](https://www.lua.org)
28 - [java](https://www.oracle.com/java)
29 - [rust](https://www.rust-lang.org)
30 - [emsdk](https://emscripten.org)
31 - [xmake](https://xmake.io)
32 - [cmake](https://cmake.org)
33 - [conan](https://conan.io)
34 - [vcpkg](https://vcpkg.io)
35 - [meson](https://mesonbuild.com)
36 - [python](https://www.python.org)
37 - [quickjs](https://github.com/bellard/quickjs)
61 meson install -C builddir
67 cmake -S . -B build -DLIBA_VCPKG=1
71 cp -r build/vcpkg/* $VCPKG_INSTALLATION_ROOT
75 cp -r -Force build/vcpkg/* $ENV:VCPKG_INSTALLATION_ROOT
93 python setup.py build_ext --inplace
103 add_requires("alib") -- static
104 add_requires("liba") -- shared
110 find_package(liba CONFIG REQUIRED)
111 target_link_libraries(<TARGET> PRIVATE alib) # static
112 target_link_libraries(<TARGET> PRIVATE liba) # shared
125 luarocks install liba # release
129 luarocks install liba --dev # latest
135 local liba = require("liba")
136 print("version", liba.VERSION)
145 public static void main(String[] args) {
146 System.out.println("version " + liba.VERSION);
156 cargo add liba # release
160 cargo add --git https://github.com/tqfx/liba.git # latest
169 "version {}.{}.{}+{}",
170 liba::version::major(),
171 liba::version::minor(),
172 liba::version::patch(),
173 liba::version::tweak()
181 pip install liba # release
185 pip install git+https://github.com/tqfx/liba.git # latest
192 print("version", liba.VERSION)
204 import liba from "@tqfx/liba";
205 console.log("version", liba.VERSION);
213 import * as liba from "liba.so";
214 console.log("version", liba.VERSION);
217 ## Copyright {#copyright}
219 Copyright (C) 2020-present tqfx, All rights reserved.
221 This Source Code Form is subject to the terms of the Mozilla Public
222 License, v. 2.0. If a copy of the MPL was not distributed with this
223 file, You can obtain one at <https://mozilla.org/MPL/2.0/>.