From e0849d286075795950ab16942afdfd68200b9999 Mon Sep 17 00:00:00 2001 From: tqfx Date: Fri, 1 Mar 2024 00:01:49 +0800 Subject: [PATCH] update README.md --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 4235039..1a06061 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ add_requires("alib") -- static add_requires("liba") -- shared ``` -### CMakeLists.txt +#### CMakeLists.txt ```cmake find_package(liba CONFIG REQUIRED) @@ -129,6 +129,8 @@ luarocks install liba # release luarocks install --server=https://luarocks.org/dev liba # latest ``` +#### main.lua + ```lua local liba = require("liba") print("version", liba.VERSION) @@ -136,6 +138,8 @@ print("version", liba.VERSION) ### Java +#### Main.java + ```java public class Main { public static void main(String[] args) { @@ -148,9 +152,12 @@ public class Main { #### Cargo.toml -```toml -[dependencies] -liba = { git = "https://github.com/tqfx/liba.git" } +```bash +cargo add liba # release +``` + +```bash +cargo add --git https://github.com/tqfx/liba.git # latest ``` #### main.rs @@ -195,7 +202,7 @@ npm i @tqfx/liba ```js import liba from "@tqfx/liba"; -console.log(liba.VERSION) +console.log(liba.VERSION); ``` ### QuickJS @@ -204,7 +211,7 @@ console.log(liba.VERSION) ```js import * as liba from "liba.so"; -console.log("version", liba.VERSION) +console.log("version", liba.VERSION); ``` ## Copyright {#copyright} -- 2.11.4.GIT