ruki 6 ay önce
ebeveyn
işleme
a0d20bdaa9
100 değiştirilmiş dosya ile 23032 ekleme ve 703 silme
  1. 637 0
      README.md
  2. 1633 90
      docs/.vitepress/theme/blog-data.js
  3. 2420 88
      docs/.vitepress/theme/zh-blog-data.js
  4. 0 145
      docs/BLOG_README.md
  5. 77 0
      docs/posts/a-simple-demo.md
  6. 230 0
      docs/posts/batch-check-functions.md
  7. 528 0
      docs/posts/build-without-makefile.md
  8. 3 2
      docs/posts/building-cross-platform-apps.md
  9. 93 0
      docs/posts/builtinvar-and-shell.md
  10. 271 0
      docs/posts/compile-project.md
  11. 82 0
      docs/posts/config-description.md
  12. 90 0
      docs/posts/create-project.md
  13. 8 0
      docs/posts/demo-build-a-simple-project.md
  14. 72 0
      docs/posts/generate-vs2015-project.md
  15. 333 0
      docs/posts/how-to-build-a-simple-project.md
  16. 60 0
      docs/posts/how-to-compile-on-cross-toolchains.md
  17. 36 0
      docs/posts/how-to-install-xmake.md
  18. 156 0
      docs/posts/luarocks-build-xmake-v1.0.md
  19. 15 0
      docs/posts/new-document.md
  20. 5 5
      docs/posts/new-feature-announcement.md
  21. 394 0
      docs/posts/new-features-v2.1.5.md
  22. 40 0
      docs/posts/package-target.md
  23. 597 0
      docs/posts/please-use-xmake.md
  24. 97 0
      docs/posts/plugin-hello.md
  25. 0 44
      docs/posts/post-10.md
  26. 0 59
      docs/posts/post-3.md
  27. 0 48
      docs/posts/post-4.md
  28. 0 44
      docs/posts/post-5.md
  29. 0 44
      docs/posts/post-6.md
  30. 0 44
      docs/posts/post-7.md
  31. 0 44
      docs/posts/post-8.md
  32. 0 44
      docs/posts/post-9.md
  33. 200 0
      docs/posts/quickstart-1-installation.md
  34. 164 0
      docs/posts/quickstart-2-create-and-build-project.md
  35. 100 0
      docs/posts/quickstart-3-run-and-debug.md
  36. 370 0
      docs/posts/quickstart-4-basic-project-settings.md
  37. 140 0
      docs/posts/quickstart-5-build-android.md
  38. 27 0
      docs/posts/run-target.md
  39. 67 0
      docs/posts/support-debugger-on-windows.md
  40. 132 0
      docs/posts/support-qt.md
  41. 121 0
      docs/posts/syntax-style.md
  42. 47 0
      docs/posts/update-v2.0.1.md
  43. 27 0
      docs/posts/update-v2.0.2.md
  44. 30 0
      docs/posts/update-v2.0.3.md
  45. 31 0
      docs/posts/update-v2.0.4.md
  46. 43 0
      docs/posts/update-v2.0.5.md
  47. 41 0
      docs/posts/update-v2.1.1.md
  48. 106 0
      docs/posts/update-v2.1.2.md
  49. 119 0
      docs/posts/update-v2.1.3.md
  50. 163 0
      docs/posts/update-v2.1.4.md
  51. 60 0
      docs/posts/update-v2.1.5.md
  52. 30 0
      docs/posts/update-v2.1.6.md
  53. 44 0
      docs/posts/update-v2.1.7.md
  54. 38 0
      docs/posts/update-v2.1.8.md
  55. 100 0
      docs/posts/update-v2.1.9.md
  56. 323 0
      docs/posts/update-v2.2.1.md
  57. 8 0
      docs/posts/usage-demo.md
  58. 3 2
      docs/posts/xmake-3-0-release.md
  59. 685 0
      docs/posts/xmake-and-package-management.md
  60. 131 0
      docs/posts/xmake-c++20-modules.md
  61. 193 0
      docs/posts/xmake-gradle-v1.0.7.md
  62. 72 0
      docs/posts/xmake-idea-v1.0.3.md
  63. 10 0
      docs/posts/xmake-io.md
  64. 61 0
      docs/posts/xmake-sublime-v1.0.3.md
  65. 395 0
      docs/posts/xmake-update-v2.2.2-package-deps.md
  66. 39 0
      docs/posts/xmake-update-v2.2.3.md
  67. 54 0
      docs/posts/xmake-update-v2.2.5.md
  68. 138 0
      docs/posts/xmake-update-v2.2.6.md
  69. 227 0
      docs/posts/xmake-update-v2.2.7.md
  70. 134 0
      docs/posts/xmake-update-v2.2.8.md
  71. 150 0
      docs/posts/xmake-update-v2.2.9.md
  72. 290 0
      docs/posts/xmake-update-v2.3.1.md
  73. 76 0
      docs/posts/xmake-update-v2.3.2.md
  74. 217 0
      docs/posts/xmake-update-v2.3.3.md
  75. 449 0
      docs/posts/xmake-update-v2.3.4.md
  76. 238 0
      docs/posts/xmake-update-v2.3.5.md
  77. 193 0
      docs/posts/xmake-update-v2.3.6.md
  78. 265 0
      docs/posts/xmake-update-v2.3.7.md
  79. 246 0
      docs/posts/xmake-update-v2.3.8.md
  80. 373 0
      docs/posts/xmake-update-v2.3.9.md
  81. 472 0
      docs/posts/xmake-update-v2.5.1.md
  82. 547 0
      docs/posts/xmake-update-v2.5.2.md
  83. 336 0
      docs/posts/xmake-update-v2.5.3.md
  84. 195 0
      docs/posts/xmake-update-v2.5.4.md
  85. 430 0
      docs/posts/xmake-update-v2.5.5.md
  86. 150 0
      docs/posts/xmake-update-v2.5.6.md
  87. 348 0
      docs/posts/xmake-update-v2.5.7.md
  88. 425 0
      docs/posts/xmake-update-v2.5.8.md
  89. 798 0
      docs/posts/xmake-update-v2.5.9.md
  90. 306 0
      docs/posts/xmake-update-v2.6.1.md
  91. 364 0
      docs/posts/xmake-update-v2.6.2.md
  92. 248 0
      docs/posts/xmake-update-v2.6.3.md
  93. 272 0
      docs/posts/xmake-update-v2.6.4.md
  94. 379 0
      docs/posts/xmake-update-v2.6.5.md
  95. 754 0
      docs/posts/xmake-update-v2.6.6.md
  96. 325 0
      docs/posts/xmake-update-v2.7.1.md
  97. 472 0
      docs/posts/xmake-update-v2.7.2.md
  98. 557 0
      docs/posts/xmake-update-v2.7.3.md
  99. 375 0
      docs/posts/xmake-update-v2.7.6.md
  100. 232 0
      docs/posts/xmake-update-v2.7.7.md

+ 637 - 0
README.md

@@ -0,0 +1,637 @@
+## Support this project
+
+Support this project by [becoming a sponsor](https://xmake.io/about/sponsor). Your logo will show up here with a link to your website. 🙏
+
+<a href="https://opencollective.com/xmake#sponsors" target="_blank"><img src="https://opencollective.com/xmake/sponsors.svg?width=890"></a>
+<a href="https://opencollective.com/xmake#backers" target="_blank"><img src="https://opencollective.com/xmake/backers.svg?width=890"></a>
+
+## Technical support
+
+You can also consider sponsoring us to get extra technical support services via the [Github sponsor program](https://github.com/sponsors/waruqi). If you do, you can get access to the [xmake-io/technical-support](https://github.com/xmake-io/technical-support) repository, which has the following bennefits:
+
+- [X] Handling Issues with higher priority
+- [X] One-to-one technical consulting service
+- [X] Review your xmake.lua and provide suggestions for improvement
+
+## Introduction
+
+What is Xmake?
+
+1. Xmake is a cross-platform build utility based on the Lua scripting language.
+2. Xmake is very lightweight and has no dependencies outside of the standard library.
+3. Uses the `xmake.lua` file to maintain project builds with a simple and readable syntax.
+
+Xmake can be used to directly build source code (like with Make or Ninja), or it can generate project source files like CMake or Meson. It also has a *built-in* package management system to help users integrate C/C++ dependencies.
+
+```
+Xmake = Build backend + Project Generator + Package Manager + [Remote|Distributed] Build + Cache
+```
+
+Although less precise, one can still understand Xmake in the following way:
+
+```
+Xmake ≈ Make/Ninja + CMake/Meson + Vcpkg/Conan + distcc + ccache/sccache
+```
+
+If you want to know more, please refer to: the [Documentation](https://xmake.io/#/getting_started), [GitHub](https://github.com/xmake-io/xmake) or [Gitee](https://gitee.com/tboox/xmake). You are also welcome to join our [community](https://xmake.io/#/about/contact).
+
+The official Xmake repository can be found at [xmake-io/xmake-repo](https://github.com/xmake-io/xmake-repo).
+
+## Installation
+
+### With cURL
+
+```bash
+curl -fsSL https://xmake.io/shget.text | bash
+```
+
+### With Wget
+
+```bash
+wget https://xmake.io/shget.text -O - | bash
+```
+
+### With PowerShell
+
+```sh
+Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content
+```
+
+### Other installation methods
+
+If you don't want to use the above scripts to install Xmake, visit the [Installation Guide](https://xmake.io/#/guide/installation) for other installation methods (building from source, package managers, etc.).
+
+## Simple Project Description
+
+```lua
+target("console")
+    set_kind("binary")
+    add_files("src/*.c")
+```
+
+Creates a new target `console` of kind `binary`, and adds all the files ending in `.c` in the `src` directory.
+
+## Package dependences
+
+```lua
+add_requires("tbox 1.6.*", "zlib", "libpng ~1.6")
+```
+
+Adds a requirement of tbox v1.6, zlib (any version), and libpng v1.6.
+
+The official xmake package repository exists at: [xmake-repo](https://github.com/xmake-io/xmake-repo)
+
+<p align="center">
+<img src="https://github.com/xmake-io/xmake-docs/raw/master/assets/img/index/package.gif" width="650px" />
+</p>
+
+## Commandline interface reference
+
+The below assumes you are currently in the project's root directory.
+
+### Build a project
+
+```bash
+$ xmake
+```
+
+### Run target
+
+```bash
+$ xmake run console
+```
+
+### Debug target
+
+```bash
+$ xmake run -d console
+```
+
+### Configure platform
+
+```bash
+$ xmake f -p [windows|linux|macosx|android|iphoneos ..] -a [x86|arm64 ..] -m [debug|release]
+$ xmake
+```
+
+### Menu configuration
+
+```bash
+$ xmake f --menu
+```
+
+<p align="center">
+<img src="https://xmake.io/assets/img/index/menuconf.png" width="650px"/>
+</p>
+
+## Supported platforms
+
+* Windows (x86, x64)
+* macOS (i386, x86_64, arm64)
+* Linux (i386, x86_64, cross-toolchains ..)
+* *BSD (i386, x86_64)
+* Android (x86, x86_64, armeabi, armeabi-v7a, arm64-v8a)
+* iOS (armv7, armv7s, arm64, i386, x86_64)
+* WatchOS (armv7k, i386)
+* AppleTVOS (armv7, arm64, i386, x86_64)
+* MSYS (i386, x86_64)
+* MinGW (i386, x86_64, arm, arm64)
+* Cygwin (i386, x86_64)
+* Wasm (wasm32)
+* Cross (cross-toolchains ..)
+
+## Supported toolchains
+
+### IDE-Tied
+
+* Xcode
+* MSVC (Microsoft Visual C compiler)
+* Android NDK
+
+### Languages
+
+* Zig
+* Go(lang)
+* Swift
+* Nim
+* Rust
+* GCC (GNU Compiler Collection)
+* Clang
+* TinyCC
+* icc (Intel C Compiler)
+* icpc (Intel C++ Compiler)
+* icx (Intel LLVM C/C++ Compiler)
+* Clang-CL (Clang Compatability with MSVC)
+* DPC++ (Intel LLVM C++ Compiler using SYCL)
+* MinGW (GNU for Windows)
+* C51 (Keil C Compiler for the 8051)
+* GNU-RM (GNU Arm Embedded Toolchain)
+* ArmCC (Keil C Compiler for Keil MKD Version 5)
+* Circle (New C++20 compiler)
+* WASI (C/C++ WebAssembly Toolchain)
+* ArmClang (Version 6 of the Keil MDK)
+* SDCC (Small Device C Compiler)
+* GDC (GNU D Compiler)
+* LDC (LLVM D Compiler)
+* DMD (Dlang)
+* FPC (Free Pascal Programming Language Compiler)
+* GFortran (GNU Fortran Compiler)
+* Ifort (Intel Fortran Compiler)
+* CUDA (nvcc, nvc, nvc++, nvfortran)
+* Emscripten
+* LLVM
+* Icarus Verilog
+* Verilator (SystemVerilog simulator and lint system)
+
+### Assemblers
+
+* FASM
+* NASM
+* YASM
+* MASM32 (Microsoft Macro Assembler 32-bit SDK)
+
+## Supported languages
+
+* C, C++ (including cpp2)
+* Objective-C and Objective-C++
+* Swift
+* Assembly
+* Golang
+* Rust
+* Dlang
+* Fortran
+* Cuda
+* Zig
+* Vala
+* Pascal
+* Nim
+* Verilog
+* FASM
+* NASM
+* YASM
+* MASM32
+
+## Features
+
+Xmake exhibits:
+
+* Simple yet flexible configuration grammar.
+* Quick, dependency-free installation.
+* Easy compilation for most all supported platforms.
+* Supports cross-compilation with intelligent analysis of cross toolchain information.
+* Extremely fast parallel compilation support.
+* Supports C++ modules (new in C++20).
+* Supports cross-platform C/C++ dependencies with built-in package manager.
+* Multi-language compilation support including mixed-language projects.
+* Rich plug-in support with various project generators (ex. Visual Studio/Makefiles/CMake/`compile_commands.json`)
+* REPL interactive execution support
+* Incremental compilation support with automatic analysis of header files
+* Built-in toolchain management
+* A large number of expansion modules
+* Remote compilation support
+* Distributed compilation support
+* Local and remote build cache support
+
+## Supported Project Types
+
+Xmake supports the below types of projects:
+
+* Static libraries
+* Shared libraries
+* Console/CLI applications
+* CUDA programs
+* Qt applications
+* WDK drivers (umdf/kmdf/wdm)
+* WinSDK applications
+* MFC applications
+* Darwin applications (with metal support)
+* Frameworks and bundles (in Darwin)
+* SWIG modules (Lua, Python, ...)
+* LuaRocks modules
+* Protobuf programs
+* Lex/Yacc programs
+* Linux kernel modules
+
+## Package management
+
+### Download and build
+
+Xmake can automatically fetch and install dependencies!
+
+<p align="center">
+<img src="https://xmake.io/assets/img/index/package_manage.png" width="650px" />
+</p>
+
+### Supported package repositories
+
+* Official package repository [xmake-repo](https://github.com/xmake-io/xmake-repo) (tbox >1.6.1)
+* Official package manager [Xrepo](https://github.com/xmake-io/xrepo)
+* [User-built repositories](https://xmake.io/#/package/remote_package?id=using-self-built-private-package-repository)
+* Conan (conan::openssl/1.1.1g)
+* Conda (conda::libpng 1.3.67)
+* Vcpkg (vcpkg::ffmpeg)
+* Homebrew/Linuxbrew (brew::pcre2/libpcre2-8)
+* Pacman on archlinux/msys2 (pacman::libcurl)
+* Apt on ubuntu/debian (apt::zlib1g-dev)
+* Clib (clib::clibs/[email protected])
+* Dub (dub::log 0.4.3)
+* Portage on Gentoo/Linux (portage::libhandy)
+* Nimble for nimlang (nimble::zip >1.3)
+* Cargo for rust (cargo::base64 0.13.0)
+
+### Package management features
+
+* The official repository provides nearly 500+ packages with simple compilation on all supported platforms
+* Full platform package support, support for cross-compiled dependent packages
+* Support package virtual environment using `xrepo env shell`
+* Precompiled package acceleration for Windows (NT)
+* Support self-built package repositories and private repository deployment
+* Third-party package repository support for repositories such as: vcpkg, conan, conda, etc.
+* Supports automatic pulling of remote toolchains
+* Supports dependency version locking
+
+## Processing architecture
+
+Below is a diagram showing roughly the architecture of Xmake, and thus how it functions.
+
+<p align="center">
+<img src="https://xmake.io/assets/img/index/package_arch.png" width="650px" />
+</p>
+
+## Distributed Compilation
+
+- [X] Cross-platform support.
+- [X] Support for MSVC, Clang, GCC and other cross-compilation toolchains.
+- [X] Support for building for Android, Linux, Windows NT, and Darwin hosts.
+- [X] No dependencies other than the compilation toolchain.
+- [X] Support for build server load balancing scheduling.
+- [X] Support for real time compressed transfer of large files (lz4).
+- [X] Almost zero configuration cost, no shared filesystem required, for convenience and security.
+
+For more details see: [#274](https://github.com/xmake-io/xmake/issues/274)
+
+## Remote Compilation
+
+For more details see: [#622](https://github.com/xmake-io/xmake/issues/622)
+
+## Local/Remote Build Cache
+
+For more details see: [#622](https://github.com/xmake-io/xmake/issues/2371)
+
+## Benchmark
+
+Xmake's speed on is par with Ninja! The test project: [xmake-core](https://github.com/xmake-io/xmake/tree/master/core)
+
+### Multi-task parallel compilation
+
+
+| buildsystem      | Termux (8core/-j12) | buildsystem      | MacOS (8core/-j12) |
+| ------------------ | --------------------- | ------------------ | -------------------- |
+| xmake            | 24.890s             | xmake            | 12.264s            |
+| ninja            | 25.682s             | ninja            | 11.327s            |
+| cmake(gen+make)  | 5.416s+28.473s      | cmake(gen+make)  | 1.203s+14.030s     |
+| cmake(gen+ninja) | 4.458s+24.842s      | cmake(gen+ninja) | 0.988s+11.644s     |
+
+## Single task compilation
+
+
+| buildsystem      | Termux (-j1)     | buildsystem      | MacOS (-j1)    |
+| ------------------ | ------------------ | ------------------ | ---------------- |
+| xmake            | 1m57.707s        | xmake            | 39.937s        |
+| ninja            | 1m52.845s        | ninja            | 38.995s        |
+| cmake(gen+make)  | 5.416s+2m10.539s | cmake(gen+make)  | 1.203s+41.737s |
+| cmake(gen+ninja) | 4.458s+1m54.868s | cmake(gen+ninja) | 0.988s+38.022s |
+
+## More Examples
+
+### Debug and release profiles
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("console")
+    set_kind("binary")
+    add_files("src/*.c")
+    if is_mode("debug") then
+        add_defines("DEBUG")
+    end
+```
+
+### Custom scripts
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    after_build(function (target)
+        print("hello: %s", target:name())
+        os.exec("echo %s", target:targetfile())
+    end)
+```
+
+### Automatic integration of dependent packages
+
+Download and use packages in [xmake-repo](https://github.com/xmake-io/xmake-repo) or third-party repositories:
+
+```lua
+add_requires("tbox >1.6.1", "libuv master", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8")
+add_requires("conan::openssl/1.1.1g", {alias = "openssl", optional = true, debug = true})
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("tbox", "libuv", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8", "openssl")
+```
+
+In addition, we can also use the [xrepo](https://github.com/xmake-io/xrepo) command to quickly install dependencies.
+
+### Qt QuickApp Program
+
+```lua
+target("test")
+    add_rules("qt.quickapp")
+    add_files("src/*.cpp")
+    add_files("src/qml.qrc")
+```
+
+### Cuda Program
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("src/*.cu")
+    add_cugencodes("native")
+    add_cugencodes("compute_35")
+```
+
+### WDK/UMDF Driver Program
+
+```lua
+target("echo")
+    add_rules("wdk.driver", "wdk.env.umdf")
+    add_files("driver/*.c")
+    add_files("driver/*.inx")
+    add_includedirs("exe")
+
+target("app")
+    add_rules("wdk.binary", "wdk.env.umdf")
+    add_files("exe/*.cpp")
+```
+
+For more WDK driver examples (UMDF/KMDF/WDM), please visit [WDK Program Examples](https://xmake.io/#/guide/project_examples?id=wdk-driver-program)
+
+### Darwin Applications
+
+```lua
+target("test")
+    add_rules("xcode.application")
+    add_files("src/*.m", "src/**.storyboard", "src/*.xcassets")
+    add_files("src/Info.plist")
+```
+
+### Framework and Bundle Program (Darwin)
+
+```lua
+target("test")
+    add_rules("xcode.framework") -- or xcode.bundle
+    add_files("src/*.m")
+    add_files("src/Info.plist")
+```
+
+### OpenMP Program
+
+```lua
+add_requires("libomp", {optional = true})
+target("loop")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    add_rules("c++.openmp")
+    add_packages("libomp")
+```
+
+### Zig Program
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("src/main.zig")
+```
+
+### Automatically fetch remote toolchain
+
+#### fetch a special version of LLVM
+
+Require the Clang version packaged with LLM-10 to compile a project.
+
+```lua
+add_requires("llvm 10.x", {alias = "llvm-10"})
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    set_toolchains("llvm@llvm-10")
+```
+
+#### Fetch a cross-compilation toolchain
+
+We can also pull a specified cross-compilation toolchain in to compile the project.
+
+```lua
+add_requires("muslcc")
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    set_toolchains("@muslcc")
+```
+
+#### Fetch toolchain and packages
+
+We can also use the specified `muslcc` cross-compilation toolchain to compile and integrate all dependent packages.
+
+```lua
+add_requires("muslcc")
+add_requires("zlib", "libogg", {system = false})
+
+set_toolchains("@muslcc")
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("zlib", "libogg")
+```
+
+## Plugins
+
+#### Generate IDE project file plugin(makefile, vs2002 - vs2022 .. )
+
+```bash
+$ xmake project -k vsxmake -m "debug,release" # New vsproj generator (Recommended)
+$ xmake project -k vs -m "debug,release"
+$ xmake project -k cmake
+$ xmake project -k ninja
+$ xmake project -k compile_commands
+```
+
+#### Run a custom lua script plugin
+
+```bash
+$ xmake l ./test.lua
+$ xmake l -c "print('hello xmake!')"
+$ xmake l lib.detect.find_tool gcc
+$ xmake l
+> print("hello xmake!")
+> {1, 2, 3}
+< {
+    1,
+    2,
+    3
+  }
+```
+
+To see a list of bultin plugs, please visit [Builtin plugins](https://xmake.io/#/plugin/builtin_plugins).
+
+Please download and install other plugins from the plugins repository [xmake-plugins](https://github.com/xmake-io/xmake-plugins).
+
+## IDE/Editor Integration
+
+* [xmake-vscode](https://github.com/xmake-io/xmake-vscode)
+
+<img src="https://raw.githubusercontent.com/xmake-io/xmake-vscode/master/res/problem.gif" width="650px" />
+
+* [xmake-sublime](https://github.com/xmake-io/xmake-sublime)
+
+<img src="https://raw.githubusercontent.com/xmake-io/xmake-sublime/master/res/problem.gif" width="650px" />
+
+* [xmake-idea](https://github.com/xmake-io/xmake-idea)
+
+<img src="https://raw.githubusercontent.com/xmake-io/xmake-idea/master/res/problem.gif" width="650px" />
+
+* [xmake.nvim](https://github.com/Mythos-404/xmake.nvim) (third-party, thanks [@Mythos_404](https://github.com/Mythos-404))
+
+<img src="https://raw.githubusercontent.com/Mythos-404/xmake.nvim/main/assets/XmakePreview.gif" width="650px" />
+
+* [xmake.vim](https://github.com/luzhlon/xmake.vim) (third-party, thanks [@luzhlon](https://github.com/luzhlon))
+* [xmake-visualstudio](https://github.com/HelloWorld886/xmake-visualstudio) (third-party, thanks [@HelloWorld886](https://github.com/HelloWorld886))
+* [xmake-qtcreator](https://github.com/Arthapz/xmake-project-manager) (third-party, thanks [@Arthapz](https://github.com/Arthapz))
+
+### Xmake Gradle Plugin (JNI)
+
+We can use the [xmake-gradle](https://github.com/xmake-io/xmake-gradle) plugin to compile JNI libraries via gradle.
+
+```
+plugins {
+  id 'org.tboox.gradle-xmake-plugin' version '1.1.5'
+}
+
+android {
+    externalNativeBuild {
+        xmake {
+            path "jni/xmake.lua"
+        }
+    }
+}
+```
+
+The `xmakeBuild` task will be injected into the `assemble` task automatically if the `gradle-xmake-plugin` has been applied.
+
+```console
+$ ./gradlew app:assembleDebug
+> Task :nativelib:xmakeConfigureForArm64
+> Task :nativelib:xmakeBuildForArm64
+>> xmake build
+[ 50%]: cache compiling.debug nativelib.cc
+[ 75%]: linking.debug libnativelib.so
+[100%]: build ok!
+>> install artifacts to /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a
+> Task :nativelib:xmakeConfigureForArmv7
+> Task :nativelib:xmakeBuildForArmv7
+>> xmake build
+[ 50%]: cache compiling.debug nativelib.cc
+[ 75%]: linking.debug libnativelib.so
+[100%]: build ok!
+>> install artifacts to /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a
+> Task :nativelib:preBuild
+> Task :nativelib:assemble
+> Task :app:assembleDebug
+```
+
+## CI Integration
+
+### GitHub Action
+
+The [github-action-setup-xmake](https://github.com/xmake-io/github-action-setup-xmake) plugin for GitHub Actions can allow you to use Xmake with minimal efforts if you use GitHub Actions for your CI pipeline.
+
+```yaml
+uses: xmake-io/github-action-setup-xmake@v1
+with:
+  xmake-version: latest
+```
+
+## Who is using Xmake?
+
+The list of people and projects who are using Xmake is available [here](https://xmake.io/#/about/who_is_using_xmake).
+
+If you are using Xmake, you are welcome to submit your information to the above list through a PR, so that other users and the developers can gauge interest.  Ihis also let users to use xmake more confidently and give us motivation to continue to maintain it.
+
+This will help the Xmake project and it's community grow stronger and expand!
+
+## Contacts
+
+* Email:[[email protected]](mailto:[email protected])
+* Homepage:[xmake.io](https://xmake.io)
+* Community
+  - [Chat on Reddit](https://www.reddit.com/r/xmake/)
+  - [Chat on Telegram](https://t.me/tbooxorg)
+  - [Chat on Discord](https://discord.gg/xmake)
+  - Chat on QQ Group: 343118190, 662147501
+* Source Code:[GitHub](https://github.com/xmake-io/xmake), [Gitee](https://gitee.com/tboox/xmake)
+* WeChat Public: tboox-os
+
+## Thanks
+
+This project exists thanks to all the people who have [contributed](CONTRIBUTING.md):
+<a href="https://github.com/xmake-io/xmake/graphs/contributors"><img src="https://opencollective.com/xmake/contributors.svg?width=890&button=false" /></a>
+
+* [TitanSnow](https://github.com/TitanSnow): Provide the xmake [logo](https://github.com/TitanSnow/ts-xmake-logo) and install scripts
+* [uael](https://github.com/uael): Provide the semantic versioning library [sv](https://github.com/uael/sv)
+* [OpportunityLiu](https://github.com/OpportunityLiu): Improve cuda, tests and ci
+* [xq144](https://github.com/xq114): Improve `xrepo env shell`, and contribute a lot of packages to the [xmake-repo](https://github.com/xmake-io/xmake-repo) repository.
+* `enderger`: Helped smooth out the edges on the English translation of the README

+ 1633 - 90
docs/.vitepress/theme/blog-data.js

@@ -1,159 +1,1702 @@
 export const posts = [
   {
-    "title": "New Feature: Enhanced Package Management",
-    "url": "/posts/new-feature-announcement",
+    "title": "Xmake v2.9.1 released, Add native lua modules support",
+    "url": "/posts/xmake-update-v2.9.1",
     "date": {
-      "time": 1705752000000,
-      "string": "January 20, 2024"
+      "time": 1713787200000,
+      "string": "April 22, 2024"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "feature",
-      "package-management",
-      "xmake"
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "cosmocc"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n<p>It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.</p>\n"
+  },
+  {
+    "title": "Xmake v2.8.7 released, Add cosmocc toolchain support, build-once run-anywhere",
+    "url": "/posts/xmake-update-v2.8.7",
+    "date": {
+      "time": 1708862400000,
+      "string": "February 25, 2024"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "cosmocc"
+    ],
+    "excerpt": "<p>title: Xmake v2.8.7 released, Add cosmocc toolchain support, build-once run-anywhere\ntags: [xmake, lua, C/C++, package, cosmocc]\ndate: 2024-02-25\nauthor: Ruki</p>\n<hr>\n<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n"
+  },
+  {
+    "title": "Xmake v2.8.6 released, New Packaging Plugin, XPack",
+    "url": "/posts/xmake-update-v2.8.6",
+    "date": {
+      "time": 1702641600000,
+      "string": "December 15, 2023"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "performance",
+      "API",
+      "rust"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n<p>It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.</p>\n"
+  },
+  {
+    "title": "Xmake v2.8.5 released, Support for link sorting and unit testing",
+    "url": "/posts/xmake-update-v2.8.5",
+    "date": {
+      "time": 1699185600000,
+      "string": "November 5, 2023"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "performance",
+      "API",
+      "rust"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n<p>It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.</p>\n"
+  },
+  {
+    "title": "Xmake v2.8.3 Released, Improve Wasm and Support Xmake Source Debugging",
+    "url": "/posts/xmake-update-v2.8.3",
+    "date": {
+      "time": 1695729600000,
+      "string": "September 26, 2023"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "performance",
+      "API",
+      "rust"
+    ],
+    "excerpt": "<h2>tags: [xmake, lua, C/C++, package, performance, API, rust], date: '2023-09-26',]</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n"
+  },
+  {
+    "title": "Xmake v2.8.2 Released, Official package repository count over 1k",
+    "url": "/posts/xmake-update-v2.8.2",
+    "date": {
+      "time": 1692705600000,
+      "string": "August 22, 2023"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "performance",
+      "API",
+      "rust"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n<p>It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.</p>\n"
+  },
+  {
+    "title": "Xmake v2.8.1 Released, Lots of Detailed Feature Improvements",
+    "url": "/posts/xmake-update-v2.8.1",
+    "date": {
+      "time": 1689076800000,
+      "string": "July 11, 2023"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "performance",
+      "mingw64",
+      "wasm"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n<p>It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.</p>\n"
+  },
+  {
+    "title": "Xmake v2.7.8 released, Improve package virtual environment and build speed",
+    "url": "/posts/xmake-update-v2.7.8",
+    "date": {
+      "time": 1680609600000,
+      "string": "April 4, 2023"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "performance",
+      "mingw64",
+      "wasm"
+    ],
+    "excerpt": "<h2>tags: [xmake, lua, C/C++, package, performance, mingw64, wasm], date: '2023-04-04',]</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n"
+  },
+  {
+    "title": "Xmake v2.7.7 released, Support Haiku, Improve API check and C++ Modules",
+    "url": "/posts/xmake-update-v2.7.7",
+    "date": {
+      "time": 1677153600000,
+      "string": "February 23, 2023"
+    },
+    "author": "Ruki",
+    "excerpt": "<p>title: Xmake v2.7.7 released, Support Haiku, Improve API check and C++ Modules\ndate: 2023-02-23\nauthor: Ruki</p>\n<p>Checks:          'clang-diagnostic-<em>,clang-analyzer-</em>,*'\nWarningsAsErrors: ''\nHeaderFilterRegex: ''\nAnalyzeTemporaryDtors: false\nFormatStyle:     none\nUser:            ruki\nCheckOptions:</p>\n<ul>\n<li>key:             readability-suspicious-call-argument.PrefixSimilarAbove\nvalue:           '30'</li>\n<li>key:...</li>\n</ul>\n<pre><code></code></pre>\n"
+  },
+  {
+    "title": "Xmake v2.7.6 Released, Add Verilog and C++ Module Distribution Support",
+    "url": "/posts/xmake-update-v2.7.6",
+    "date": {
+      "time": 1674388800000,
+      "string": "January 22, 2023"
+    },
+    "author": "Ruki",
+    "excerpt": "<p>title: Xmake v2.7.6 Released, Add Verilog and C++ Module Distribution Support\ndate: 2023-01-22\nauthor: Ruki</p>\n<hr>\n<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n"
+  },
+  {
+    "title": "Xmake v2.7.3 Released, Package Components and C++ Modules Incremental Build Support",
+    "url": "/posts/xmake-update-v2.7.3",
+    "date": {
+      "time": 1667908800000,
+      "string": "November 8, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "components"
+    ],
+    "excerpt": "<h2>Support', tags: [xmake, lua, C/C++, package, components], date: '2022-11-08',]</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n"
+  },
+  {
+    "title": "Xmake v2.7.2 released, build third-party libraries more intelligently",
+    "url": "/posts/xmake-update-v2.7.2",
+    "date": {
+      "time": 1665316800000,
+      "string": "October 9, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "trybuild",
+      "rule",
+      "cmake",
+      "autoconf"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n<p>It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.</p>\n"
+  },
+  {
+    "title": "Xmake v2.7.1 Released, Better C++ Modules Support",
+    "url": "/posts/xmake-update-v2.7.1",
+    "date": {
+      "time": 1661428800000,
+      "string": "August 25, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "remote",
+      "ccache",
+      "C++20",
+      "Modules",
+      "headerunits",
+      "fs-watcher"
+    ],
+    "excerpt": "<h2>author: Ruki}</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n"
+  },
+  {
+    "title": "Xmake v2.6.6 Released, Support Distributed Compilation and Build Cache",
+    "url": "/posts/xmake-update-v2.6.6",
+    "date": {
+      "time": 1653393600000,
+      "string": "May 24, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "remote",
+      "ccache",
+      "distributed-compilation"
+    ],
+    "excerpt": "<h2>tags: [xmake, lua, C/C++, remote, ccache, distributed-compilation], date: '2022-05-24',]</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n"
+  },
+  {
+    "title": "Xmake v2.6.5 released, Support remote compilation",
+    "url": "/posts/xmake-update-v2.6.5",
+    "date": {
+      "time": 1650801600000,
+      "string": "April 24, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "cargo",
+      "rust",
+      "remote-compilation"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n<p>It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.</p>\n"
+  },
+  {
+    "title": "Xmake and C/C++ Package Management",
+    "url": "/posts/xmake-and-package-management",
+    "date": {
+      "time": 1647086400000,
+      "string": "March 12, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Package",
+      "Manager"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build tool based on Lua.\nWe have done a detailed introduction to Xmake and build system in previous articles. Introduction: [C/C++ build system, I use xmake](https://github.com/xmake-io/xmake/wiki/C-and-Cplusplus-build-system...</p>\n<p>If you already have a general understanding of Xmake, you will know that it is not only a build tool,\nbut also has built-in support for C/C++ package management. We can also understand Xmake as:</p>\n<pre><code>Xmake = Build backend + Project Generator + Package Manager\n</code></pre>\n"
+  },
+  {
+    "title": "Xmake v2.6.4 released, Improve a lot of package management features",
+    "url": "/posts/xmake-update-v2.6.4",
+    "date": {
+      "time": 1646654400000,
+      "string": "March 7, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Vcpkg"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n<p>It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.</p>\n"
+  },
+  {
+    "title": "Xmake v2.6.3 released, Support Vcpkg manifest mode",
+    "url": "/posts/xmake-update-v2.6.3",
+    "date": {
+      "time": 1642852800000,
+      "string": "January 22, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Vcpkg"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n<p>It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.</p>\n"
+  },
+  {
+    "title": "Xmake v2.6.2 released, Support building Linux kernel driver module",
+    "url": "/posts/xmake-update-v2.6.2",
+    "date": {
+      "time": 1639742400000,
+      "string": "December 17, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Linux",
+      "Driver"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> is a lightweight cross-platform build utility based on Lua.</p>\n<p>It is very lightweight and has no dependencies because it has a built-in Lua runtime.</p>\n<p>It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.</p>\n"
+  },
+  {
+    "title": "xmake v2.6.1 released, Switch to Lua5.4 runtime, Support Rust and C++ mixed compilation",
+    "url": "/posts/xmake-update-v2.6.1",
+    "date": {
+      "time": 1638532800000,
+      "string": "December 3, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Rust",
+      "Lua5.4",
+      "C++20",
+      "Modules"
+    ],
+    "excerpt": "<h2>compilation', tags: [xmake, lua, C/C++, Rust, Lua5.4, C++20, Modules], date: '2021-12-03',]</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started qui...</p>\n<p>In this version, we have added a lot of heavyweight new features, such as: Nim language project build support, Keil MDK, Circle and Wasi toolchain support.</p>\n"
+  },
+  {
+    "title": "xmake v2.5.9 released, Improve C++20 Modules and support Nim, Keil MDK and Unity Build",
+    "url": "/posts/xmake-update-v2.5.9",
+    "date": {
+      "time": 1635595200000,
+      "string": "October 30, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Nim",
+      "Keil",
+      "MDK",
+      "circle",
+      "Unity",
+      "Build",
+      "C++20",
+      "Modules",
+      "lua5.4"
+    ],
+    "excerpt": "<h2>Unity Build', tags: [xmake, lua, C/C++, Nim, Keil, MDK, circle, Unity, Build,]</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started qui...</p>\n<p>In this version, we have added a lot of heavyweight new features, such as: Nim language project build support, Keil MDK, Circle and Wasi toolchain support.</p>\n"
+  },
+  {
+    "title": "xmake v2.5.8 is released, Support Pascal/Swig program and Lua53 runtime",
+    "url": "/posts/xmake-update-v2.5.8",
+    "date": {
+      "time": 1633694400000,
+      "string": "October 8, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "pascal",
+      "swig",
+      "lua5.3"
+    ],
+    "excerpt": "<p>title: xmake v2.5.8 is released, Support Pascal/Swig program and Lua53 runtime\ntags: [xmake, lua, C/C++, pascal, swig, lua5.3]\ndate: 2021-10-08\nauthor: Ruki</p>\n<hr>\n<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started...</p>\n<p>In this version, we mainly added support for the construction of Pascal language projects and Swig modules, and for the Vala language support added in the previous version, we have also made further improvements, adding support for the construction of dynamic and static libraries.</p>\n"
+  },
+  {
+    "title": "xmake v2.5.7 released, Use lockfile to freeze package dependencies and Vala/Metal language support",
+    "url": "/posts/xmake-update-v2.5.7",
+    "date": {
+      "time": 1630238400000,
+      "string": "August 29, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "lock",
+      "package",
+      "vala"
+    ],
+    "excerpt": "<h2>language support', tags: [xmake, lua, C/C++, lock, package, vala], date: '2021-08-29',]</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started qui...</p>\n<p>In this version, we have added a lot of new features. Not only did we increase the compilation support for Vala and Metal languages, we also improved the package dependency management, which can support the locking and updating of dependent packages like npm/package.lock, so The user's project will...</p>\n"
+  },
+  {
+    "title": "xmake v2.5.6 released, Improve compatibility of pre-compiled binary package",
+    "url": "/posts/xmake-update-v2.5.6",
+    "date": {
+      "time": 1627300800000,
+      "string": "July 26, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "mirror",
+      "package"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started qui...</p>\n<p>This is a stability fix version, which mainly fixes and improves some compatibility issues related to pre-compiled binary packages. In addition, some useful interfaces have been added to set the default compilation platform, architecture and mode, as well as the allowed compilation platform, archite...</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">Github</a></li>\n<li><a href=\"https://xmake.io/\">Document</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake v2.5.5 released, Support to download and install precompiled image packages",
+    "url": "/posts/xmake-update-v2.5.5",
+    "date": {
+      "time": 1625054400000,
+      "string": "June 30, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "mirror",
+      "package"
+    ],
+    "excerpt": "<p>title: xmake v2.5.5 released, Support to download and install precompiled image packages\ntags: [xmake, lua, C/C++, mirror, package]\ndate: 2021-06-30\nauthor: Ruki</p>\n<hr>\n<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started...</p>\n<p>In version 2.5.5, we continue to improve the experience of remote package integration, realize the pre-compiled package in the cloud, and then directly download the integrated pre-compiled binary package. This can greatly reduce the installation time of some packages that are very slow to compile.</p>\n"
+  },
+  {
+    "title": "xmake v2.5.4 Released, Support apt/portage package manager and improve xrepo shell",
+    "url": "/posts/xmake-update-v2.5.4",
+    "date": {
+      "time": 1621080000000,
+      "string": "May 15, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "apt",
+      "portage",
+      "shell",
+      "package"
+    ],
+    "excerpt": "<h2>shell', tags: [xmake, lua, C/C++, apt, portage, shell, package], date: '2021-05-15',]</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started qui...</p>\n<p>In version 2.5.4, we added support for Apt and Portage package managers. On Ubuntu/Gentoo, we can also use <code>add_requires</code> to quickly integrate the packages they provide.</p>\n"
+  },
+  {
+    "title": "C/C++ build system, I use xmake",
+    "url": "/posts/please-use-xmake",
+    "date": {
+      "time": 1620043200000,
+      "string": "May 3, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "buildsystem"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">XMake</a> is a modern C/C++ build system based on Lua.</p>\n<p>Its grammar is concise and easy to use, friendly to novices, even if you don't know Lua at all, you can get started quickly, and it is completely free of any dependencies, lightweight, and cross-platform.</p>\n<p>At the same time, it is also a self-satisfied build system with a powerful package management system and a fast build engine.</p>\n"
+  },
+  {
+    "title": "xmake v2.5.3 Released, Support to build Linux bpf program and integrate Conda packages",
+    "url": "/posts/xmake-update-v2.5.3",
+    "date": {
+      "time": 1617883200000,
+      "string": "April 8, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "bpf",
+      "conda",
+      "linux"
+    ],
+    "excerpt": "<h2>packages', tags: [xmake, lua, C/C++, toolchains, bpf, conda, linux], date: '2021-04-08',]</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started qui...</p>\n<p>In version 2.5.3, we have been able to build linux and android bpf programs.</p>\n"
+  },
+  {
+    "title": "xmake v2.5.2 released, Support pull remote cross-toolchain and package integration",
+    "url": "/posts/xmake-update-v2.5.2",
+    "date": {
+      "time": 1614427200000,
+      "string": "February 27, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "xrepo",
+      "packages",
+      "cross-toolchains"
+    ],
+    "excerpt": "<h2>tags: [xmake, lua, C/C++, toolchains, xrepo, packages, cross-toolchains], date: '2021-02-27',]</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started qui...</p>\n<p>In version 2.5.2, we added a heavyweight new feature: <code>Pull remote cross-compilation toolchain automatically</code>.</p>\n"
+  },
+  {
+    "title": "A luarocks build plugin for lua module with c/c++ based on xmake",
+    "url": "/posts/luarocks-build-xmake-v1.0",
+    "date": {
+      "time": 1611316800000,
+      "string": "January 22, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "xrepo",
+      "packages",
+      "vcpkg",
+      "conan",
+      "Apple",
+      "Silicon"
+    ],
+    "excerpt": "<p><a href=\"https://luarocks.org/\">luarocks</a> is a package management tool of lua, which provides the installation and integration of various lua modules.</p>\n<p>When users install lua modules, it will use the built-in build system to build lua module with c/c++ codes.</p>\n<p>However, it's build system only provides simple configuration. For complex c/c++ modules, it is a little bit powerless, and it cannot be flexibly switch the toolchain.</p>\n"
+  },
+  {
+    "title": "xmake v2.5.1 released, Support for Apple Silicon and more powerful C/C++ package management",
+    "url": "/posts/xmake-update-v2.5.1",
+    "date": {
+      "time": 1610798400000,
+      "string": "January 16, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "xrepo",
+      "packages",
+      "vcpkg",
+      "conan",
+      "Apple",
+      "Silicon"
+    ],
+    "excerpt": "<h2>package management', tags: [xmake, lua, C/C++, toolchains, xrepo, packages, vcpkg,]</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, very friendly to novices, can get started quickly in a shor...</p>\n<p>This is the first version of xmake this year and the first version that is fully adapted to support Apple Silicon (macOS ARM) devices.</p>\n"
+  },
+  {
+    "title": "xmake v2.3.9 released, Add independent Xrepo C/C++ package manager",
+    "url": "/posts/xmake-update-v2.3.9",
+    "date": {
+      "time": 1606219200000,
+      "string": "November 24, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "xrepo",
+      "packages",
+      "vcpkg",
+      "conan"
+    ],
+    "excerpt": "<h2>author: Ruki}</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, very friendly to novices, can get started quickly in a shor...</p>\n<p>In this new version, we focus on improving the dependency package management of xmake, adding support for the pacman package manager under Archlinux and MSYS2/Mingw, and we have further enriched the official package repository of xmake [xmake-repo](https: //github.com/xmake-io/xmake-repo), more than...</p>\n"
+  },
+  {
+    "title": "Xrepo, A modern cross-platform C/C++ package manager",
+    "url": "/posts/xrepo-new-command",
+    "date": {
+      "time": 1605441600000,
+      "string": "November 15, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "xrepo",
+      "package",
+      "manager",
+      "vcpkg",
+      "conan",
+      "dub",
+      "pacman"
+    ],
+    "excerpt": "<h2>author: Ruki}</h2>\n<p>xrepo is a cross-platform C/C++ package manager based on <a href=\"https://github.com/xmake-io/xmake\">Xmake</a>.</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xrepo\">Github</a></li>\n<li><a href=\"https://xrepo.xmake.io/#/\">Official Document</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake v2.3.8 released, Add Intel C++/Fortran Compiler Support",
+    "url": "/posts/xmake-update-v2.3.8",
+    "date": {
+      "time": 1602936000000,
+      "string": "October 17, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "wasm",
+      "emscripten",
+      "qt",
+      "intel",
+      "icc",
+      "fortran"
+    ],
+    "excerpt": "<h2>author: Ruki}</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, very friendly to novices, can get started quickly in a shor...</p>\n<p>In this new version, we have made full platform support for the Intel series of C++ and Fortran compilers, and improved the Wasm tool chain support added in the previous version, and also supported the Qt SDK for Wasm.</p>\n"
+  },
+  {
+    "title": "xmake v2.3.7 released, Add tinyc and emscripten toolchains",
+    "url": "/posts/xmake-update-v2.3.7",
+    "date": {
+      "time": 1600084800000,
+      "string": "September 14, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "tinyc",
+      "emscripten",
+      "qt",
+      "cuda"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, very friendly to novices, can get started quickly in a shor...</p>\n<p>With the continuous iterative development of xmake in recent years, xmake has harvested 2.9K stars, 300+ forks, 30+ contributors on Github, and handled 900+ issues, 5400+ Commits, and active users are also growing.</p>\n<p><img src=\"https://tboox.org/static/img/xmake/star-history.png\" alt=\"\"></p>\n"
+  },
+  {
+    "title": "xmake v2.3.6 released, Added fortran compilation support",
+    "url": "/posts/xmake-update-v2.3.6",
+    "date": {
+      "time": 1595937600000,
+      "string": "July 28, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "fortran",
+      "zig",
+      "golang",
+      "dlang"
+    ],
+    "excerpt": "<p>This version focuses on some improvements to the support of other languages, such as fortran compilation support, experimental support for zig language, and third-party dependency package support and cross-compilation support for golang/dlang.</p>\n<p>Although, xmake focuses on c/c++ build support, other languages support xmake will also make some improvements from time to time. Its main purpose is not to replace their official build system, but only to support mixed compilation with c/c++ , To better serve c/c++ projects,\nAfter all, some c/c++ p...</p>\n<p>In addition, regarding c/c++, we also support the header file dependency format of the new <code>/sourceDependencies xxx.json</code> output in the vs preview version (this is more reliable and stable for multi-language header file dependency detection).</p>\n"
+  },
+  {
+    "title": "xmake v2.3.5 released, Multi-toolchain flexible switching support",
+    "url": "/posts/xmake-update-v2.3.5",
+    "date": {
+      "time": 1593345600000,
+      "string": "June 28, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "cross-compilation"
+    ],
+    "excerpt": "<p>The main work of this version is to continue to improve the support of the tool chain. Although the previous version achieved modular tool chain extension through refactoring, for one compilation, I want to flexibly switch the compilation on the cross tool chain/Host tool chain. Not very good suppor...</p>\n<p>In addition, this version also improves the problem of slow downloading of remote dependent packages integrated using <code>add_requires</code>, adding proxy settings and local package retrieval multiplexing support to improve this problem. Of course, the best way is to get a domestic CDN to speed up the downl...</p>\n<p>There are some minor changes and bug fixes, you can see the updated content at the bottom of the article.</p>\n"
+  },
+  {
+    "title": "xmake v2.3.4 released, better toolchain support",
+    "url": "/posts/xmake-update-v2.3.4",
+    "date": {
+      "time": 1591358400000,
+      "string": "June 5, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "cross-compilation"
+    ],
+    "excerpt": "<p>In order to make xmake better support cross-compilation, this version I refactored the entire tool chain, making the tool chain switching more convenient and fast, and now users can easily extend their tool chain in xmake.lua.</p>\n<p>With regard to platform support, we have added support for *BSD systems. In addition, this version also adds a ninja theme style to achieve ninja-like compilation progress display, for example:</p>\n<p>&lt;img src=&quot;https://xmake.io/assets/img/theme/ninja.png&quot; width=&quot;60%&quot; /&gt;</p>\n"
+  },
+  {
+    "title": "xmake v2.3.3 released, Support for building iOS/MacOS Framework and App",
+    "url": "/posts/xmake-update-v2.3.3",
+    "date": {
+      "time": 1587988800000,
+      "string": "April 27, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "framework",
+      "bundle",
+      "app",
+      "codesign"
+    ],
+    "excerpt": "<h2>tags: [xmake, lua, C/C++, framework, bundle, app, codesign], date: '2020-04-27',]</h2>\n<p>This version mainly expands the built-in build rules, and adds relevant rules to support the construction of iOS / MacOS related App application projects, Framework and Bundle programs.</p>\n<p>It also supports App signing, and provides related engineering templates to quickly create applications. In addition, this version has also made many improvements to Qt development and construction, adding support for Qt5.14.0 new version SDK and packaging and deployment support for Android It has a...</p>\n"
+  },
+  {
+    "title": "xmake-gradle v1.0.7 released, Integrate xmake to quickly build Android JNI program",
+    "url": "/posts/xmake-gradle-v1.0.7",
+    "date": {
+      "time": 1587124800000,
+      "string": "April 17, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "android",
+      "jni"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake-gradle\">xmake-gradle</a> is a gradle plugin that integrates xmake seamlessly.</p>\n<p>At present, there are two ways to do integrated development of android jni in gradle. It is supported by ndkBuild or CMake. Gradle also has built-in integration of these two tools.</p>\n<p>However, maintaining Android.mk is still very tedious, especially for large projects, and the dsl syntax of cmake is not simple and intuitive, and I personally don't like it very much. Therefore, I have used xmake to implement cross-platform development. It's simple, fast, friendly to novices, and i...</p>\n"
+  },
+  {
+    "title": "xmake v2.3.2, Build as fast as ninja",
+    "url": "/posts/xmake-update-v2.3.2",
+    "date": {
+      "time": 1585396800000,
+      "string": "March 28, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "ninja"
+    ],
+    "excerpt": "<p>This version focuses on refactoring and optimization of the internal parallel build mechanism, enabling parallel compilation of source files between multiple targets, and support for parallel links. It also optimizes some internal losses of xmake and fixes some bugs that affect compilation speed.\nTh...</p>\n<p>In addition, xmake also adds support for the sdcc compilation toolchain for compiling embedded programs such as 51/stm8.</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">Github</a></li>\n<li><a href=\"https://xmake.io/#/home\">Documents</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake v2.3.1 released, Seamless integration with other build systems",
+    "url": "/posts/xmake-update-v2.3.1",
+    "date": {
+      "time": 1582459200000,
+      "string": "February 23, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "autotools",
+      "cmake",
+      "ninja",
+      "mingw",
+      "msys"
+    ],
+    "excerpt": "<h2>author: Ruki}</h2>\n<p>In the past two months, I have made a lot of refactorings to improve xmake and added a lot of useful new features. Welcome to try it.</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">Project Source</a></li>\n<li><a href=\"https://xmake.io/\">Official Document</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake v2.2.9 released, Add experimental support for c++ 20 modules",
+    "url": "/posts/xmake-update-v2.2.9",
+    "date": {
+      "time": 1576929600000,
+      "string": "December 21, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "c++20",
+      "ts-modules"
+    ],
+    "excerpt": "<p>There are not many new features in this version. It mainly supports c++ 20 modules experimentally. Currently it supports the clang/msvc compiler. In addition, it improves a lot of user experience and improves some stability.</p>\n<p>In addition, this version adds socket.io support and scheduling support for coroutine io to prepare for remote compilation of the next version and subsequent distributed compilation.</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">Project Source</a></li>\n<li><a href=\"https://xmake.io/\">Official Document</a></li>\n</ul>\n"
+  },
+  {
+    "title": "Xmake Getting Started Tutorial 5, Introduction to Android platform compilation",
+    "url": "/posts/quickstart-5-build-android",
+    "date": {
+      "time": 1573819200000,
+      "string": "November 15, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "android",
+      "jni"
+    ],
+    "excerpt": "<p>xmake is a lightweight and modern c/c++ project building tool based on Lua. It's main features are: easy to use syntax, easy to use project maintenance,\nand a consistent build experience across platforms.</p>\n<p>This article mainly explains in detail how to compile libraries and executable programs that can run under android through xmake.</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">Project Source</a></li>\n<li><a href=\"https://xmake.io\">Official Document</a></li>\n</ul>\n"
+  },
+  {
+    "title": "Xmake Getting Started Tutorial 4, C/C++ project description settings",
+    "url": "/posts/quickstart-4-basic-project-settings",
+    "date": {
+      "time": 1573387200000,
+      "string": "November 10, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "c/c++",
+      "run",
+      "debug"
+    ],
+    "excerpt": "<p>Xmake is a lightweight and modern C/C++ project build tool based on Lua. Its main features are: easy to use syntax, easy to use project maintenance, and a consistent build experience across platforms.</p>\n<p>This article mainly explains in detail how to write some commonly used basic xmake.lua description configurations to achieve some simple C/C++ project build management.\nFor most small projects, these configurations are completely sufficient. In the later advanced tutorials in this series, I will exp...</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">Project Source</a></li>\n<li><a href=\"https://xmake.io/\">Official Documents</a></li>\n</ul>\n"
+  },
+  {
+    "title": "Xmake Getting Started Tutorial 1, Installation and Updates",
+    "url": "/posts/quickstart-1-installation",
+    "date": {
+      "time": 1573300800000,
+      "string": "November 9, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "installation",
+      "update"
+    ],
+    "excerpt": "<p>Xmake is a lightweight modern C/C++ project build tool based on Lua. Its main features are: easy to use syntax, more readable project maintenance, and a consistent build experience across platforms.</p>\n<p>This article mainly explains the installation process of xmake under various platforms.</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">Project Source</a></li>\n<li><a href=\"https://xmake.io\">Official Document</a></li>\n</ul>\n"
+  },
+  {
+    "title": "Xmake Getting Started Tutorial 2, Create and build project",
+    "url": "/posts/quickstart-2-create-and-build-project",
+    "date": {
+      "time": 1573300800000,
+      "string": "November 9, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "c/c++"
+    ],
+    "excerpt": "<p>Xmake is a lightweight modern C/C++ project build tool based on Lua. Its main features are: easy to use syntax, more readable project maintenance, and a consistent build experience across platforms.</p>\n<p>This article focuses on how to create a xmake-based project and compilation operations.</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">Project Source</a></li>\n<li><a href=\"https://xmake.io/\">Official Document</a></li>\n</ul>\n"
+  },
+  {
+    "title": "Xmake Getting Started Tutorial 3, Run and Debug Program",
+    "url": "/posts/quickstart-3-run-and-debug",
+    "date": {
+      "time": 1573300800000,
+      "string": "November 9, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "c/c++",
+      "run",
+      "debug"
+    ],
+    "excerpt": "<p>Xmake is a lightweight modern C/C++ project build tool based on Lua. Its main features are: easy to use syntax, more readable project maintenance, and a consistent build experience across platforms.</p>\n<p>This article mainly explains in detail how to load and run the compiled target program, and how to debug.</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">Project Source</a></li>\n<li><a href=\"https://xmake.io/\">Official Documents</a></li>\n</ul>\n"
+  },
+  {
+    "title": "Uses xmake to build c++20 modules",
+    "url": "/posts/xmake-c++20-modules",
+    "date": {
+      "time": 1569153600000,
+      "string": "September 22, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "c++20",
+      "modules-ts"
+    ],
+    "excerpt": "<p>c++ modules have been officially included in the c++20 draft, and msvc and clang have been basically implemented on [modules-ts](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019 /p1103r3.pdf) Support, as c++20's footsteps are getting closer and closer to us, xmake has also begun to support c+...</p>\n<p>At present xmake has fully supported the implementation of the modules-ts of msvc/clang. For gcc, since its cxx-modules branch is still under development, it has not officially entered the master. I have read the changelog inside, and the related flags are still in the process. Constantly changing,...</p>\n<p>For more information about xmake's progress on c++modules: <a href=\"https://github.com/xmake-io/xmake/pull/569\">https://github.com/xmake-io/xmake/pull/569</a></p>\n"
+  },
+  {
+    "title": "xmake v2.2.8 released, New vs project generator",
+    "url": "/posts/xmake-update-v2.2.8",
+    "date": {
+      "time": 1566475200000,
+      "string": "August 22, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "VisualStudio"
+    ],
+    "excerpt": "<p>This version provides a new vs project generation plugin (thanks to @<a href=\"https://github.com/OpportunityLiu\">OpportunityLiu</a> for its contribution), which is quite different from the previous plugin processing mode for generating vs. The vs project is to open all the source files and hand them over to vs...</p>\n<p>In addition, we rewrote the entire luajit io runtime to better support the unicode character set, especially the support for Chinese characters on Windows.</p>\n<p>Finally, the new version began to try to install the lua bitcode script directly, to reduce the size of the installation package (controlled within 2.4M), improve the efficiency of xmake boot load.</p>\n"
+  },
+  {
+    "title": "Create and upload C/C++ packages to xmake's official repository",
+    "url": "/posts/xmake-upload-package",
+    "date": {
+      "time": 1565352000000,
+      "string": "August 9, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "repository"
+    ],
+    "excerpt": "<p>Xmake integrates built-in remote package dependency management. Users simply add the packages and versions they need to the project, and then automatically download and integrate the corresponding packages into the project, and compile and link.</p>\n<p>For example:</p>\n<pre><code class=\"language-lua\">add_requires(&quot;libuv master&quot;, &quot;ffmpeg&quot;, &quot;zlib 1.20.*&quot;)\nadd_requires(&quot;tbox &gt;1.6.1&quot;, {optional = true, debug = true})\nadd_requires(&quot;boost&quot;, {alias = &quot;boost_context&quot;, configs = {context = true}})\ntarget(&quot;test&quot;)\n    set_kind(&quot;binary&quot;)\n    add_files(&quot;src/*.c&quot;)\n    add_packages(&quot;libuv&quot;, &quot;ffmpeg&quot;, &quot;t...</code></pre>\n"
+  },
+  {
+    "title": "xmake v2.2.7 released, Improve to build Cuda project",
+    "url": "/posts/xmake-update-v2.2.7",
+    "date": {
+      "time": 1560772800000,
+      "string": "June 17, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Cuda"
+    ],
+    "excerpt": "<p>This version mainly makes a lot of improvements to the Cuda project, and adds support for lex/yacc compilation.\nIt also adds custom support for link phases such as <code>on_link</code>, <code>before_link</code> and <code>after_link</code> to the target.</p>\n<p>Here, I would also like to thank @<a href=\"https://github.com/OpportunityLiu\">OpportunityLiu</a> for support for xmake. In this version <a href=\"https://github.com/OpportunityLiu\">OpportunityLiu</a> contributed a lot of code to Improve Cuda support.\nIn addition, he helped improve xmake's entire unit testing framework, se...</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">project source</a></li>\n<li><a href=\"https://xmake.io/#/en/\">Official Document</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake vs cmake",
+    "url": "/posts/xmake-vs-cmake",
+    "date": {
+      "time": 1559131200000,
+      "string": "May 29, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "cmake"
+    ],
+    "excerpt": "<p>title: xmake vs cmake\ntags: [xmake, lua, cmake]\ndate: 2019-05-29\nauthor: Ruki</p>\n<hr>\n<p>First of all, I have to admit that cmake is very powerful and has developed for so many years. The whole ecology is quite perfect and the functions are quite rich. This is not the case with xmake.</p>\n<p>The purpose of doing xmake at the beginning was not to completely replace cmake. It didn't make any sense. I just thought that the syntax and ease of use of cmake couldn't satisfy me. I still prefer a simpler and more intuitive way to describe and maintain the project. Provides a near-consistent exp...</p>\n"
+  },
+  {
+    "title": "xmake v2.2.6 released, Support Qt/Adnroid application",
+    "url": "/posts/xmake-update-v2.2.6",
+    "date": {
+      "time": 1558872000000,
+      "string": "May 26, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Package"
+    ],
+    "excerpt": "<p>This version mainly improves the support of remote dependencies, and adds support for clib package dependencies.\nIn addition, xmake has been able to directly compile Qt/Android projects, and can directly generate apk packages and install them to device support.</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">project source</a></li>\n<li><a href=\"https://xmake.io/#/en/\">Official Document</a></li>\n</ul>\n<p>We can create a Qt empty project first, and try to compile and generate apk, for example:</p>\n"
+  },
+  {
+    "title": "Introduction of xmake v2.2.5 new features",
+    "url": "/posts/xmake-v2.2.5-new-features",
+    "date": {
+      "time": 1554120000000,
+      "string": "April 1, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "conan",
+      "homebrew",
+      "vcpkg"
+    ],
+    "excerpt": "<p>This version took more than four months to refactor and improve the package dependency management.\nThe official repository added common packages such as mysql and ffmpeg, and added a lot of features.</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">Github</a></li>\n<li><a href=\"https://xmake.io/#/home\">Documents</a></li>\n</ul>\n<pre><code class=\"language-lua\">add_requires(&quot;libuv master&quot;, &quot;ffmpeg&quot;, &quot;zlib 1.20.*&quot;)`\n</code></pre>\n"
+  },
+  {
+    "title": "xmake v2.2.5, More complete package dependency management",
+    "url": "/posts/xmake-update-v2.2.5",
+    "date": {
+      "time": 1553860800000,
+      "string": "March 29, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Package"
+    ],
+    "excerpt": "<p>This version took more than four months to refactor and improve the package dependency management.\nThe official repository added common packages such as mysql and ffmpeg, and added a lot of features.</p>\n<ul>\n<li>\n<p><a href=\"https://github.com/xmake-io/xmake\">Github</a></p>\n</li>\n<li>\n<p><a href=\"https://xmake.io/#/home\">Documents</a></p>\n</li>\n<li>\n<p>Add <code>string.serialize</code> and <code>string.deserialize</code> to serialize and deserialize object, function and others.</p>\n</li>\n<li>\n<p>Add <code>xmake g --menu</code></p>\n</li>\n<li>\n<p><a href=\"https://github.com/xmake-io/xmake/issues/283\">#283</a>: Add <code>target:installdir()</code> and <code>set_installdir()</code> api for target</p>\n</li>\n<li>\n<p>[#260](https://github.com/xmake-io/xmake/issues...</p>\n</li>\n</ul>\n"
+  },
+  {
+    "title": "xmake v2.2.3, A lot of new features support",
+    "url": "/posts/xmake-update-v2.2.3",
+    "date": {
+      "time": 1543579200000,
+      "string": "November 30, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Package"
+    ],
+    "excerpt": "<p>This version is mainly to improve the remote dependency package management, fix a lot of details, and this version can already support the upgrade from my upgrade through <code>xmake update</code>, it will be more convenient to upgrade xmake later.</p>\n<ul>\n<li>\n<p><a href=\"https://github.com/xmake-io/xmake\">Github</a></p>\n</li>\n<li>\n<p><a href=\"https://xmake.io/#/home\">Documents</a></p>\n</li>\n<li>\n<p><a href=\"https://github.com/xmake-io/xmake/issues/233\">#233</a>: Support windres for mingw platform</p>\n</li>\n<li>\n<p><a href=\"https://github.com/xmake-io/xmake/issues/239\">#239</a>: Add cparser compiler support</p>\n</li>\n<li>\n<p>Add plugin manager <code>xmake plugin --help</code></p>\n</li>\n<li>\n<p>Add <code>add_syslinks</code> api to add system libraries dependence</p>\n</li>\n<li>\n<p>Add `xmake l time x...</p>\n</li>\n</ul>\n"
+  },
+  {
+    "title": "xmake v2.2.2, We can also manage package dependencies for C/C++",
+    "url": "/posts/xmake-update-v2.2.2-package-deps",
+    "date": {
+      "time": 1539432000000,
+      "string": "October 13, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Package"
+    ],
+    "excerpt": "<p>Since my English is not very good, the article uses google translation, if you can't understand, please understand.</p>\n<p>After more than four months, <a href=\"https://github.com/xmake-io/xmake\">xmake</a> finally updated the new version v2.2.2 and launched the heavyweight feature: Natively Supported Remote Dependency Package Management.</p>\n<p>This feature, in fact, I have been writing for almost a year, before the initial completion, for the development of this feature and history, interested students can look at the relevant issues: <a href=\"https://github.com/xmake-io/xmake/issues/69\">#69</a>.</p>\n"
+  },
+  {
+    "title": "xmake-vscode v1.1.0 released, Support breakpoint debugging",
+    "url": "/posts/xmake-vscode-update-v1.1.0",
+    "date": {
+      "time": 1530187200000,
+      "string": "June 28, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "update"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake-vscode\">xmake-vscode</a> plugin is a xmake integration in Visual Studio Code.</p>\n<p>It is deeply integrated with <a href=\"https://github.com/xmake-io/xmake\">xmake</a> and vscode to provide a convenient and fast cross-platform c/c++ development and building.</p>\n<p>This version is mainly updated as follows:</p>\n"
+  },
+  {
+    "title": "xmake-vscode v1.0.8 released, support Qt/WDK development",
+    "url": "/posts/xmake-vscode-update-v1.0.8",
+    "date": {
+      "time": 1529928000000,
+      "string": "June 25, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "update"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake-vscode\">xmake-vscode</a> plugin is a xmake integration in Visual Studio Code.</p>\n<p>It is deeply integrated with <a href=\"https://github.com/xmake-io/xmake\">xmake</a> and vscode to provide a convenient and fast cross-platform c/c++ development and building.</p>\n<p>This version is mainly updated as follows:</p>\n"
+  },
+  {
+    "title": "xmake v2.2.1 released, Support Qt, WDK and Cuda Compilation Environments",
+    "url": "/posts/update-v2.2.1",
+    "date": {
+      "time": 1529236800000,
+      "string": "June 17, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      {
+        "update": "Qt"
+      },
+      "WDK",
+      "Cuda"
+    ],
+    "excerpt": "<p>title: xmake v2.2.1 released, Support Qt, WDK and Cuda Compilation Environments\ntags: [xmake, lua, update: Qt, WDK, Cuda]\ndate: 2018-06-17\nauthor: Ruki</p>\n<hr>\n<p>To make <a href=\"https://github.com/xmake-io/xmake\">xmake</a> more convenient and flexible to support other compilation environments, I spent four months to upgrade <a href=\"https://xmake.io/#/manual?id=custom-rule\">custom rule rules</a>.</p>\n<p>Users can now implement various compilation rules by customizing the rules, and xmake also has built-in common compilation rules that can be applied directly to the current project to support QT, WDK driver and Cuda compilation environments.</p>\n"
+  },
+  {
+    "title": "XMake, Support for the Qt SDK environment",
+    "url": "/posts/support-qt",
+    "date": {
+      "time": 1527681600000,
+      "string": "May 30, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "Qt",
+      "Widgets",
+      "QuickApplication"
+    ],
+    "excerpt": "<p>In the latest <a href=\"https://github.com/xmake-io/xmake\">xmake</a> v2.2.1 release, we have supported for the QT SDK environment, and we can fully develop QT applications\nin VScode/Sublime Text/IDEA Intellij and xmake plugin (<a href=\"https://github.com/xmake-io/xmake-vscode\">xmake-vscode</a>, [xmake-idea](https://githu...</p>\n<p>Users can completely switch to their most commonly used editor environments to develop and build QT programs, such as:</p>\n<p>&lt;img src=&quot;/static/img/xmake/vscode-qt.jpeg&quot; width=&quot;60%&quot; /&gt;</p>\n"
+  },
+  {
+    "title": "xmake v2.1.9 released, provide user custom menu config",
+    "url": "/posts/update-v2.1.9",
+    "date": {
+      "time": 1517659200000,
+      "string": "February 3, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "update"
+    ],
+    "excerpt": "<p>This release provide user custom menu config, like <code>make menuconfig</code> for linux:</p>\n<p>&lt;img src=&quot;/static/img/xmake/menuconf.gif&quot; width=&quot;60%&quot; /&gt;</p>\n<p>If you want to known more usage, please see <a href=\"https://xmake.io/\">online documents</a>。</p>\n"
+  },
+  {
+    "title": "xmake v2.1.8 released, improve IDE/Editor plugin integration",
+    "url": "/posts/update-v2.1.8",
+    "date": {
+      "time": 1510142400000,
+      "string": "November 8, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "update"
+    ],
+    "excerpt": "<p>This release improve IDE/Editor plugin integration, we provide the following plugins now:</p>\n<ul>\n<li>Vim Editor Plugin\n<ul>\n<li><a href=\"https://github.com/luzhlon/xmake.vim\">xmake.vim</a> (third-party, thanks <a href=\"https://github.com/luzhlon\">@luzhlon</a>)</li>\n</ul>\n</li>\n<li>Visual Studio Code Editor Plugin (<a href=\"https://github.com/xmake-io/xmake-vscode\">xmake-vscode</a>)</li>\n<li>Sublime Text Editor Plugin ([xmake-sublime](https://github.com/xmake-...</li>\n</ul>\n<p>If you want to known more usage, please see <a href=\"https://xmake.io/\">online documents</a>。</p>\n"
+  },
+  {
+    "title": "xmake-idea v1.0.3 released, a xmake integration in Intellij-IDEA",
+    "url": "/posts/xmake-idea-v1.0.3",
+    "date": {
+      "time": 1510056000000,
+      "string": "November 7, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "IntelliJ",
+      "IDEA",
+      "plugin"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake-idea\">xmake-idea</a> plugin is a xmake integration in Intellij-IDEA.</p>\n<p>It is deeply integrated with <a href=\"https://github.com/xmake-io/xmake\">xmake</a> and Intellij-IDEA to provide a convenient and fast cross-platform c/c++ development and building.</p>\n<p>And It also support other Intellij-based platform, like Clion, Android Studio and etc.</p>\n"
+  },
+  {
+    "title": "xmake-sublime v1.0.3 released, a xmake integration in sublime text",
+    "url": "/posts/xmake-sublime-v1.0.3",
+    "date": {
+      "time": 1508932800000,
+      "string": "October 25, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "sublime",
+      "plugin"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake-sublime\">xmake-sublime</a> plugin is a xmake integration in Sublime Text.</p>\n<p>It is deeply integrated with <a href=\"https://github.com/xmake-io/xmake\">xmake</a> and sublime text to provide a convenient and fast cross-platform c/c++ development and building.</p>\n<p>You need install <a href=\"https://github.com/xmake-io/xmake\">xmake</a> first and a project with <code>xmake.lua</code>.</p>\n"
+  },
+  {
+    "title": "xmake-vscode v1.0.1 released, a xmake integration in vscode",
+    "url": "/posts/xmake-vscode-update-v1.0.1",
+    "date": {
+      "time": 1508241600000,
+      "string": "October 17, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "update"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake-vscode\">xmake-vscode</a> plugin is a xmake integration in Visual Studio Code.</p>\n<p>It is deeply integrated with <a href=\"https://github.com/xmake-io/xmake\">xmake</a> and vscode to provide a convenient and fast cross-platform c/c++ development and building.</p>\n<ul>\n<li>Colorization</li>\n<li>Completion Lists</li>\n<li>StatusBar</li>\n<li>Commands</li>\n<li>Configuration</li>\n<li>Build</li>\n<li>Run and Debug</li>\n<li>Record and Playback</li>\n<li>Problem</li>\n</ul>\n"
+  },
+  {
+    "title": "xmake v2.1.7 released, fix some bugs and improve some details",
+    "url": "/posts/update-v2.1.7",
+    "date": {
+      "time": 1507896000000,
+      "string": "October 13, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "update"
+    ],
+    "excerpt": "<p>This release fix some bugs and improve some details. And provide <a href=\"https://marketplace.visualstudio.com/items?itemName=tboox.xmake-vscode#overview\">xmake-vscode</a> plugins to integrate vscode editor and xmake.</p>\n<p>If you want to known more usage, please see <a href=\"https://xmake.io/#/home\">online documents</a>。</p>\n<p>Source code: <a href=\"https://github.com/xmake-io/xmake\">Github</a>, <a href=\"https://gitee.com/tboox/xmake\">Gitee</a>.</p>\n"
+  },
+  {
+    "title": "xmake v2.1.6 released, fix some bugs",
+    "url": "/posts/update-v2.1.6",
+    "date": {
+      "time": 1502884800000,
+      "string": "August 16, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "released"
+    ],
+    "excerpt": "<p>This release fixed some bugs and improve some compilation problem.</p>\n<p>If you want to known more usage, please see <a href=\"https://xmake.io/#/home\">online documents</a>。</p>\n<p>Source code: <a href=\"https://github.com/xmake-io/xmake\">Github</a>, <a href=\"https://gitee.com/tboox/xmake\">Gitee</a>.</p>\n"
+  },
+  {
+    "title": "xmake v2.1.5 released, lots of new feature updates",
+    "url": "/posts/update-v2.1.5",
+    "date": {
+      "time": 1501934400000,
+      "string": "August 5, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "version",
+      "precompiled_header",
+      "compiler",
+      "cmake"
+    ],
+    "excerpt": "<p>This release introduces a number of new feature updates, as detailed in <a href=\"http://tboox.org/2017/07/29/new-features-v2.1.5/\">Some new features of xmake v2.1.5</a>.</p>\n<p>If you want to known more usage, please see <a href=\"https://xmake.io/#/home\">online documents</a>。</p>\n<p>Source code: <a href=\"https://github.com/xmake-io/xmake\">Github</a>, <a href=\"https://gitee.com/tboox/xmake\">Gitee</a>.</p>\n"
+  },
+  {
+    "title": "Some new features of xmake v2.1.5",
+    "url": "/posts/new-features-v2.1.5",
+    "date": {
+      "time": 1501329600000,
+      "string": "July 29, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "cmake",
+      "detect",
+      "compiler",
+      "features"
+    ],
+    "excerpt": "<p>This interface refers to the design of CMake for the <code>find_*</code> interfaces, which finds and adds package dependencies in the project target.</p>\n<pre><code class=\"language-lua\">target(&quot;test&quot;)\n    set_kind(&quot;binary&quot;)\n    add_files(&quot;*.c&quot;)\n    on_load(function (target)\n        import(&quot;lib.detect.find_package&quot;)\n        target:add(find_package(&quot;zlib&quot;))\n    end)\n</code></pre>\n<p>Now through <code>find_package</code> and <code>option</code>, we can achieve better package management.</p>\n"
+  },
+  {
+    "title": "xmake v2.1.4 released, support REPL",
+    "url": "/posts/update-v2.1.4",
+    "date": {
+      "time": 1494417600000,
+      "string": "May 10, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "version"
+    ],
+    "excerpt": "<p><code>xmake lua</code> has supported REPL(read-eval-print), we can write and test script more easily now.</p>\n<p>Enter interactive mode:</p>\n<pre><code class=\"language-bash\">$ xmake lua\n&gt; 1 + 2\n3</code></pre>\n"
+  },
+  {
+    "title": "xmake v2.1.3 released, improve security and stability",
+    "url": "/posts/update-v2.1.3",
+    "date": {
+      "time": 1491134400000,
+      "string": "April 2, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "version"
     ],
-    "excerpt": "<p>We're excited to announce a major enhancement to Xmake's package management system that will make dependency handling even more powerful and user-friendly.</p>\n"
+    "excerpt": "<ul>\n<li><a href=\"http://www.xmake.io/\">Homepage</a></li>\n<li><a href=\"http://www.xmake.io/#home\">Documents</a></li>\n</ul>\n<p>This version provide safer <code>xmake install</code> and <code>xmake uninstall</code>.</p>\n<p><img src=\"/static/img/xmake/safer_installation.png\" alt=\"safer_installation\"></p>\n"
   },
   {
-    "title": "Announcing Xmake 3.0",
-    "url": "/posts/xmake-3-0-release",
+    "title": "xmake v2.1.2 released, Improve vs201x project generator",
+    "url": "/posts/update-v2.1.2",
     "date": {
-      "time": 1705320000000,
-      "string": "January 15, 2024"
+      "time": 1490270400000,
+      "string": "March 23, 2017"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "release",
       "xmake",
-      "build-system"
+      "lua",
+      "version",
+      "golang",
+      "rust",
+      "dlang"
     ],
-    "excerpt": "<p>We are excited to announce the release of Xmake 3.0! This major release brings significant improvements in performance, usability, and feature completeness.</p>\n<p>Xmake 3.0 introduces a completely rewritten build engine that provides up to 3x faster build times compared to previous versions. The new engine features:</p>\n<ul>\n<li>Optimized dependency resolution</li>\n<li>Improved parallel compilation</li>\n<li>Better caching mechanisms</li>\n<li>Reduced memory usage</li>\n</ul>\n"
+    "excerpt": "<ul>\n<li>\n<p><a href=\"http://www.xmake.io/\">Homepage</a></p>\n</li>\n<li>\n<p><a href=\"http://www.xmake.io/#home\">Documents</a></p>\n</li>\n<li>\n<p>Add aur package script and support to install xmake from yaourt</p>\n</li>\n<li>\n<p>Add <a href=\"#https://xmake.io/#/manual?id=targetset_basename\">set_basename</a> api for target</p>\n</li>\n<li>\n<p>Support vs2017</p>\n</li>\n<li>\n<p>Support compile rust for android</p>\n</li>\n<li>\n<p>Improve vs201x project plugin and support multi-modes compilation.</p>\n</li>\n</ul>\n"
   },
   {
-    "title": "Building Cross-Platform Applications with Xmake",
-    "url": "/posts/building-cross-platform-apps",
+    "title": "xmake v2.1.1 released, support golang, dlang and rust languages",
+    "url": "/posts/update-v2.1.1",
     "date": {
-      "time": 1704888000000,
-      "string": "January 10, 2024"
+      "time": 1488628800000,
+      "string": "March 4, 2017"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "cross-platform",
-      "tutorial",
-      "cpp"
+      "xmake",
+      "lua",
+      "version",
+      "golang",
+      "rust",
+      "dlang"
+    ],
+    "excerpt": "<ul>\n<li>\n<p>Add <code>--links</code>, <code>--linkdirs</code> and <code>--includedirs</code> configure arguments</p>\n</li>\n<li>\n<p>Add app2ipa plugin</p>\n</li>\n<li>\n<p>Add dictionary syntax style for <code>xmake.lua</code></p>\n</li>\n<li>\n<p>Provide smart scanning and building mode without <code>xmake.lua</code></p>\n</li>\n<li>\n<p>Add <code>set_xmakever</code> api for <code>xmake.lua</code></p>\n</li>\n<li>\n<p>Add <code>add_frameworks</code> api for <code>objc</code> and <code>swift</code></p>\n</li>\n<li>\n<p>Support...</p>\n</li>\n<li>\n<p>Support vs2017 for the project plugin</p>\n</li>\n<li>\n<p>Improve gcc error and warning tips</p>\n</li>\n<li>\n<p>Improve lanuage module</p>\n</li>\n<li>\n<p>Improve print interface, support lua print and format output</p>\n</li>\n<li>\n<p>Automatically scan project files and generate it for building if xmake.lua not exists</p>\n</li>\n<li>\n<p>Modify license to Apache License 2.0</p>\n</li>\n<li>\n<p>Remove...</p>\n</li>\n<li>\n<p><a href=\"https://github.com/waruqi/xmake/issues/41\">#41</a>: Fix checker bug for windows</p>\n</li>\n<li>\n<p><a href=\"https://github.com/waruqi/xmake/issues/43\">#43</a>: Avoid to generate unnecessary .xmake directory</p>\n</li>\n<li>\n<p>Add c++ stl search directories for android</p>\n</li>\n<li>\n<p>Fix compile error for rhel 5.10</p>\n</li>\n<li>\n<p>Fix <code>os.iorun</code> bug</p>\n</li>\n</ul>\n"
+  },
+  {
+    "title": "The new version document of xmake",
+    "url": "/posts/new-document",
+    "date": {
+      "time": 1486468800000,
+      "string": "February 7, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "document"
+    ],
+    "excerpt": "<p>Before the <a href=\"#https://github.com/xmake-io/xmake/wiki\">wiki document</a> structure is not very good, and not convenient to retrieve.</p>\n<p>So I recently rewritten the document of xmake using <a href=\"https://docute.js.org/\">docute</a> again.</p>\n<p>The Documents:</p>\n"
+  },
+  {
+    "title": "An usage demo of xmake",
+    "url": "/posts/usage-demo",
+    "date": {
+      "time": 1484740800000,
+      "string": "January 18, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "usage",
+      "demo"
+    ],
+    "excerpt": "<p><a href=\"/project\"><img src=\"/static/img/xmake/usage_demo.gif\" alt=\"usage_demo\"></a></p>\n"
+  },
+  {
+    "title": "Scan source codes and build project without makefile",
+    "url": "/posts/build-without-makefile",
+    "date": {
+      "time": 1483790400000,
+      "string": "January 7, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "makefile",
+      "scanner"
+    ],
+    "excerpt": "<p>We recently added a new feature for xmake:</p>\n<pre><code>you need not write any make-like file (xmake.lua, makefile.am, cmakelist.txt, etc.) and also build it directly.\n</code></pre>\n<p>It will scan all source files and generate xmake.lua automatically for building project.</p>\n"
+  },
+  {
+    "title": "Two Syntax Styles of xmake",
+    "url": "/posts/syntax-style",
+    "date": {
+      "time": 1479211200000,
+      "string": "November 15, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "syntax",
+      "style"
+    ],
+    "excerpt": "<p>Recently, xmake's description syntax has been enhanced to support two different grammar styles at the same time.</p>\n<ul>\n<li>The <code>set-add</code> style</li>\n<li>The <code>key-val</code> style</li>\n</ul>\n<p>This is xmake's classic style, for example:</p>\n"
+  },
+  {
+    "title": "xmake v2.0.5 released!",
+    "url": "/posts/update-v2.0.5",
+    "date": {
+      "time": 1477828800000,
+      "string": "October 30, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "version"
+    ],
+    "excerpt": "<p>title: xmake v2.0.5 released!\ntags: [xmake, version]\ndate: 2016-10-30\nauthor: Ruki</p>\n<hr>\n<h3>New features</h3>\n<ul>\n<li>Add some interpreter builtin-modules</li>\n<li>Support ml64 assembler for windows x64</li>\n</ul>\n"
+  },
+  {
+    "title": "The xmake plugin for generating vstudio project file (vs2002 - 2015)",
+    "url": "/posts/generate-vs2015-project",
+    "date": {
+      "time": 1472472000000,
+      "string": "August 29, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "VisualStudio",
+      "plugin",
+      "vs2008",
+      "vs2015"
+    ],
+    "excerpt": "<p>Xmake provide a builtin-plugin for generating VisualStudio project file (vs2002 - 2015) now.</p>\n<p>.e.g</p>\n<p>We need enter the project directory first and run the following command if we want to generate vs2013 project.</p>\n"
+  },
+  {
+    "title": "xmake v2.0.4 released!",
+    "url": "/posts/update-v2.0.4",
+    "date": {
+      "time": 1472472000000,
+      "string": "August 29, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "version"
+    ],
+    "excerpt": "<p>title: xmake v2.0.4 released!\ntags: [xmake, version]\ndate: 2016-08-29\nauthor: Ruki</p>\n<hr>\n<h3>New features</h3>\n<ul>\n<li>Add native shell support for <code>xmake.lua</code>. .e.g <code>add_ldflags(&quot;$(shell pkg-config --libs sqlite3)&quot;)</code></li>\n<li>Enable pdb symbol files for windows</li>\n<li>Add debugger support on windows (vsjitdebugger, ollydbg, windbg ... )</li>\n<li>Add <code>getenv</code> interface for the global scope of <code>xmake.lua</code></li>\n<li>Add plugin for generating...</li>\n</ul>\n"
+  },
+  {
+    "title": "Running and debugging program using xmake",
+    "url": "/posts/support-debugger-on-windows",
+    "date": {
+      "time": 1469448000000,
+      "string": "July 25, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "symbolfile",
+      "run",
+      "debug",
+      "windbg",
+      "ollydbg",
+      "windows"
+    ],
+    "excerpt": "<p>xmake can run and debug the given target program now.</p>\n<p>We only need configure the debug mode to compile this target and run it.</p>\n<p>e.g.</p>\n"
+  },
+  {
+    "title": "How to complie project using the cross-toolchains",
+    "url": "/posts/how-to-compile-on-cross-toolchains",
+    "date": {
+      "time": 1469188800000,
+      "string": "July 22, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "cross-toolchains",
+      "cross-compiling"
     ],
-    "excerpt": "<p>Building applications that work across multiple platforms can be challenging, but Xmake makes it much easier. In this post, we'll explore how to use Xmake to build cross-platform applications.</p>\n<p>In today's diverse computing landscape, your users expect your applications to work on their preferred platform. Whether it's Windows, macOS, or Linux, Xmake provides the tools you need to build for all of them from a single codebase.</p>\n<p>Here's a simple example of how to configure Xmake for cross-platform builds:</p>\n"
+    "excerpt": "<p>xmake provides a convenient and flexible cross-compiling support, in most cases, we need not to configure complex toolchains prefix, for example: <code>arm-linux-</code></p>\n<p>As long as this toolchains meet the following directory structure:</p>\n<pre><code>/home/toolchains_sdkdir\n   - bin\n       - arm-linux-gcc\n       - arm-linux-ld\n       - ...\n   - lib\n       - libxxx.a\n   - include\n       - xxx.h\n</code></pre>\n"
   },
   {
-    "title": "Getting Started with Xmake",
-    "url": "/posts/post-3",
+    "title": "How to configure for compiling",
+    "url": "/posts/config-description",
     "date": {
-      "time": 1704456000000,
-      "string": "January 5, 2024"
+      "time": 1468929600000,
+      "string": "July 19, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "tutorial",
-      "getting-started"
+      "xmake",
+      "configure",
+      "android",
+      "auto-detection"
+    ],
+    "excerpt": "<p>xmake will automatically detect the system environment and create the most appropriate configuration to compile project when building a program</p>\n<p>Usually we only need to run:</p>\n<pre><code class=\"language-bash\">$ xmake\n</code></pre>\n"
+  },
+  {
+    "title": "How to install xmake",
+    "url": "/posts/how-to-install-xmake",
+    "date": {
+      "time": 1468929600000,
+      "string": "July 19, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "install",
+      "linux",
+      "windows",
+      "macosx",
+      "homebrew"
+    ],
+    "excerpt": "<ol>\n<li>Download xmake source codes</li>\n<li>Enter the source code directory</li>\n<li>Run <code>install.bat</code></li>\n<li>Select the installed directory and enter into this directory</li>\n<li>Please wait some mintues</li>\n</ol>\n<pre><code class=\"language-bash\">$ git clone [email protected]:waruqi/xmake.git\n$ cd ./xmake\n$ sudo ./install\n</code></pre>\n<pre><code class=\"language-bash\">$ ruby -e &quot;$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)&quot;\n$ sudo brew install xmake\n</code></pre>\n"
+  },
+  {
+    "title": "Builtin variables and shell",
+    "url": "/posts/builtinvar-and-shell",
+    "date": {
+      "time": 1468843200000,
+      "string": "July 18, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "shell",
+      "builtin-variables",
+      "pkg-config"
+    ],
+    "excerpt": "<p>xmake provides the grammar: <code>$(varname)</code> for supporting builtin variable.</p>\n<p>.e.g</p>\n<pre><code class=\"language-lua\">add_cxflags(&quot;-I$(buildir)&quot;)\n</code></pre>\n"
+  },
+  {
+    "title": "Build a simple project",
+    "url": "/posts/demo-build-a-simple-project",
+    "date": {
+      "time": 1468756800000,
+      "string": "July 17, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "demo",
+      "build",
+      "project",
+      "hello"
+    ],
+    "excerpt": "<p><a href=\"https://asciinema.org/a/79998\"><img src=\"https://asciinema.org/a/79998.png\" alt=\"asciicast\"></a></p>\n"
+  },
+  {
+    "title": "xmake v2.0.3 update!",
+    "url": "/posts/update-v2.0.3",
+    "date": {
+      "time": 1468756800000,
+      "string": "July 17, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      {
+        "update": "xmake.io"
+      },
+      "windows"
+    ],
+    "excerpt": "<p><a href=\"http://www.xmake.io\">Website</a>\n<a href=\"https://github.com/waruqi/xmake\">Sources</a></p>\n<ul>\n<li>\n<p>Add check includes dependence automatically</p>\n</li>\n<li>\n<p>Add print colors</p>\n</li>\n<li>\n<p>Add debugger support, .e.g <code>xmake run -d program ...</code></p>\n</li>\n<li>\n<p>Improve the interfaces of run shell</p>\n</li>\n<li>\n<p>Upgrade luajit to v2.0.4</p>\n</li>\n<li>\n<p>Improve to generate makefile plugin</p>\n</li>\n<li>\n<p>Optimizate the multitasking compiling speed</p>\n</li>\n</ul>\n"
+  },
+  {
+    "title": "Batch checking library functions",
+    "url": "/posts/batch-check-functions",
+    "date": {
+      "time": 1468670400000,
+      "string": "July 16, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "check",
+      "batch",
+      "function"
+    ],
+    "excerpt": "<p>xmake provides some api, which can detect whether exist some library functions.</p>\n<pre><code class=\"language-lua\">\ntarget(&quot;test&quot;)</code></pre>\n"
+  },
+  {
+    "title": "How to build a simple project quickly",
+    "url": "/posts/how-to-build-a-simple-project",
+    "date": {
+      "time": 1468670400000,
+      "string": "July 16, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "build",
+      "project",
+      "hello"
+    ],
+    "excerpt": "<p>We create an empty console project first:</p>\n<pre><code class=\"language-bash\">$ xmake create -P ./hello\n\ncreate hello ...\ncreate ok!👌\n</code></pre>\n"
+  },
+  {
+    "title": "Plugin development of hello xmake",
+    "url": "/posts/plugin-hello",
+    "date": {
+      "time": 1467979200000,
+      "string": "July 8, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "plugin",
+      "example",
+      "hello"
+    ],
+    "excerpt": "<p>xmake v2.0 has supported the plugin module and we can develop ourself plugin module conveniently.</p>\n<p>We can run command <code>xmake -h</code> to look over some builtin plugins of xmake</p>\n<pre><code>    Plugins: \n        l, lua                                 Run the lua script.\n        m, macro                               Run the given macro.\n           doxygen                             Generate the doxygen document.\n           hello                               Hello xmake!...</code></pre>\n"
+  },
+  {
+    "title": "xmake v2.0.2 update!",
+    "url": "/posts/update-v2.0.2",
+    "date": {
+      "time": 1467806400000,
+      "string": "July 6, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      {
+        "update": "xmake.io"
+      },
+      "windows"
     ],
-    "excerpt": "<p>Xmake is a modern build system that makes C/C++ development easier and more efficient. In this guide, we'll walk through the basics of setting up and using Xmake.</p>\n<p>Installing Xmake is straightforward. You can use one of the following methods:</p>\n<p>Let's create a simple C++ project:</p>\n"
+    "excerpt": "<p><a href=\"https://xmake.io\">Website</a>\n<a href=\"https://github.com/waruqi/xmake\">Sources</a></p>\n<ul>\n<li>\n<p>Change install and uninstall actions</p>\n</li>\n<li>\n<p>Update templates</p>\n</li>\n<li>\n<p>Improve to check function</p>\n</li>\n<li>\n<p><a href=\"https://github.com/waruqi/xmake/issues/7\">#7</a>: Fix create project bug with '[targetname]'</p>\n</li>\n<li>\n<p><a href=\"https://github.com/waruqi/xmake/issues/9\">#9</a>: Support clang with c++11</p>\n</li>\n<li>\n<p>Fix api scope leaks bug</p>\n</li>\n<li>\n<p>Fix path bug for windows</p>\n</li>\n<li>\n<p>Fix check function bug</p>\n</li>\n<li>\n<p>Fix check toolchains failed</p>\n</li>\n<li>\n<p>Fix compile failed for...</p>\n</li>\n</ul>\n"
   },
   {
-    "title": "Advanced Package Management",
-    "url": "/posts/post-4",
+    "title": "publish xmake.io",
+    "url": "/posts/xmake-io",
     "date": {
-      "time": 1704283200000,
-      "string": "January 3, 2024"
+      "time": 1467460800000,
+      "string": "July 2, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "package-management",
-      "advanced"
+      "xmake",
+      "website",
+      "xmake.io"
     ],
-    "excerpt": "<p>Xmake provides a powerful package management system that simplifies dependency handling in C/C++ projects.</p>\n<p>Adding packages to your project is simple:</p>\n<pre><code class=\"language-lua\">target(&quot;myapp&quot;)\n    set_kind(&quot;binary&quot;)\n    add_files(&quot;src/*.cpp&quot;)\n    add_packages(&quot;fmt&quot;, &quot;spdlog&quot;, &quot;nlohmann_json&quot;)\n</code></pre>\n"
+    "excerpt": "<p>We new a site for the open source project: xmake</p>\n<p><a href=\"https://xmake.io\">https://xmake.io</a></p>\n"
   },
   {
-    "title": "IDE Integration Guide 10",
-    "url": "/posts/post-10",
+    "title": "A simple xmake.lua",
+    "url": "/posts/a-simple-demo",
     "date": {
-      "time": 1704110400000,
-      "string": "January 1, 2024"
+      "time": 1466942400000,
+      "string": "June 26, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "ide",
-      "integration"
+      "xmake",
+      "example",
+      "xmake.lua"
     ],
-    "excerpt": "<p>Xmake provides excellent integration with popular IDEs and editors, making development more efficient.</p>\n<p>Install the Xmake extension for VS Code:</p>\n<ol>\n<li>Open VS Code</li>\n<li>Go to Extensions (Ctrl+Shift+X)</li>\n<li>Search for &quot;Xmake&quot;</li>\n<li>Install the extension</li>\n</ol>\n"
+    "excerpt": "<p>A simplest xmake.lua</p>\n<pre><code class=\"language-lua\">    -- define a target with named 'demo'\n    target(&quot;demo&quot;)\n\n-- set the target kind, .e.g 'binary' is a console program\n        -- - static: a static library\n        -- - shared: a shared library\n        set_kind(&quot;binary&quot;)</code></pre>\n"
   },
   {
-    "title": "IDE Integration Guide",
-    "url": "/posts/post-5",
+    "title": "Compile project",
+    "url": "/posts/compile-project",
     "date": {
-      "time": 1704110400000,
-      "string": "January 1, 2024"
+      "time": 1466942400000,
+      "string": "June 26, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "ide",
-      "integration"
+      "xmake",
+      "compile",
+      "configure"
     ],
-    "excerpt": "<p>Xmake provides excellent integration with popular IDEs and editors, making development more efficient.</p>\n<p>Install the Xmake extension for VS Code:</p>\n<ol>\n<li>Open VS Code</li>\n<li>Go to Extensions (Ctrl+Shift+X)</li>\n<li>Search for &quot;Xmake&quot;</li>\n<li>Install the extension</li>\n</ol>\n"
+    "excerpt": "<p>Typically, you only need to execute the following command for compiling project.</p>\n<pre><code class=\"language-bash\">    xmake\n</code></pre>\n<p>xmake will probe your host environment and target platform automaticly.</p>\n"
   },
   {
-    "title": "IDE Integration Guide",
-    "url": "/posts/post-6",
+    "title": "Create project",
+    "url": "/posts/create-project",
     "date": {
-      "time": 1704110400000,
-      "string": "January 1, 2024"
+      "time": 1466942400000,
+      "string": "June 26, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "ide",
-      "integration"
+      "xmake",
+      "create",
+      "project",
+      "template"
     ],
-    "excerpt": "<p>Xmake provides excellent integration with popular IDEs and editors, making development more efficient.</p>\n<p>Install the Xmake extension for VS Code:</p>\n<ol>\n<li>Open VS Code</li>\n<li>Go to Extensions (Ctrl+Shift+X)</li>\n<li>Search for &quot;Xmake&quot;</li>\n<li>Install the extension</li>\n</ol>\n"
+    "excerpt": "<p>xmake provides some project templates, you can easily create an empty project.</p>\n<p>Create a c++ console project:</p>\n<pre><code class=\"language-bash\">        xmake create -l c++ -t 1 demo\n     or xmake create --language=c++ --template=1 demo\n</code></pre>\n"
   },
   {
-    "title": "IDE Integration Guide",
-    "url": "/posts/post-7",
+    "title": "Package target",
+    "url": "/posts/package-target",
     "date": {
-      "time": 1704110400000,
-      "string": "January 1, 2024"
+      "time": 1466942400000,
+      "string": "June 26, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "ide",
-      "integration"
+      "xmake",
+      "package"
     ],
-    "excerpt": "<p>Xmake provides excellent integration with popular IDEs and editors, making development more efficient.</p>\n<p>Install the Xmake extension for VS Code:</p>\n<ol>\n<li>Open VS Code</li>\n<li>Go to Extensions (Ctrl+Shift+X)</li>\n<li>Search for &quot;Xmake&quot;</li>\n<li>Install the extension</li>\n</ol>\n"
+    "excerpt": "<p>Packages all targets for the current platform:</p>\n<pre><code class=\"language-bash\">    $xmake p\n    $xmake package\n</code></pre>\n<p>Packages the target test to the output directory: /tmp</p>\n"
   },
   {
-    "title": "IDE Integration Guide 8",
-    "url": "/posts/post-8",
+    "title": "Run target",
+    "url": "/posts/run-target",
     "date": {
-      "time": 1704110400000,
-      "string": "January 1, 2024"
+      "time": 1466942400000,
+      "string": "June 26, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "ide",
-      "integration"
+      "xmake",
+      "run"
     ],
-    "excerpt": "<p>Xmake provides excellent integration with popular IDEs and editors, making development more efficient.</p>\n<p>Install the Xmake extension for VS Code:</p>\n<ol>\n<li>Open VS Code</li>\n<li>Go to Extensions (Ctrl+Shift+X)</li>\n<li>Search for &quot;Xmake&quot;</li>\n<li>Install the extension</li>\n</ol>\n"
+    "excerpt": "<p>You can use xmake to run the given target and need not know where is the target program.</p>\n<p>e.g.</p>\n<p>We define a simple target with named 'test'.</p>\n"
   },
   {
-    "title": "IDE Integration Guide 9",
-    "url": "/posts/post-9",
+    "title": "xmake v2.0.1 update!",
+    "url": "/posts/update-v2.0.1",
     "date": {
-      "time": 1704110400000,
-      "string": "January 1, 2024"
+      "time": 1465473600000,
+      "string": "June 9, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "ide",
-      "integration"
+      "xmake",
+      "plugin",
+      "task",
+      "macro",
+      "update"
     ],
-    "excerpt": "<p>Xmake provides excellent integration with popular IDEs and editors, making development more efficient.</p>\n<p>Install the Xmake extension for VS Code:</p>\n<ol>\n<li>Open VS Code</li>\n<li>Go to Extensions (Ctrl+Shift+X)</li>\n<li>Search for &quot;Xmake&quot;</li>\n<li>Install the extension</li>\n</ol>\n"
+    "excerpt": "<p><a href=\"https://github.com/waruqi/xmake\">Sources</a></p>\n<ul>\n<li>\n<p>Add task api for running custom tasks</p>\n</li>\n<li>\n<p>Add plugin expansion and provide some builtin plugins</p>\n</li>\n<li>\n<p>Add export ide project plugin(.e.g makefile and will support to export other projects for vs, xcode in feature)</p>\n</li>\n<li>\n<p>Add demo plugin for printing 'hello xmake'</p>\n</li>\n<li>\n<p>Add make doxygen documents plugin</p>\n</li>\n<li>\n<p>Add mac...</p>\n</li>\n<li>\n<p>Rewrite interpreter for xmake.lua</p>\n</li>\n<li>\n<p>More strict syntax detection mechanism</p>\n</li>\n<li>\n<p>More strict api scope for xmake.lua</p>\n</li>\n<li>\n<p>Simplify template development</p>\n</li>\n<li>\n<p>Extend platforms, tools, templates and actions fastly</p>\n</li>\n<li>\n<p>Simplify api and support import modules</p>\n</li>\n<li>\n<p>Remove dependence for gnu make/nmake, no longer need...</p>\n</li>\n</ul>\n"
   }
 ]

+ 2420 - 88
docs/.vitepress/theme/zh-blog-data.js

@@ -1,158 +1,2490 @@
 export const posts = [
   {
-    "title": "Xmake 3.0 正式发布",
-    "url": "/zh/posts/xmake-3-0-release",
+    "title": "Xmake v2.9.1 发布,新增 native lua 模块和鸿蒙系统支持",
+    "url": "/zh/posts/xmake-update-v2.9.1",
     "date": {
-      "time": 1705320000000,
-      "string": "January 15, 2024"
+      "time": 1713787200000,
+      "string": "April 22, 2024"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "发布",
       "xmake",
-      "构建系统"
+      "lua",
+      "C/C++"
     ],
-    "excerpt": "<p>我们很高兴地宣布 Xmake 3.0 正式发布!这个重大版本在性能、易用性和功能完整性方面都带来了显著改进。</p>\n<p>Xmake 3.0 引入了完全重写的构建引擎,相比之前的版本提供了高达 3 倍的构建速度提升。新引擎具有以下特性:</p>\n<ul>\n<li>优化的依赖解析</li>\n<li>改进的并行编译</li>\n<li>更好的缓存机制</li>\n<li>减少内存使用</li>\n</ul>\n"
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
   },
   {
-    "title": "使用 Xmake 构建跨平台应用",
-    "url": "/zh/posts/cross-platform-development",
+    "title": "Xmake v2.8.7 发布,新增 cosmocc 工具链支持,一次编译到处运行",
+    "url": "/zh/posts/xmake-update-v2.8.7",
     "date": {
-      "time": 1704888000000,
-      "string": "January 10, 2024"
+      "time": 1708862400000,
+      "string": "February 25, 2024"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "跨平台",
-      "教程",
-      "cpp"
+      "xmake",
+      "lua",
+      "C/C++"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "Xmake v2.8.6 发布,新的打包插件:XPack",
+    "url": "/zh/posts/xmake-update-v2.8.6",
+    "date": {
+      "time": 1702641600000,
+      "string": "December 15, 2023"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "Xmake v2.8.5 发布,支持链接排序和单元测试",
+    "url": "/zh/posts/xmake-update-v2.8.5",
+    "date": {
+      "time": 1699185600000,
+      "string": "November 5, 2023"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "Xmake v2.8.3 发布,改进 Wasm 并支持 Xmake 源码调试",
+    "url": "/zh/posts/xmake-update-v2.8.3",
+    "date": {
+      "time": 1695729600000,
+      "string": "September 26, 2023"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "API",
+      "rust"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "Xmake v2.8.2 发布,官方包仓库数量突破 1k",
+    "url": "/zh/posts/xmake-update-v2.8.2",
+    "date": {
+      "time": 1692705600000,
+      "string": "August 22, 2023"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "API",
+      "rust"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "Xmake v2.8.1 发布,大量细节特性改进",
+    "url": "/zh/posts/xmake-update-v2.8.1",
+    "date": {
+      "time": 1689076800000,
+      "string": "July 11, 2023"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "performance",
+      "mingw64",
+      "wasm"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "Xmake v2.7.8 发布,改进包虚拟环境和构建速度",
+    "url": "/zh/posts/xmake-update-v2.7.8",
+    "date": {
+      "time": 1680609600000,
+      "string": "April 4, 2023"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "performance",
+      "mingw64",
+      "wasm"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "Xmake v2.7.7 发布,支持 Haiku 平台,改进 API 检测和 C++ Modules 支持",
+    "url": "/zh/posts/xmake-update-v2.7.7",
+    "date": {
+      "time": 1677153600000,
+      "string": "February 23, 2023"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "modules",
+      "haiku",
+      "c++modules"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "Xmake v2.7.6 发布,新增 Verilog 和 C++ Modules 分发支持",
+    "url": "/zh/posts/xmake-update-v2.7.6",
+    "date": {
+      "time": 1674388800000,
+      "string": "January 22, 2023"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "modules",
+      "verilog"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "Xmake v2.7.3 发布,包组件和 C++ 模块增量构建支持",
+    "url": "/zh/posts/xmake-update-v2.7.3",
+    "date": {
+      "time": 1667908800000,
+      "string": "November 8, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "package",
+      "components"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "Xmake v2.7.2 发布,更加智能化构建第三方库",
+    "url": "/zh/posts/xmake-update-v2.7.2",
+    "date": {
+      "time": 1665316800000,
+      "string": "October 9, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "trybuild",
+      "rule",
+      "cmake",
+      "autoconf"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "Xmake v2.7.1 发布,更好的 C++ Modules 支持",
+    "url": "/zh/posts/xmake-update-v2.7.1",
+    "date": {
+      "time": 1661428800000,
+      "string": "August 25, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "remote",
+      "ccache",
+      "C++20",
+      "Modules",
+      "headerunits",
+      "fs-watcher"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "Xmake v2.6.6 发布,分布式编译和缓存支持",
+    "url": "/zh/posts/xmake-update-v2.6.6",
+    "date": {
+      "time": 1653393600000,
+      "string": "May 24, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "remote",
+      "ccache",
+      "distributed-compilation"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "Summer2022:暑期来 Xmake 社区做项目吧,还有奖金领取哦",
+    "url": "/zh/posts/xmake-summer-2022",
+    "date": {
+      "time": 1651406400000,
+      "string": "May 1, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "summer",
+      "开源之夏"
+    ],
+    "excerpt": "<p>开源之夏是开源软件供应链点亮计划下的暑期活动,由中国科学院软件研究所与openEuler社区联合主办,旨在鼓励在校学生积极参与开源软件的开发维护,促进优秀开源软件社区的蓬勃发展。作为每年暑期最火热的开源活动,开源之夏如今已进入第三届。</p>\n<p>2022年,开源之夏联合124家开源社区,针对开源项目的开发与维护提供mini任务,学生可自主选择感兴趣的项目进行申请,并在中选后获得社区资深开发者亲自指导的机会。项目成功结项并贡献给社区后,参与者将获得开源之夏活动奖金和结项证书。</p>\n<p>开源之夏网站:<a href=\"https://summer.iscas.ac.cn/\">https://summer.iscas.ac.cn/</a></p>\n"
+  },
+  {
+    "title": "xmake v2.6.5 发布,远程编译支持",
+    "url": "/zh/posts/xmake-update-v2.6.5",
+    "date": {
+      "time": 1650801600000,
+      "string": "April 24, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "cargo",
+      "rust",
+      "remote-compilation"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "Xmake 和 C/C++ 包管理",
+    "url": "/zh/posts/xmake-and-package-management",
+    "date": {
+      "time": 1647086400000,
+      "string": "March 12, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Package",
+      "Manager"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,关于 Xmake 与构建系统的介绍,我们已经在之前的文章中做了详细的介绍:<a href=\"https://zhuanlan.zhihu.com/p/370008884\">C/C++ 构建系统,我用 xmake</a>。</p>\n<p>如果大家已经对 Xmake 已经有了大概的了解,就会知道,它不仅仅是一个构建工具,还内置了对 C/C++ 包管理的支持,我们也可以把 Xmake 理解为:</p>\n<pre><code>Xmake = Build backend + Project Generator + Package Manager\n</code></pre>\n"
+  },
+  {
+    "title": "xmake v2.6.4 发布,大量包管理特性改进",
+    "url": "/zh/posts/xmake-update-v2.6.4",
+    "date": {
+      "time": 1646654400000,
+      "string": "March 7, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Package",
+      "Manager"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "xmake v2.6.3 发布,支持 vcpkg 清单模式",
+    "url": "/zh/posts/xmake-update-v2.6.3",
+    "date": {
+      "time": 1642852800000,
+      "string": "January 22, 2022"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Linux",
+      "Vcpkg"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "xmake v2.6.2 发布,新增 Linux 内核驱动模块构建支持",
+    "url": "/zh/posts/xmake-update-v2.6.2",
+    "date": {
+      "time": 1639742400000,
+      "string": "December 17, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Linux",
+      "Driver"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具。</p>\n<p>它非常的轻量,没有任何依赖,因为它内置了 Lua 运行时。</p>\n<p>它使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "xmake v2.6.1 发布,使用 Lua5.4 运行时,Rust 和 C++ 混合编译支持",
+    "url": "/zh/posts/xmake-update-v2.6.1",
+    "date": {
+      "time": 1638532800000,
+      "string": "December 3, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Rust",
+      "Lua5.4",
+      "C++20",
+      "Modules"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n<p>这个版本,我们正式将默认的 Luajit 运行时切换到 Lua5.4 运行时,并且新增了 Rust 和 C++ 的混合编译支持,我们也集成了 Cargo 的包管理支持。</p>\n<p>另外,我们新增了一个实用的 <code>utils.glsl2spv</code> 规则,用于实现对 glsl shader 的编译支持,并自动生成对应的 C 代码头文件,方便快速内嵌编译后的 .spv 文件数据到代码中。</p>\n"
+  },
+  {
+    "title": "xmake v2.5.9 发布,改进 C++20 模块,并支持 Nim, Keil MDK 和 Unity Build",
+    "url": "/zh/posts/xmake-update-v2.5.9",
+    "date": {
+      "time": 1635595200000,
+      "string": "October 30, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Nim",
+      "Keil",
+      "MDK",
+      "circle",
+      "Unity",
+      "Build",
+      "C++20",
+      "Modules",
+      "lua5.4"
+    ],
+    "excerpt": "<h2>author: Ruki}</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n<p>这个版本,我们增加了大量重量级的新特性,例如:Nim 语言项目的构建支持,Keil MDK,Circle 和 Wasi 工具链支持。</p>\n"
+  },
+  {
+    "title": "xmake v2.5.8 发布,新增 Pascal/Swig 程序和 Lua53 运行时支持",
+    "url": "/zh/posts/xmake-update-v2.5.8",
+    "date": {
+      "time": 1633694400000,
+      "string": "October 8, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "pascal",
+      "swig",
+      "lua5.3"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n<p>这个版本,我们主要增加了对 Pascal 语言项目和 Swig 模块的构建支持,而对于上个版本新增的 Vala 语言支持,我们也做了进一步改进,增加了对动态库和静态库的构建支持。</p>\n<p>除此之外,xmake 现在也已经支持了可选的 Lua5.3 运行时,提供更好的跨平台支持能力,目前 xmake 已经能够在 LoongArch 架构上正常运行。</p>\n"
+  },
+  {
+    "title": "xmake v2.5.7 发布,包依赖锁定和 Vala/Metal 语言编译支持",
+    "url": "/zh/posts/xmake-update-v2.5.7",
+    "date": {
+      "time": 1630238400000,
+      "string": "August 29, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "lock",
+      "package",
+      "vala"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n<p>这个版本,我们新增了很多新特性,不仅增加了对 Vala 和 Metal 语言的编译支持,另外我们还改进了包依赖管理,能够像 npm/package.lock 那样支持对依赖包的锁定和更新,使得用户的项目不会受到上游包仓库的更新变动影响。</p>\n<p>此外,我们还提供了一些比较实用的规则, 比如 <code>utils.bin2c</code> 可以让用户方便快速的内嵌一些二进制资源文件到代码中去,以头文件的方式获取相关数据。</p>\n"
+  },
+  {
+    "title": "xmake v2.5.6 发布,改进预编译二进制镜像包兼容性",
+    "url": "/zh/posts/xmake-update-v2.5.6",
+    "date": {
+      "time": 1627300800000,
+      "string": "July 26, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "precompiled",
+      "package"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n<p>这是一个稳定性修复版本,主要修复和改进了一些跟预编译二进制包相关的兼容性问题。另外新增了一些实用的接口来设置默认的编译平台、架构和模式,以及允许的编译平台、架构列表等等。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/zh/\">官方文档</a></li>\n<li><a href=\"https://xmake.io/zh/about/course\">入门课程</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake v2.5.5 发布,支持下载集成二进制镜像包",
+    "url": "/zh/posts/xmake-update-v2.5.5",
+    "date": {
+      "time": 1625054400000,
+      "string": "June 30, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "mirror",
+      "package"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n<p>2.5.5 版本中,我们继续改进远程包集成的体验,实现在云端预编译包,然后直接下载集成预编译的二进制包。这对于一些编译非常慢的包,可以极大的减少包的安装时间。</p>\n<p>另外,新版本中,我们还重新实现了新版的本地包生成方案,完全无缝支持 <code>add_requires</code> 和 <code>add_packages</code>,从此远程包和本地包可以使用统一的集成方式来维护。</p>\n"
+  },
+  {
+    "title": "xmake v2.5.4 发布,支持 apt/portage 包管理器,改进 xrepo shell 环境",
+    "url": "/zh/posts/xmake-update-v2.5.4",
+    "date": {
+      "time": 1621080000000,
+      "string": "May 15, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "apt",
+      "portage",
+      "shell",
+      "package"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n<p>在 2.5.4 版本中,我们新增了对 Apt、Portage 这两个包管理器的支持,在 Ubuntu/Gentoo 上我们也可以使用 <code>add_requires</code> 可以快速集成它们提供的包。</p>\n<p>并且我们也改进支持了 Vcpkg 包管理器的支持,新增对 arm/arm64 架构包的安装支持。</p>\n"
+  },
+  {
+    "title": "C/C++ 构建系统,我用 xmake",
+    "url": "/zh/posts/please-use-xmake",
+    "date": {
+      "time": 1620043200000,
+      "string": "May 3, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "Buildsystem"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">XMake</a> 是一个基于 Lua 的 现代化 C/C++ 构建系统。</p>\n<p>它的语法简洁易上手,对新手友好,即使完全不会 lua 也能够快速入门,并且完全无任何依赖,轻量,跨平台。</p>\n<p>同时,它也是一个自满足的构建系统,拥有强大的包管理系统,快速的构建引擎。</p>\n"
+  },
+  {
+    "title": "Summer2021:暑期来 Xmake 社区做项目吧,还有奖金领取哦",
+    "url": "/zh/posts/xmake-summer-ospp",
+    "date": {
+      "time": 1619697600000,
+      "string": "April 29, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "summer",
+      "开源之夏"
+    ],
+    "excerpt": "<p>中科院软件所与华为 openEuler 社区去年共同举办了 “开源软件供应链点亮计划——暑期2020” 活动,今年为第二届。该活动旨在鼓励大家关注开源软件和开源社区,致力于培养和发掘更多优秀的开发者。</p>\n<p>开源之夏网站:<a href=\"https://summer.iscas.ac.cn/\">https://summer.iscas.ac.cn/</a></p>\n<p>今年 Xmake 社区也报名参加了此活动,并且提供了三个活动项目,难易程度中等,欢迎大家一起参与进来,还有奖金可以领取哦。</p>\n"
+  },
+  {
+    "title": "xmake v2.5.3 发布,支持构建 linux bpf 程序和 Conda 包集成",
+    "url": "/zh/posts/xmake-update-v2.5.3",
+    "date": {
+      "time": 1617883200000,
+      "string": "April 8, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "bpf",
+      "conda",
+      "linux"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n<p>在 2.5.3 版本,我们新增了对 linux bpf 程序的构建支持,并且同时支持 android bpf 程序的构建。</p>\n<p>尽管 bpf 对 编译工具链有一定的要求,比如需要较新的 llvm/clang 和 android ndk 工具链,但是 xmake 能够自动拉取特定版本的 llvm/ndk 来用于编译,并且还能自动拉取 libbpf 等依赖库,完全省去了用户折腾编译环境和 libbpf 库集成的问题。</p>\n"
+  },
+  {
+    "title": "xmake v2.5.2 发布, 支持自动拉取交叉工具链和依赖包集成",
+    "url": "/zh/posts/xmake-update-v2.5.2",
+    "date": {
+      "time": 1614427200000,
+      "string": "February 27, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "xrepo",
+      "packages",
+      "cross-toolchains"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n<p>在 2.5.2 版本中,我们增加了一个重量级的新特性:<code>自动拉取远程交叉编译工具链</code>。</p>\n<p>这是用来干什么的呢,做过交叉编译以及有 C/C++ 项目移植经验的同学应该知道,折腾各种交叉编译工具链,移植编译项目是非常麻烦的一件事,需要自己下载对应工具链,并且配置工具链和编译环境很容易出错导致编译失败。</p>\n"
+  },
+  {
+    "title": "一个使用 xmake 构建 c/c++ 模块的 luarocks 插件",
+    "url": "/zh/posts/luarocks-build-xmake-v1.0",
+    "date": {
+      "time": 1611316800000,
+      "string": "January 22, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "xmake",
+      "luarocks"
+    ],
+    "excerpt": "<p><a href=\"https://luarocks.org/\">luarocks</a> 是 lua 的一个包管理工具,提供了各种 lua 模块的安装集成,在用户安装 lua 模块的过程中,它会使用内置的构建系统对 c/c++ 模块进行构建。</p>\n<p>但是,它的构建系统只提供简单的配置,对于复杂的 c/c++ 模块的,就有点力不从心了,并且也无法灵活配置切换工具链。</p>\n<p>尽管它也提供了 make 和 cmake 的构建后端支持,但是通过 makefile 方式维护同样不够灵活,而 cmake 需要用户自己提前安装好 cmake 工具,否则安装 lua 模块的时候就会被打断。</p>\n"
+  },
+  {
+    "title": "xmake v2.5.1 发布, 支持 Apple Silicon 并改进 C/C++ 包依赖管理",
+    "url": "/zh/posts/xmake-update-v2.5.1",
+    "date": {
+      "time": 1610798400000,
+      "string": "January 16, 2021"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "xrepo",
+      "packages",
+      "vcpkg",
+      "conan",
+      "Apple",
+      "Silicon"
+    ],
+    "excerpt": "<h2>author: Ruki}</h2>\n<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n<p>这是 xmake 在今年的首个版本,也是完全适配支持 Apple Silicon (macOS ARM) 设备的首个版本。</p>\n"
+  },
+  {
+    "title": "Xmake 2020 年终总结",
+    "url": "/zh/posts/xmake-in-2020",
+    "date": {
+      "time": 1609329600000,
+      "string": "December 30, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++"
+    ],
+    "excerpt": "<p>title: Xmake 2020 年终总结\ntags: [xmake, lua, C/C++]\ndate: 2020-12-30\nauthor: Ruki</p>\n<hr>\n<p>2020 年,<a href=\"https://github.com/xmake-io/xmake\">xmake</a> 总共迭代发布了9个版本,新增了 1871 commits,1k+ stars,新增处理了 500+ 的 issues/pr。</p>\n<p><img src=\"/static/img/xmake/star-history-2020.png\" alt=\"\"></p>\n"
+  },
+  {
+    "title": "Xmake Discord 社区频道上线",
+    "url": "/zh/posts/xmake-community",
+    "date": {
+      "time": 1607601600000,
+      "string": "December 10, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "discord",
+      "社区",
+      "技术交流"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n<p>我们可以用 xmake 很方便的开发构建 C/C++ 项目,同时也支持和其他 native 语言的混合编译。</p>\n<p><img src=\"https://xmake.io/assets/img/index/xmake-basic-render.gif\" alt=\"\"></p>\n"
+  },
+  {
+    "title": "xmake v2.3.9 发布, 新增独立 Xrepo C/C++ 包管理器",
+    "url": "/zh/posts/xmake-update-v2.3.9",
+    "date": {
+      "time": 1606219200000,
+      "string": "November 24, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "xrepo",
+      "packages",
+      "vcpkg",
+      "conan"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n<p>在这个新版本中,我们重点改进了 xmake 的依赖包管理,新增了 Archlinux 和 MSYS2/Mingw 下 的 pacman 包管理器支持,另外我们进一步丰富了 xmake 的官方包仓库 <a href=\"https://github.com/xmake-io/xmake-repo\">xmake-repo</a>,新增了 50 多个常用的 C/C++ 包。</p>\n<p>此外,我们新增了一个基于 xmake 的独立子命令:<a href=\"https://github.com/xmake-io/xrepo/\">xrepo</a>,一个完整独立的跨平台 C/C++ 包管理器,便于用户更加方便的管理日常 C/C++ 包的安装和集成使用。</p>\n"
+  },
+  {
+    "title": "Xrepo:一个现代化的跨平台 C/C++ 包管理器",
+    "url": "/zh/posts/xrepo-new-command",
+    "date": {
+      "time": 1605441600000,
+      "string": "November 15, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "xrepo",
+      "package",
+      "manager",
+      "vcpkg",
+      "conan",
+      "dub",
+      "pacman"
+    ],
+    "excerpt": "<p>xrepo 是一个基于 <a href=\"https://github.com/xmake-io/xmake\">Xmake</a> 的跨平台 C/C++ 包管理器。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xrepo\">项目源码</a></li>\n<li><a href=\"https://xrepo.xmake.io/#/zh-cn/\">官方文档</a></li>\n</ul>\n<p>它基于 xmake 提供的运行时,但却是一个完整独立的包管理程序,相比 vcpkg/homebrew 此类包管理器,xrepo 能够同时提供更多平台和架构的 C/C++ 包。</p>\n"
+  },
+  {
+    "title": "xmake v2.3.8 发布, 新增 Intel C++/Fortran 编译器支持",
+    "url": "/zh/posts/xmake-update-v2.3.8",
+    "date": {
+      "time": 1602936000000,
+      "string": "October 17, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "wasm",
+      "emscripten",
+      "qt",
+      "intel",
+      "icc",
+      "fortran"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n<p>在这个新版本中,我们对 Intel 系列的 C++ 和 Fortran 编译器做了全平台支持,并且改进了上个版本新加的 Wasm 工具链支持,同时对 Qt SDK for Wasm 也进行了支持。</p>\n<p>另外,我们还将 luajit 升级到最新的 v2.1 版本,在跨平台方面,xmake 也做了很大的完善,增加了 mips64 架构的运行支持。</p>\n"
+  },
+  {
+    "title": "xmake 官方入门课程上线, Xmake 带你轻松构建 C/C++ 项目",
+    "url": "/zh/posts/xmake-course-build-c-projects",
+    "date": {
+      "time": 1602244800000,
+      "string": "October 9, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "course",
+      "qt",
+      "实验楼",
+      "入门课程"
+    ],
+    "excerpt": "<p><a href=\"https://www.lanqiao.cn/courses/2764\">Xmake 带你轻松构建 C/C++ 项目</a> 是我们在实验楼上推出的一门 xmake 入门和进阶课程(收费),以边学边做实验的方式快速学习 xmake 的使用。</p>\n<p>通过此处优惠码购买可享 9 折优惠:<code>NYFbmf3X</code></p>\n<p><a href=\"https://xmake.io\">Xmake</a> 是一个基于 Lua 的轻量级跨平台 C/C++ 构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt 而言,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门 C/C++ 项目的编译开发,提供一站式跨平台编译、运行、调试、打包、安装等操作,能够让大家把更多的精力集中在实际的项目开发上。</p>\n"
+  },
+  {
+    "title": "xmake v2.3.7 发布, 新增 tinyc 和 emscripten 工具链支持",
+    "url": "/zh/posts/xmake-update-v2.3.7",
+    "date": {
+      "time": 1600084800000,
+      "string": "September 14, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "tinyc",
+      "emscripten",
+      "qt",
+      "cuda"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua 维护项目构建,相比 makefile/CMakeLists.txt,配置语法更加简洁直观,对新手非常友好,短时间内就能快速入门,能够让用户把更多的精力集中在实际的项目开发上。</p>\n<p>随着 xmake 最近几年不断的迭代发展,xmake 已经在 Github 收获 2.9K star,300+ fork,30+ 贡献者,并且处理了 900+ issues,5400+ Commits,活跃用户也在不断增长。</p>\n<p><img src=\"https://tboox.org/static/img/xmake/star-history.png\" alt=\"\"></p>\n"
+  },
+  {
+    "title": "xmake v2.3.6 发布, 新增fortran编译支持",
+    "url": "/zh/posts/xmake-update-v2.3.6",
+    "date": {
+      "time": 1595937600000,
+      "string": "July 28, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "fortran",
+      "zig",
+      "golang",
+      "dlang"
+    ],
+    "excerpt": "<p>这个版本重点对其他语言的支持做了一些改进,比如新增了fortran的编译支持,zig语言的实验性支持,另外对golang/dlang增加了第三方依赖包支持以及交叉编译支持。</p>\n<p>虽然,xmake重点关注c/c++的构建支持,但是其他语言的支持xmake也会不定期做一些改进,其主要目的并不是替代它们官方自身的构建系统,仅仅只是为了支持与c/c++的混合编译,更好的为c/c++项目服务,\n毕竟有些c/c++项目中,还是会偶尔调用其他语言的代码接口,比如与cuda, dlang, objc,swift, asm等语言的混合调用,所以xmake还是会对他们做一些基础性的编译支持。</p>\n<p>另外,关于c/c++方面,我们也对vs预览版中新的<code>/sourceDependencies xxx.json</code>输出的头文件依赖格式也做了支持(这对于多语言下,头文件依赖检测会更加的可靠稳定)。</p>\n"
+  },
+  {
+    "title": "xmake从入门到精通12:通过自定义脚本实现更灵活地配置",
+    "url": "/zh/posts/quickstart-12-custom-scripts",
+    "date": {
+      "time": 1595073600000,
+      "string": "July 18, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "子工程",
+      "子模块",
+      "自定义脚本"
+    ],
+    "excerpt": "<p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具,主要特点是:语法简单易上手,提供更加可读的项目维护,实现跨平台行为一致的构建体验。</p>\n<p>本文主要详细讲解下,如何通过添加自定义的脚本,在脚本域实现更加复杂灵活的定制。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/zh/\">官方文档</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake v2.3.5 发布, 多工具链灵活切换支持",
+    "url": "/zh/posts/xmake-update-v2.3.5",
+    "date": {
+      "time": 1593345600000,
+      "string": "June 28, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "交叉编译"
+    ],
+    "excerpt": "<p>这个版本主要工作还是继续改进对工具链的支持,上个版本虽然通过重构实现了模块化的工具链扩展,但是对于一次编译想要灵活地在交叉工具链/Host工具链上切换编译,还不能很好的支持,因此这个版本重点改进了这块的支持力度。</p>\n<p>另外,此版本还对使用<code>add_requires</code>集成的远程依赖包下载慢的问题做了改进,增加了代理设置、本地包检索复用的支持来改善此问题。当然,最好的方式还是搞个国内的cdn来加速下载,但是这个成本过高,暂时就不折腾了。</p>\n<p>还有一些小改动和bug修复,可以看下文章最下面的更新内容。</p>\n"
+  },
+  {
+    "title": "xmake v2.3.4 发布, 更加完善的工具链支持",
+    "url": "/zh/posts/xmake-update-v2.3.4",
+    "date": {
+      "time": 1591358400000,
+      "string": "June 5, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "toolchains",
+      "交叉编译"
+    ],
+    "excerpt": "<p>为了让xmake更好得支持交叉编译,这个版本我重构了整个工具链,使得工具链的切换更加的方便快捷,并且现在用户可以很方便地在xmake.lua中扩展自己的工具链。</p>\n<p>关于平台的支持上,我们新增了对*BSD系统的支持,另外,此版本还新增了一个ninja主题风格,实现类似ninja的编译进度显示,例如:</p>\n<p>&lt;img src=&quot;https://xmake.io/assets/img/theme/ninja.png&quot; width=&quot;60%&quot; /&gt;</p>\n"
+  },
+  {
+    "title": "xmake v2.3.3 发布, 新增iOS/MacOS Framework和App构建支持",
+    "url": "/zh/posts/xmake-update-v2.3.3",
+    "date": {
+      "time": 1587988800000,
+      "string": "April 27, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "framework",
+      "bundle",
+      "app",
+      "签名"
+    ],
+    "excerpt": "<p>这个版本主要是对内置的构建规则做了些扩展,新增了相关规则来实现对iOS/MacOS相关App应用程序项目、Framework和Bundle程序的构建支持。</p>\n<p>并且支持App签名,也提供了相关工程模板来快速创建应用程序,另外此版本还对Qt的开发构建也做了不少改进,增加对Qt5.14.0新版本sdk的支持,对android的打包部署支持上也改进了不少。</p>\n<p>处理之外,xmake还提供了一个特殊的<code>xmake.cli</code>构建rule,通过集成libxmake engine库,来扩展开发基于xmake引擎的程序,比如:做个定制版的xmake,也可以基于此写点lua脚本程序。</p>\n"
+  },
+  {
+    "title": "xmake-gradle v1.0.7 发布, 集成xmake快速构建Android JNI程序",
+    "url": "/zh/posts/xmake-gradle-v1.0.7",
+    "date": {
+      "time": 1587124800000,
+      "string": "April 17, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "android",
+      "jni"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake-gradle\">xmake-gradle</a>是一个无缝整合 xmake 的 gradle 插件。</p>\n<p>目前在 gradle 中做 android jni 相关集成开发,有两种方式,通过 ndkBuild 或者 CMake 来支持,gradle 也内置了这两工具的集成</p>\n<p>但是维护 Android.mk 还是非常繁琐的,尤其是对于大型项目会比较痛苦,而 cmake 的 dsl 语法不够简洁直观,我个人也不是很喜欢,因此我先前整了 xmake 来实现跨平台开发,优势就是: 简单,快速,对新手友好,另外功能也很强大,具体有那些功能,大家可以到 xmake 项目主页看下相关介绍。</p>\n"
+  },
+  {
+    "title": "xmake从入门到精通11:如何组织构建大型工程",
+    "url": "/zh/posts/quickstart-11-subprojects",
+    "date": {
+      "time": 1586606400000,
+      "string": "April 11, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "子工程",
+      "子模块"
+    ],
+    "excerpt": "<p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具,主要特点是:语法简单易上手,提供更加可读的项目维护,实现跨平台行为一致的构建体验。</p>\n<p>本文主要详细讲解下,如何通过配置子工程模块,来组织构建一个大规模的工程项目。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/zh/\">官方文档</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake v2.3.2 发布, 带来和ninja一样快的构建速度",
+    "url": "/zh/posts/xmake-update-v2.3.2",
+    "date": {
+      "time": 1585396800000,
+      "string": "March 28, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "ninja",
+      "并行构建"
+    ],
+    "excerpt": "<p>这个版本重点重构优化了下内部并行构建机制,实现多个target间源文件的并行编译,以及并行link的支持,同时优化了xmake的一些内部损耗,修复影响编译速度的一些bug。\n通过测试对比,目前的整体构建速度基本跟ninja持平,相比cmake/make, meson/ninja都快了不少,因为它们还额外多了一步生成makefile/build.ninja的过程。</p>\n<p>另外,xmake还增加了对sdcc编译工具链的支持,用于编译51/stm8等嵌入式程序。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/zh/\">官方文档</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake v2.3.1 发布, 无缝对接其他构建系统",
+    "url": "/zh/posts/xmake-update-v2.3.1",
+    "date": {
+      "time": 1582459200000,
+      "string": "February 23, 2020"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "autotools",
+      "cmake",
+      "ninja",
+      "mingw",
+      "msys"
+    ],
+    "excerpt": "<p>最近对xmake内部做了不少的重构来改进,并且新增了不少实用的新特性,欢迎来体验。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/zh/\">官方文档</a></li>\n</ul>\n<p>一些新特性:</p>\n"
+  },
+  {
+    "title": "xmake v2.2.9 发布, 新增c++20 modules的实验性支持",
+    "url": "/zh/posts/xmake-update-v2.2.9",
+    "date": {
+      "time": 1576929600000,
+      "string": "December 21, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "c++20",
+      "ts-modules"
+    ],
+    "excerpt": "<p>这个版本没啥太大新特性,主要对c++20 modules进行了实验性支持,目前支持clang/msvc编译器,除此之外改进了不少使用体验,并且提高了一些稳定性。</p>\n<p>另外,这个版本新增了socket.io支持以及对应协程io的调度支持,为下个版本的远程编译,以及后续的分布式编译做准备。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/zh/\">官方文档</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake从入门到精通10:多个子工程目标的依赖配置",
+    "url": "/zh/posts/quickstart-10-target-deps",
+    "date": {
+      "time": 1576238400000,
+      "string": "December 13, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "交叉编译"
+    ],
+    "excerpt": "<p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具,主要特点是:语法简单易上手,提供更加可读的项目维护,实现跨平台行为一致的构建体验。</p>\n<p>本文主要详细讲解下,如果在一个项目中维护和生成多个目标文件的生成,以及它们之间的依赖关系设置。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/zh/\">官方文档</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake从入门到精通8:切换编译模式",
+    "url": "/zh/posts/quickstart-8-switch-build-mode",
+    "date": {
+      "time": 1575547200000,
+      "string": "December 5, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "编译模式"
+    ],
+    "excerpt": "<p>title: xmake从入门到精通8:切换编译模式\ntags: [xmake, lua, 编译模式]\ndate: 2019-12-05\nauthor: Ruki</p>\n<hr>\n<p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具,主要特点是:语法简单易上手,提供更加可读的项目维护,实现跨平台行为一致的构建体验。</p>\n<p>本文我们会详细介绍下如何在项目构建过程中切换debug/release等常用构建模式,以及自定义其他编译模式。</p>\n"
+  },
+  {
+    "title": "xmake从入门到精通9:交叉编译详解",
+    "url": "/zh/posts/quickstart-9-cross-compile",
+    "date": {
+      "time": 1575547200000,
+      "string": "December 5, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "交叉编译"
+    ],
+    "excerpt": "<p>title: xmake从入门到精通9:交叉编译详解\ntags: [xmake, lua, 交叉编译]\ndate: 2019-12-05\nauthor: Ruki</p>\n<hr>\n<p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具,主要特点是:语法简单易上手,提供更加可读的项目维护,实现跨平台行为一致的构建体验。</p>\n<p>除了win, linux, macOS平台,以及android, ios等移动端平台的内建构建支持,xmake也支持对各种其他工具链的交叉编译支持,本文我们将会详细介绍下如何使用xmake进行交叉编译。</p>\n"
+  },
+  {
+    "title": "xmake从入门到精通7:开发和构建Cuda程序",
+    "url": "/zh/posts/quickstart-7-build-cuda-project",
+    "date": {
+      "time": 1575115200000,
+      "string": "November 30, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "cuda"
+    ],
+    "excerpt": "<p>title: xmake从入门到精通7:开发和构建Cuda程序\ntags: [xmake, lua, cuda]\ndate: 2019-11-30\nauthor: Ruki</p>\n<hr>\n<p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具,主要特点是:语法简单易上手,提供更加可读的项目维护,实现跨平台行为一致的构建体验。</p>\n<p>本文我们会详细介绍下如何通过xmake来构建cuda程序以及与c/c++程序混合编译。</p>\n"
+  },
+  {
+    "title": "xmake从入门到精通6:开发和构建Qt程序",
+    "url": "/zh/posts/quickstart-6-build-qt-project",
+    "date": {
+      "time": 1574337600000,
+      "string": "November 21, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "qt"
+    ],
+    "excerpt": "<p>title: xmake从入门到精通6:开发和构建Qt程序\ntags: [xmake, lua, qt]\ndate: 2019-11-21\nauthor: Ruki</p>\n<hr>\n<p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具,主要特点是:语法简单易上手,提供更加可读的项目维护,实现跨平台行为一致的构建体验。</p>\n<p>xmake完全支持对Qt5项目的维护和构建,通过本文将会带你了解如何通过xmake来维护各种类型的Qt项目。</p>\n"
+  },
+  {
+    "title": "xmake从入门到精通5:Android平台编译详解",
+    "url": "/zh/posts/quickstart-5-build-android",
+    "date": {
+      "time": 1573819200000,
+      "string": "November 15, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "android",
+      "jni"
+    ],
+    "excerpt": "<p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具,主要特点是:语法简单易上手,提供更加可读的项目维护,实现跨平台行为一致的构建体验。</p>\n<p>本文主要详细讲解如何通过xmake编译可在android下运行的库和可执行程序。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/zh/\">官方文档</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake从入门到精通4:常用C/C++项目描述设置详解",
+    "url": "/zh/posts/quickstart-4-basic-project-settings",
+    "date": {
+      "time": 1573387200000,
+      "string": "November 10, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "c/c++",
+      "xmake配置描述"
+    ],
+    "excerpt": "<p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具,主要特点是:语法简单易上手,提供更加可读的项目维护,实现跨平台行为一致的构建体验。</p>\n<p>本文主要详细讲解如何编写一些常用的基础xmake.lua描述配置,来实现一些简单的C/C++项目构建管理。\n对于大部分小项目,这些配置已经完全足够使用,本系列后期进阶教程中,我会深入详细讲解如果使用一些高级特性来更加灵活定制化地配置项目。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/zh/\">官方文档</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake从入门到精通1:安装和更新",
+    "url": "/zh/posts/quickstart-1-installation",
+    "date": {
+      "time": 1573300800000,
+      "string": "November 9, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "安装",
+      "更新"
+    ],
+    "excerpt": "<p>title: xmake从入门到精通1:安装和更新\ntags: [xmake, lua, 安装, 更新]\ndate: 2019-11-09\nauthor: Ruki</p>\n<hr>\n<p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具,主要特点是:语法简单易上手,提供更加可读的项目维护,实现跨平台行为一致的构建体验。</p>\n<p>本文主要详细讲解xmake在各个平台下的安装过程。</p>\n"
+  },
+  {
+    "title": "xmake从入门到精通2:创建和编译工程",
+    "url": "/zh/posts/quickstart-2-create-and-build-project",
+    "date": {
+      "time": 1573300800000,
+      "string": "November 9, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "c/c++",
+      "创建工程"
+    ],
+    "excerpt": "<p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具,主要特点是:语法简单易上手,提供更加可读的项目维护,实现跨平台行为一致的构建体验。</p>\n<p>本文主要详细讲解如何创建一个基于xmake的工程以及编译操作。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/zh/\">官方文档</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake从入门到精通3:运行和调试目标程序",
+    "url": "/zh/posts/quickstart-3-run-and-debug",
+    "date": {
+      "time": 1573300800000,
+      "string": "November 9, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "c/c++",
+      "运行",
+      "调试"
+    ],
+    "excerpt": "<p>xmake是一个基于Lua的轻量级现代化c/c++的项目构建工具,主要特点是:语法简单易上手,提供更加可读的项目维护,实现跨平台行为一致的构建体验。</p>\n<p>本文主要详细讲解如何加载运行编译好的目标程序,以及如何去调试。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/zh/\">官方文档</a></li>\n</ul>\n"
+  },
+  {
+    "title": "使用xmake构建c++20 modules",
+    "url": "/zh/posts/xmake-c++20-modules",
+    "date": {
+      "time": 1569153600000,
+      "string": "September 22, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "c++20",
+      "modules-ts"
+    ],
+    "excerpt": "<p>c++ modules已经正式纳入了c++20草案,msvc和clang也已经基本实现了对<a href=\"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1103r3.pdf\">modules-ts</a>的支持,随着c++20的脚步离我们越来越近,xmake也开始对c++modules提前做好了支持。</p>\n<p>目前xmake已经完全支持了msvc/clang的modules-ts构建实现,而对于gcc,由于它的cxx-modules分支还在开发中,还没有正式进入master,我看了下里面的changelog,相关flags还在不断变动,感觉还没稳定下来,因此这里暂时还没对其进行支持。</p>\n<p>关于xmake对c++modules的相关进展见:<a href=\"https://github.com/xmake-io/xmake/pull/569\">https://github.com/xmake-io/xmake/pull/569</a></p>\n"
+  },
+  {
+    "title": "xmake v2.2.8 发布, 新版vs工程生成插件",
+    "url": "/zh/posts/xmake-update-v2.2.8",
+    "date": {
+      "time": 1566475200000,
+      "string": "August 22, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "版本更新",
+      "VisualStudio"
+    ],
+    "excerpt": "<p>这个版本提供了全新的vs工程生成插件(非常感谢@<a href=\"https://github.com/OpportunityLiu\">OpportunityLiu</a>的贡献),跟之前的生成vs的插件处理模式上有很大的不同,原先生成的vs工程是把所有源文件展开后,转交给vs来处理编译。</p>\n<p>此外,我们重写了整个luajit的io runtime,使其更好的支持unicode字符集,尤其是windows上对中文字符的支持。</p>\n<p>最后新版本开始尝试直接安装lua bitcode脚本,来减少安装包的大小(控制在2.4M以内),提高xmake启动加载的效率。</p>\n"
+  },
+  {
+    "title": "制作和上传C/C++包到xmake的官方仓库",
+    "url": "/zh/posts/xmake-upload-package",
+    "date": {
+      "time": 1565352000000,
+      "string": "August 9, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "包仓库"
+    ],
+    "excerpt": "<p>xmake集成了内置的远程包依赖管理,用户只需要简单地在项目中添加自己所需要的包和版本,即可自动下载和集成对应的包到项目中,并且实现编译和链接。</p>\n<p>例如:</p>\n<pre><code class=\"language-lua\">add_requires(&quot;libuv master&quot;, &quot;ffmpeg&quot;, &quot;zlib 1.20.*&quot;)\nadd_requires(&quot;tbox &gt;1.6.1&quot;, {optional = true, debug = true})\nadd_requires(&quot;boost&quot;, {alias = &quot;boost_context&quot;, configs = {context = true}})\ntarget(&quot;test&quot;)\n    set_kind(&quot;binary&quot;)\n    add_files(&quot;src/*.c&quot;)\n    add_packages(&quot;libuv&quot;, &quot;ffmpeg&quot;, &quot;t...</code></pre>\n"
+  },
+  {
+    "title": "xmake v2.2.7 发布, 改进Cuda项目构建",
+    "url": "/zh/posts/xmake-update-v2.2.7",
+    "date": {
+      "time": 1560772800000,
+      "string": "June 17, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "版本更新",
+      "Cuda"
+    ],
+    "excerpt": "<p>这个版本主要对Cuda项目的构建做了很多的改进,并且新增了对lex/yacc编译支持,同时也对target新增了<code>on_link</code>, <code>before_link</code>和<code>after_link</code>等链接阶段的定制化支持。</p>\n<p>这里,我还要感谢下@<a href=\"https://github.com/OpportunityLiu\">OpportunityLiu</a>对xmake的支持,这个版本中<a href=\"https://github.com/OpportunityLiu\">OpportunityLiu</a>贡献了大量的代码去改进Cuda的支持。\n此外,他还帮忙改进了xmake的整个单元测试框架,自更新程序,命令行tab补全以及ci脚本,使得xmake的更新迭代更加高效和稳定。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/zh/\">官方文档</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake vs cmake对比分析",
+    "url": "/zh/posts/xmake-vs-cmake",
+    "date": {
+      "time": 1559131200000,
+      "string": "May 29, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "cmake"
+    ],
+    "excerpt": "<p>title: xmake vs cmake对比分析\ntags: [xmake, lua, cmake]\ndate: 2019-05-29\nauthor: Ruki</p>\n<hr>\n<p>首先,不得不承认,cmake很强大,发展了这么多年,整个生态已经相当完善,功能也相当丰富,这点xmake目前是比不了的。</p>\n<p>当初我做xmake的目的,也并不是为了完全替代cmake,这没啥意义,只是觉得cmake的语法和易用性满足不了我,我还是更喜欢更简单直观的方式去描述和维护项目,在不同平台下提供近乎一致的使用体验。</p>\n"
+  },
+  {
+    "title": "xmake v2.2.6 发布, Qt/Android编译支持",
+    "url": "/zh/posts/xmake-update-v2.2.6",
+    "date": {
+      "time": 1558872000000,
+      "string": "May 26, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "版本更新",
+      "Qt",
+      "Android"
+    ],
+    "excerpt": "<p>这个版本主要对远程依赖包的支持进一步完善,并且新增了对clib包依赖的支持,另外现在xmake已经能够直接编译Qt/Android项目,并且可以直接生成apk包,以及安装到设备支持。</p>\n<p>此版本还对xmake的启动性能做了优化,解决了windows启动慢的问题,提速98%,整体编译速度也加快了不少。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/#/zh/\">官方文档</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake v2.2.5新特性详解",
+    "url": "/zh/posts/xmake-v2.2.5-new-features",
+    "date": {
+      "time": 1554120000000,
+      "string": "April 1, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "版本更新",
+      "远程包管理",
+      "包依赖",
+      "自动构建"
+    ],
+    "excerpt": "<p>新版本对内置的包管理进行了重构,已经支持的非常完善了,我们可以通过</p>\n<pre><code class=\"language-lua\">add_requires(&quot;libuv master&quot;, &quot;ffmpeg&quot;, &quot;zlib 1.20.*&quot;)`\n</code></pre>\n<p>方便的安装使用依赖包,但是官方的包仓库<a href=\"https://github.com/xmake-io/xmake-repo\">xmake-repo</a>目前收录的包还非常少,因此为了扩充xmake的包仓库,\nxmake新增了对第三方包管理器的内置支持,通过包命名空间显式指定其他包管理器中的包,目前支持对<code>conan::</code>,<code>brew::</code>和<code>vcpkg::</code>包管理中的包进行安装。</p>\n"
+  },
+  {
+    "title": "xmake v2.2.5, 更加完善的包依赖管理",
+    "url": "/zh/posts/xmake-update-v2.2.5",
+    "date": {
+      "time": 1553860800000,
+      "string": "March 29, 2019"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "版本更新",
+      "远程包管理",
+      "包依赖",
+      "自动构建"
+    ],
+    "excerpt": "<p>此版本耗时四个多月,对包依赖管理进行了重构改进,官方仓库新增了mysql,ffmpeg等常用依赖包,并且新增了大量新特性。</p>\n<p>关于新特性的详细说明,可以看下下面的官方文档,或者看下相关文章介绍:<a href=\"https://tboox.org/cn/2019/04/01/v2.2.5-new-features/\">xmake v2.2.5新特性详解</a></p>\n<p>关于新特性的详细说明见文章下文。</p>\n"
+  },
+  {
+    "title": "xmake v2.2.3, 大量新特性支持",
+    "url": "/zh/posts/xmake-update-v2.2.3",
+    "date": {
+      "time": 1543579200000,
+      "string": "November 30, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "版本更新",
+      "远程包管理",
+      "包依赖",
+      "自动构建"
+    ],
+    "excerpt": "<p>此版本主要是对远程依赖包管理进行了一些改进,并且新增了很多小特性,并且此版本已经可以支持通过<code>xmake update</code>来自我更新升级了,以后升级xmake将会更加方便。</p>\n<p>关于新特性的详细说明见文章下文。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/#/zh/\">官方文档</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake v2.2.2, 让C/C++拥有包依赖自动构建",
+    "url": "/zh/posts/xmake-update-v2.2.2-package-deps",
+    "date": {
+      "time": 1539432000000,
+      "string": "October 13, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "C/C++",
+      "版本更新",
+      "远程包管理",
+      "包依赖",
+      "自动构建"
+    ],
+    "excerpt": "<p>历经四个多月,<a href=\"https://github.com/xmake-io/xmake\">xmake</a>终于更新了新版本v2.2.2,并且上线了重量级功能:原生支持的远程依赖包管理。</p>\n<p>而这个特性,其实我陆陆续续写了将近一年的时间,才初步完成,对于此特性的开发进展和历史,有兴趣的同学可以看下相关issues:<a href=\"https://github.com/xmake-io/xmake/issues/69\">#69</a>。</p>\n<p>目前的实现效果如下,完全一致的语义版本依赖描述:</p>\n"
+  },
+  {
+    "title": "xmake-vscode v1.1.0版本发布,断点调试支持",
+    "url": "/zh/posts/xmake-vscode-update-v1.1.0",
+    "date": {
+      "time": 1530187200000,
+      "string": "June 28, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "版本更新"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake-vscode\">xmake-vscode</a>插件深度集成了<a href=\"https://github.com/xmake-io/xmake\">xmake</a>和vscode,提供方便快速的跨平台c/c++构建。</p>\n<p>此版本主要更新内容如下:</p>\n<ul>\n<li>利用C/C++插件<a href=\"https://github.com/Microsoft/vscode-cpptools\">vscode-cpptools</a>实现直接加载断点调试xmake编译的程序</li>\n<li>多工程目录工作区支持,可以随意切换和编译多个工程</li>\n<li>改进mingw平台支持</li>\n</ul>\n"
+  },
+  {
+    "title": "xmake-vscode v1.0.8版本发布,在vscode中构建Qt/WDK程序",
+    "url": "/zh/posts/xmake-vscode-update-v1.0.8",
+    "date": {
+      "time": 1529928000000,
+      "string": "June 25, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "版本更新"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake-vscode\">xmake-vscode</a>插件深度集成了<a href=\"https://github.com/xmake-io/xmake\">xmake</a>和vscode,提供方便快速的跨平台c/c++构建。</p>\n<p>此版本主要更新内容如下:</p>\n<ul>\n<li>兼容windows下VScode+shell(cmd/bash)</li>\n<li>修复windows下使用,偶尔出现命令在终端下被截断的问题</li>\n<li>更新xmake的自动补全,支持最新版本API</li>\n<li>增加对Qt、WDK环境的支持和配置</li>\n<li>新增附加参数配置,实现交叉编译的配置支持</li>\n</ul>\n"
+  },
+  {
+    "title": "xmake v2.2.1 大版本发布,Qt, WDK和Cuda编译环境支持",
+    "url": "/zh/posts/update-v2.2.1",
+    "date": {
+      "time": 1529236800000,
+      "string": "June 17, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "版本更新",
+      "Qt",
+      "WDK",
+      "Cuda"
+    ],
+    "excerpt": "<p>为了使<a href=\"https://github.com/xmake-io/xmake\">xmake</a>更方便灵活地支持其他编译环境,我花了四个多月的时间,对<a href=\"https://xmake.io/#/zh/manual?id=%E6%9E%84%E5%BB%BA%E8%A7%84%E5%88%99\">自定义规则rule</a>,进行了大规模升级。\n现在用户可以通过自定义规则,来实现各种编译规则,并且xmake也内置了一些常用的编译规则,可以直接应用到当前工程,去实现对Qt, WDK驱动和Cuda编译环境的支持。</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake\">项目源码</a></li>\n<li><a href=\"https://xmake.io/#/zh/\">官方文档</a></li>\n</ul>\n<p>相关文章介绍:</p>\n"
+  },
+  {
+    "title": "xmake新增对WDK驱动编译环境支持",
+    "url": "/zh/posts/support-wdk",
+    "date": {
+      "time": 1528977600000,
+      "string": "June 14, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "WDK",
+      "kmdf",
+      "umdf",
+      "wdm",
+      "driver"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a> v2.2.1新版本现已支持WDK驱动编译环境,我们可以直接在系统原生cmd终端下,执行xmake进行驱动编译,甚至配合vscode, sublime text, IDEA等编辑器+xmake插件去开发WDK驱动。</p>\n<p>下面是xmake支持的一些编辑器插件,用户可以挑选自己喜欢的编辑器配合xmake来使用:</p>\n<ul>\n<li><a href=\"https://github.com/xmake-io/xmake-idea\">xmake-idea</a></li>\n<li><a href=\"https://github.com/xmake-io/xmake-vscode\">xmake-vscode</a></li>\n<li><a href=\"https://github.com/xmake-io/xmake-sublime\">xmake-sublime</a></li>\n</ul>\n"
+  },
+  {
+    "title": "xmake进阶之简化你的构建描述",
+    "url": "/zh/posts/simplify-xmake-description",
+    "date": {
+      "time": 1528459200000,
+      "string": "June 8, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "工程描述",
+      "xmake.lua",
+      "简化"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake\">xmake</a>的初衷就是为了让用户能够用最简单直接的方式去描述工程,提供跨平台项目构建,因此,<code>简洁,灵活</code> 是xmake.lua的核心设计思想。</p>\n<p>通过之前的那篇文章:<a href=\"http://tboox.org/cn/2018/03/26/build-project-so-simply/\">xmake入门,构建项目原来可以如此简单</a>,我们对如何使用xmake去构建项目有了大概的了解,并且能够编写一些简单的xmake.lua去描述项目,例如:</p>\n<pre><code class=\"language-lua\">target(&quot;test&quot;)\n    set_kind(&quot;binary&quot;)\n    add_files(&quot;src/*.c&quot;)\n</code></pre>\n"
+  },
+  {
+    "title": "xmake新增对Qt编译环境支持",
+    "url": "/zh/posts/support-qt",
+    "date": {
+      "time": 1527681600000,
+      "string": "May 30, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "Qt",
+      "Widgets",
+      "QuickApplication"
+    ],
+    "excerpt": "<p>在最新的<a href=\"https://github.com/xmake-io/xmake\">xmake</a> v2.2.1版本中,新增了对Qt SDK环境的支持,我们完全可以脱离Qt Creater进行Qt应用程序的开发,甚至配合vscode/idea等编辑器+xmake插件(<a href=\"https://github.com/xmake-io/xmake-vscode\">xmake-vscode</a>, <a href=\"https://github.com/xmake-io/xmake-idea\">xmake-idea</a> ...),\n用户完全可以切换到自己最常用的编辑器环境中去开发和构建Qt程序,例如这样:</p>\n<p>&lt;img src=&quot;/static/img/xmake/vscode-qt.jpeg&quot; width=&quot;60%&quot; /&gt;</p>\n<p>xmake内置了一些工程模板可以用来快速创建一个基于Qt的空工程,例如:</p>\n"
+  },
+  {
+    "title": "xmake入门,构建项目原来可以如此简单",
+    "url": "/zh/posts/build-project-so-simply",
+    "date": {
+      "time": 1522065600000,
+      "string": "March 26, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "build",
+      "project"
+    ],
+    "excerpt": "<p>在开发<a href=\"https://github.com/xmake-io/xmake\">xmake</a>之前,我一直在使用gnumake/makefile来维护个人C/C++项目,一开始还好,然而等项目越来越庞大后,维护起来就非常吃力了,后续也用过一阵子automake系列工具,并不是很好用。</p>\n<p>由于C/C++程序的构建过程比较繁琐,如果不借助IDE工具,很难快速构建一个新的C/C++程序,想要跨平台构建就更加麻烦了。</p>\n<p>虽然IDE很好用,也很强大,但是还是有很多不足的地方,例如:</p>\n"
+  },
+  {
+    "title": "xmake新增对Cuda代码编译支持",
+    "url": "/zh/posts/support-cuda",
+    "date": {
+      "time": 1520596800000,
+      "string": "March 9, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "cuda",
+      "NVIDIA",
+      "GPU"
+    ],
+    "excerpt": "<p>最近研究了下NVIDIA Cuda Toolkit的编译环境,并且在xmake 2.1.10开发版中,新增了对cuda编译环境的支持,可以直接编译<code>*.cu</code>代码。</p>\n<p>关于Cuda Toolkit相关说明以及安装文档,可参考官方文档:<a href=\"http://docs.nvidia.com/cuda/index.html\">CUDA Toolkit Documentation</a>。</p>\n<p>下载安装好Cuda SDK后,在macosx上回默认安装到<code>/Developer/NVIDIA/CUDA-x.x</code>目录下,Windows上可以通过<code>CUDA_PATH</code>的环境变量找到对应的SDK目录,而\nLinux下默认会安装到<code>/usr/local/cuda</code>目录下。</p>\n"
+  },
+  {
+    "title": "xmake v2.1.9版本发布,增加可视化图形菜单配置",
+    "url": "/zh/posts/update-v2.1.9",
+    "date": {
+      "time": 1517659200000,
+      "string": "February 3, 2018"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "版本更新"
+    ],
+    "excerpt": "<p>此版本主要增加<code>xmake f --menu</code>实现用户自定义图形菜单配置,界面风格类似linux的<code>make menuconfig</code>:</p>\n<p>&lt;img src=&quot;/static/img/xmake/menuconf.gif&quot; width=&quot;60%&quot; /&gt;</p>\n<p>更多使用说明,请阅读:<a href=\"https://xmake.io/#/zh/\">文档手册</a>。</p>\n"
+  },
+  {
+    "title": "xmake 自定义构建规则的使用",
+    "url": "/zh/posts/custom-rule",
+    "date": {
+      "time": 1510574400000,
+      "string": "November 13, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "自定义规则"
+    ],
+    "excerpt": "<p>在2.1.9版本之后,xmake不仅原生内置支持多种语言文件的构建,而且还可以通过自定义构建规则,让用户自己来实现复杂的未知文件构建。</p>\n<p>具体使用介绍,可参考相关文档:<a href=\"https://xmake.io/#/zh/manual?id=%E6%9E%84%E5%BB%BA%E8%A7%84%E5%88%99\">rule规则使用手册</a></p>\n<p>我们可以通过预先设置规则支持的文件后缀,来扩展其他文件的构建支持:</p>\n"
+  },
+  {
+    "title": "xmake v2.1.8版本发布,改进对IDE和编辑器插件的支持",
+    "url": "/zh/posts/update-v2.1.8",
+    "date": {
+      "time": 1510142400000,
+      "string": "November 8, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "版本更新"
+    ],
+    "excerpt": "<p>此版本主要改进对IDE和编辑器插件的支持,目前xmake提供以下编辑器和IDE插件:</p>\n<ul>\n<li>Vim 编辑器插件\n<ul>\n<li><a href=\"https://github.com/luzhlon/xmake.vim\">xmake.vim</a> (第三方插件,感谢<a href=\"https://github.com/luzhlon\">@luzhlon</a>提供)</li>\n</ul>\n</li>\n<li>Visual Studio Code 编辑器插件 (<a href=\"https://github.com/xmake-io/xmake-vscode\">xmake-vscode</a>)</li>\n<li>Sublime Text 编辑器插件 (<a href=\"https://github.com/xmake-io/xmake-sublime\">xmake-sublime</a>)</li>\n<li>IntelliJ 系列ID...</li>\n</ul>\n<p>更多使用说明,请阅读:<a href=\"https://xmake.io/#/zh/\">文档手册</a>。</p>\n"
+  },
+  {
+    "title": "xmake-idea v1.0.3 发布, 一个集成xmake的Intellij-IDEA插件",
+    "url": "/zh/posts/xmake-idea-v1.0.3",
+    "date": {
+      "time": 1510056000000,
+      "string": "November 7, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "Intellij",
+      "IDEA",
+      "插件"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake-idea\">xmake-idea</a> 插件深度集成了<a href=\"https://github.com/xmake-io/xmake\">xmake</a>和Intellij-IDEA,提供方便快速的跨平台c/c++构建。</p>\n<p>并且它也支持其他基于Intellij的IDE环境, 例如:Clion, Android Studio等等。</p>\n<p>注:使用此插件,需要先安装xmake,更多关于xmake的使用说明,请阅读:<a href=\"https://xmake.io/#/zh/\">文档手册</a>,项目源码:<a href=\"https://github.com/xmake-io/xmake\">Github</a>。</p>\n"
+  },
+  {
+    "title": "xmake-sublime v1.0.3正式版本发布",
+    "url": "/zh/posts/xmake-sublime-v1.0.3",
+    "date": {
+      "time": 1508932800000,
+      "string": "October 25, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "sublime",
+      "插件"
+    ],
+    "excerpt": "<p><a href=\"https://github.com/xmake-io/xmake-sublime\">xmake-sublime</a>插件深度集成了<a href=\"https://github.com/xmake-io/xmake\">xmake</a>和sublime text,提供方便快速的跨平台c/c++构建。</p>\n<p>注:使用此插件,需要先安装xmake,更多关于xmake的使用说明,请阅读:<a href=\"https://xmake.io/zh/\">文档手册</a>,项目源码:<a href=\"https://github.com/xmake-io/xmake\">Github</a>。</p>\n<ul>\n<li>快速开始</li>\n<li>语法色彩高亮</li>\n<li>API输入自动提示和补全</li>\n<li>状态栏信息</li>\n<li>完整的命令列表</li>\n<li>快速配置支持</li>\n<li>构建和运行</li>\n<li>快速宏记录和回放</li>\n<li>编译错误提示和跳转</li>\n</ul>\n"
+  },
+  {
+    "title": "xmake-vscode v1.0.1正式版本发布",
+    "url": "/zh/posts/xmake-vscode-update-v1.0.1",
+    "date": {
+      "time": 1508241600000,
+      "string": "October 17, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "版本更新"
+    ],
+    "excerpt": "<p>title: xmake-vscode v1.0.1正式版本发布\ntags: [xmake, lua, 版本更新]\ndate: 2017-10-17\nauthor: Ruki</p>\n<hr>\n<p><a href=\"https://github.com/xmake-io/xmake-vscode\">xmake-vscode</a>插件深度集成了<a href=\"https://github.com/xmake-io/xmake\">xmake</a>和vscode,提供方便快速的跨平台c/c++构建。</p>\n<p>此版本为第一个正式版本,相比之前发布的体验版,新增了两大新特性:</p>\n"
+  },
+  {
+    "title": "xmake v2.1.7版本发布,稳定性修复和细节改进",
+    "url": "/zh/posts/update-v2.1.7",
+    "date": {
+      "time": 1507896000000,
+      "string": "October 13, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "版本更新"
+    ],
+    "excerpt": "<p>此版本主要修复一些稳定性问题,并且对一些细节进行改进优化,并且提供<a href=\"https://marketplace.visualstudio.com/items?itemName=tboox.xmake-vscode#overview\">xmake-vscode</a>插件深度集成vscode编辑器环境。</p>\n<p>更多使用说明,请阅读:<a href=\"https://xmake.io/zh/\">文档手册</a>。</p>\n<p>项目源码:<a href=\"https://github.com/xmake-io/xmake\">Github</a>, <a href=\"https://gitee.com/tboox/xmake\">Gitee</a>.</p>\n"
+  },
+  {
+    "title": "xmake-vscode插件开发过程记录",
+    "url": "/zh/posts/xmake-vscode",
+    "date": {
+      "time": 1507723200000,
+      "string": "October 11, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "vscode",
+      "插件开发"
+    ],
+    "excerpt": "<p>title: xmake-vscode插件开发过程记录\ntags: [xmake, vscode, 插件开发]\ndate: 2017-10-11\nauthor: Ruki</p>\n<hr>\n<p>最近打算给<a href=\"https://github.com/xmake-io/xmake\">xmake</a>写一些IDE和编辑器的集成插件,发现vscode的编辑器插件比较容易上手的,就先研究了下vscode的插件开发流程,并且完成了<a href=\"https://github.com/xmake-io/xmake-vscode\">xmake-vscode</a>插件的开发。</p>\n<p>我们先来看几张最后的效果图:</p>\n"
+  },
+  {
+    "title": "xmake 源码架构剖析",
+    "url": "/zh/posts/xmake-sourcecode-arch",
+    "date": {
+      "time": 1506600000000,
+      "string": "September 28, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "源码",
+      "架构设计"
+    ],
+    "excerpt": "<p>title: xmake 源码架构剖析\ntags: [xmake, lua, 源码, 架构设计]\ndate: 2017-09-28\nauthor: Ruki</p>\n<hr>\n<p>本文主要介绍下<a href=\"https://github.com/xmake-io/xmake\">xmake</a>的整体架构设计,以及源码结构的布局和模块划分。\n如果你想深度使用xmake,开发xmake插件、工程自定义脚本或者想为xmake贡献一些代码和特性,可以通过此本的介绍,对xmake项目整体有个大概的了解。,</p>\n<p>源码地址:<a href=\"https://github.com/xmake-io/xmake\">Github</a></p>\n"
+  },
+  {
+    "title": "xmake v2.1.6版本正式发布,稳定性修复",
+    "url": "/zh/posts/update-v2.1.6",
+    "date": {
+      "time": 1502971200000,
+      "string": "August 17, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "版本更新"
+    ],
+    "excerpt": "<p>title: xmake v2.1.6版本正式发布,稳定性修复\ntags: [xmake, lua, 版本更新]\ndate: 2017-08-17\nauthor: Ruki</p>\n<hr>\n<p>此版本主要修复一些稳定性问题。</p>\n<p>更多使用说明,请阅读:<a href=\"https://xmake.io/zh/\">文档手册</a>。</p>\n"
+  },
+  {
+    "title": "更细粒度的文件编译选项控制",
+    "url": "/zh/posts/config-files-options",
+    "date": {
+      "time": 1502366400000,
+      "string": "August 10, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "编译选项"
+    ],
+    "excerpt": "<p>之前的版本对编译控制粒度,只能到target这一级:</p>\n<pre><code class=\"language-lua\">-- 全局根配置,所有target都会被影响\nadd_defines(&quot;ROOT&quot;)\n\ntarget(&quot;test&quot;)</code></pre>\n"
+  },
+  {
+    "title": "使用xmake检测编译器特性支持",
+    "url": "/zh/posts/compiler-features",
+    "date": {
+      "time": 1502193600000,
+      "string": "August 8, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "cmake",
+      "编译器特性检测"
+    ],
+    "excerpt": "<p>如果我们要写跨平台的c/c++代码,很多时候需要处理由于不同编译器对c/c++各个标准支持力度不同导致的兼容性问题,一般通常的解决办法是:自己在代码中通过宏去判断各个编译器的版本、内置宏、标准库宏、<code>__has_feature</code>等来检测处理。</p>\n<p>自己如果在代码中按上述的方式检测,会很繁琐,尤其是像c++这种存在大量语法特性,如果一一检测过来,工作量是非常大的。</p>\n<p>另外比较省事的方式,就是依赖构建工具提前做好检测,然后把检测结果作为宏添加到编译中去,这样代码只需要判断对应的特性宏是否存在,就可以进行处理了。</p>\n"
+  },
+  {
+    "title": "xmake v2.1.5版本正式发布,大量新特性更新",
+    "url": "/zh/posts/update-v2.1.5",
+    "date": {
+      "time": 1501934400000,
+      "string": "August 5, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "版本更新",
+      "包查找",
+      "编译器特性检测",
+      "预编译头文件",
+      "扩展模块"
+    ],
+    "excerpt": "<p>此版本带来了大量新特性更新,具体详见:<a href=\"http://tboox.org/cn/2017/07/29/new-features-v2.1.5/\">xmake v2.1.5版本新特性介绍</a>。</p>\n<p>更多使用说明,请阅读:<a href=\"https://xmake.io/#/zh/\">文档手册</a>。</p>\n<p>项目源码:<a href=\"https://github.com/xmake-io/xmake\">Github</a>, <a href=\"https://gitee.com/tboox/xmake\">Gitee</a>.</p>\n"
+  },
+  {
+    "title": "不同编译器对预编译头文件的处理",
+    "url": "/zh/posts/precompiled-header",
+    "date": {
+      "time": 1501502400000,
+      "string": "July 31, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "预编译头文件",
+      "c++编译加速",
+      "优化编译",
+      "跨平台"
+    ],
+    "excerpt": "<p>最近为了给<a href=\"https://xmake.io\">xmake</a>实现预编译头文件的支持,研究了下各大主流编译器处理预编译头的机制以及之间的一些差异。</p>\n<p>现在的大部分c/c++编译器都是支持预编译头的,例如:gcc,clang,msvc等,用于优化c++代码的编译速度,毕竟c++的头文件如果包含了模板定义的话,编译速度是很慢的,\n如果能够吧大部分通用的头文件放置在一个<code>header.h</code>中,在其他源码编译之前预先对其进行编译,之后的代码都能重用这部分预编译头,就可以极大程度上减少频繁的头文件冗余编译。</p>\n<p>但是不同编译器对它的支持力度和处理方式,还是有很大差异的,并不是非常通用,在xmake中封装成统一的接口和使用方式,还是费了很大的功夫才搞定。</p>\n"
+  },
+  {
+    "title": "xmake v2.1.5版本新特性介绍",
+    "url": "/zh/posts/new-features-v2.1.5",
+    "date": {
+      "time": 1501329600000,
+      "string": "July 29, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "cmake",
+      "包查找",
+      "编译器特性检测",
+      "预编译头文件",
+      "扩展模块"
+    ],
+    "excerpt": "<p>2.1.5版本现已进入收尾阶段,此版本加入了一大波新特性,目前正在进行稳定性测试和修复,在这里,先来介绍下新版本中引入了哪些些新特性和改进。</p>\n<pre><code>1. 提供类似cmake的find_*系列接口,实现各种查找,例如:find_package, find_library, find_file, ...\n2. 提供模块接口,实现编译器的各种检测,例如:has_features, has_flags, has_cincludes, has_cfuncs, ...\n3. 实现大量扩展模块,提供文件下载、解压缩、git操作等接口\n4. 支持预编译头文件支持,改进c++编译效率\n5. 支持在工程中自定义模块进行扩展\n6. 提供代码片段检测接口,实现更加灵活定制化的检测需求\n7. 改进option和target,提供更加动态化的配置\n8. 通过...\n\n此接口参考了cmake对于`find_*`系列接口的设计,实现在项目中动态的查找和添加包依赖。</code></pre>\n"
+  },
+  {
+    "title": "xmake v2.1.4版本更新,增加交互式命令执行(REPL)",
+    "url": "/zh/posts/update-v2.1.4",
+    "date": {
+      "time": 1494417600000,
+      "string": "May 10, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "版本更新"
+    ],
+    "excerpt": "<p>此次更新,主要增强<code>xmake lua</code>插件,支持交互式命令执行(read-eval-print, REPL)以及一些稳定性问题修复。</p>\n<p>有时候在交互模式下,运行命令更加的方便测试和验证一些模块和api,也更加的灵活,不需要再去额外写一个脚本文件来加载。</p>\n<p>我们先看下,如何进入交互模式:</p>\n"
+  },
+  {
+    "title": "使用xmake优雅地描述工程",
+    "url": "/zh/posts/project-desciption-examples",
+    "date": {
+      "time": 1491393600000,
+      "string": "April 5, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "工程描述"
+    ],
+    "excerpt": "<p>title: 使用xmake优雅地描述工程\ntags: [xmake, lua, 工程描述]\ndate: 2017-04-05\nauthor: Ruki</p>\n<hr>\n<h3>描述语法</h3>\n<p>xmake的描述语法基于lua实现,因此描述语法继承了lua的灵活性和简洁性,并且通过28原则,将描述作用域(简单描述)、脚本作用域(复杂描述)进行分离,使得工程更加的简洁直观,可读性非常好。</p>\n"
+  },
+  {
+    "title": "xmake v2.1.3版本更新,修复安全和稳定性问题",
+    "url": "/zh/posts/update-v2.1.3",
+    "date": {
+      "time": 1491134400000,
+      "string": "April 2, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "版本更新"
+    ],
+    "excerpt": "<p>此次更新,主要修复xmake的一些稳定性问题,并且对安装和卸载提供更加安全的权限处理,相关更新细节见:<a href=\"/cn/2017/03/30/safer-install-and-uninstall/\">改进权限问题,提升操作安全性</a></p>\n<p><img src=\"/static/img/xmake/safer_installation.png\" alt=\"safer_installation\"></p>\n<p>并且此版本还对用户使用上的体验进行了一些优化,例如:</p>\n"
+  },
+  {
+    "title": "xmake改进权限问题,提升操作安全性",
+    "url": "/zh/posts/safer-install-and-uninstall",
+    "date": {
+      "time": 1490875200000,
+      "string": "March 30, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "root权限",
+      "安装",
+      "卸载"
+    ],
+    "excerpt": "<p>最近对xmake的操作权限进行了升级,提供更加安全的命令操作,例如:</p>\n<ol>\n<li>改进<code>xmake install</code>和<code>xmake uninstall</code>命令,提供更加安全地安装和卸载支持</li>\n<li>参考homebrew,禁止在root下运行xmake命令</li>\n<li>改进xmake自身的编译安装脚本,不在root下进行build</li>\n</ol>\n<p>之前的<code>xmake install</code>和<code>xmake uninstall</code>行为,是自动<code>build</code>后进行安装,而大部分情况下安装目录是在<code>/usr/local</code>目录下。</p>\n"
+  },
+  {
+    "title": "xmake v2.1.2版本更新,增强vs工程支持",
+    "url": "/zh/posts/update-v2.1.2",
+    "date": {
+      "time": 1490270400000,
+      "string": "March 23, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "版本",
+      "vs201x"
+    ],
+    "excerpt": "<p>此版本主要增强了vs201x工程的生成,以及支持vs2017编译环境,并且针对archlinux提供更加方便的aur安装。</p>\n<ul>\n<li><a href=\"http://www.xmake.io/cn/\">项目主页</a></li>\n<li><a href=\"http://www.xmake.io/#zh/\">查看文档</a></li>\n</ul>\n<p>详细更新内容如下:</p>\n"
+  },
+  {
+    "title": "xmake 大版本发布:v2.1.1,新增golang, rust, dlang构建支持",
+    "url": "/zh/posts/update-v2.1.1",
+    "date": {
+      "time": 1488628800000,
+      "string": "March 4, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "版本",
+      "golang",
+      "rust",
+      "dlang"
+    ],
+    "excerpt": "<p>此版本重构了整个xmake,使得xmake更加方便地进行多语言扩展,并且在之前原有的构建语言支持上,新增了对<code>golang</code>, <code>dlang</code> 和 <code>rust</code> 程序构建支持。</p>\n<p>并且重写了所有文档,提供更加详细完整的接口手册和文档支持:<a href=\"http://www.xmake.io/#zh/\">新版文档</a></p>\n<p>License也从之前的LGPLv2.1改为Apache License 2.0,更加详细的改进请看下面详细描述:</p>\n"
+  },
+  {
+    "title": "xmake新版文档更新",
+    "url": "/zh/posts/new-document",
+    "date": {
+      "time": 1486468800000,
+      "string": "February 7, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "文档"
+    ],
+    "excerpt": "<p>title: xmake新版文档更新\ntags: [xmake, lua, 文档]\ndate: 2017-02-07\nauthor: Ruki</p>\n<hr>\n<p>之前的<a href=\"#https://github.com/xmake-io/xmake/wiki\">wiki文档</a>结构不是很好,而且不方便检索。</p>\n<p>因此最近使用<a href=\"https://docute.js.org/\">docute</a>这个文档工具,重写了一遍整个xmake文档,并且增加了更加详细的api文档手册,后续会持续更新维护。</p>\n"
+  },
+  {
+    "title": "xmake使用演示",
+    "url": "/zh/posts/usage-demo",
+    "date": {
+      "time": 1484740800000,
+      "string": "January 18, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "使用演示"
+    ],
+    "excerpt": "<p>title: xmake使用演示\ntags: [xmake, lua, 使用演示]\ndate: 2017-01-18\nauthor: Ruki</p>\n<hr>\n<p><a href=\"/cn/project\"><img src=\"/static/img/xmake/usage_demo.gif\" alt=\"usage_demo\"></a></p>\n"
+  },
+  {
+    "title": "利用debug库实现对lua的性能分析",
+    "url": "/zh/posts/lua-profiler",
+    "date": {
+      "time": 1484222400000,
+      "string": "January 12, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "性能分析"
+    ],
+    "excerpt": "<p>之前在给<a href=\"/cn/project\">xmake</a>做构建的效率优化的时候,需要对lua脚本的api调用性能进行分析,分析出最耗时一些lua调用api,\n找出性能瓶颈,来针对性地进行优化,那么问题来了,如果对lua脚本像c程序那样进行profile呢?</p>\n<p>我们现在看下最后实现完的最终效果:</p>\n<pre><code> 4.681,  98.84%,       1, anonymous                     : actions/build/main.lua: 36\n 3.314,  69.98%,       1, anonymous                     : actions/build/main.lua: 66\n 3.314,  69.98%,       1, build                         : actions/build/builder.lua: 127\n 3.298,  69.65%,       2, _build_targ...</code></pre>\n"
+  },
+  {
+    "title": "xmake新增智能代码扫描编译模式,无需手写任何make文件",
+    "url": "/zh/posts/build-without-makefile",
+    "date": {
+      "time": 1483790400000,
+      "string": "January 7, 2017"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "makefile"
+    ],
+    "excerpt": "<p>最近给<a href=\"https://xmake.io/cn\">xmake</a>增加了一个新特性,对于一份工程源码,可以不用编写makefile,也不用编写各种make相关的工程描述文件(例如:xmake.lua,makefile.am, cmakelist.txt等)</p>\n<p>xmake就可以直接编译他们,这是如何做到的呢,简单来说下实现原理:</p>\n<ol>\n<li>首先扫描当前目录下,xmake所以支持的所有源代码文件</li>\n<li>分析代码,检测哪些代码拥有main入口函数</li>\n<li>所有没有main入口的代码编译成静态库</li>\n<li>带有main入口的代码,编译成可执行程序,同时链接其他静态库程序</li>\n</ol>\n"
+  },
+  {
+    "title": "使用lua实现try-catch异常捕获",
+    "url": "/zh/posts/try-catch",
+    "date": {
+      "time": 1481716800000,
+      "string": "December 14, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "lua",
+      "try-catch",
+      "异常捕获"
+    ],
+    "excerpt": "<p>lua原生并没有提供try-catch的语法来捕获异常处理,但是提供了<code>pcall/xpcall</code>等接口,可在保护模式下执行lua函数。</p>\n<p>因此,可以通过封装这两个接口,来实现try-catch块的捕获机制。</p>\n<p>我们可以先来看下,封装后的try-catch使用方式:</p>\n"
+  },
+  {
+    "title": "xmake 工程描述语法更新",
+    "url": "/zh/posts/syntax-style",
+    "date": {
+      "time": 1479211200000,
+      "string": "November 15, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "描述语法"
+    ],
+    "excerpt": "<p>title: xmake 工程描述语法更新\ntags: [xmake, 描述语法]\ndate: 2016-11-15\nauthor: Ruki</p>\n<hr>\n<p>最近对xmake.lua的工程描述语法进行了增强,现已可以同时支持两种不同语法风格。</p>\n<ul>\n<li>set-add描述风格</li>\n<li>key-val描述风格</li>\n</ul>\n"
+  },
+  {
+    "title": "xmake 新增ios app2ipa插件",
+    "url": "/zh/posts/app-to-ipa",
+    "date": {
+      "time": 1478692800000,
+      "string": "November 9, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "插件",
+      "ios"
+    ],
+    "excerpt": "<p>最近在做ios app的企业测试包,需要频繁打包分发给测试,因此将编译完的.app打包成ipa单独分发出去,这里调研下几种打包方案:</p>\n<ol>\n<li>直接通过iTunes来打包</li>\n<li>调用zip写个打包脚本</li>\n<li>使用第三方脚本和工具</li>\n</ol>\n<p>为了方便日常ios app打包程ipa,觉得可以把这个脚本放到xmake中去,作为一个小插件提供,也是个不错的方式。</p>\n"
+  },
+  {
+    "title": "xmake v2.0.5 发布!",
+    "url": "/zh/posts/update-v2.0.5",
+    "date": {
+      "time": 1477828800000,
+      "string": "October 30, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "版本更新"
+    ],
+    "excerpt": "<p>title: xmake v2.0.5 发布!\ntags: [xmake, 版本更新]\ndate: 2016-10-30\nauthor: Ruki</p>\n<hr>\n<h3>新特性</h3>\n<ul>\n<li>为解释器作用域增加一些内建模块支持</li>\n<li>针对windows x64平台,支持ml64汇编器</li>\n</ul>\n"
+  },
+  {
+    "title": "xmake 描述语法和作用域详解",
+    "url": "/zh/posts/api-scope",
+    "date": {
+      "time": 1477483200000,
+      "string": "October 26, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "api",
+      "工程描述",
+      "作用域"
+    ],
+    "excerpt": "<p>xmake的工程描述文件xmake.lua虽然基于lua语法,但是为了使得更加方便简洁得编写项目构建逻辑,xmake对其进行了一层封装,使得编写xmake.lua不会像些makefile那样繁琐</p>\n<p>基本上写个简单的工程构建描述,只需三行就能搞定,例如:</p>\n<pre><code class=\"language-lua\">target(&quot;test&quot;)\n    set_kind(&quot;binary&quot;)\n    add_files(&quot;src/*.c&quot;)\n</code></pre>\n"
+  },
+  {
+    "title": "xmake支持vs2002-vs2015工程文件生成",
+    "url": "/zh/posts/generate-vs2015-project",
+    "date": {
+      "time": 1472472000000,
+      "string": "August 29, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "VisualStudio",
+      "vs2008"
+    ],
+    "excerpt": "<p>xmake master上最新版本已经支持vs2002-vs2015工程文件的生成,通过<code>project</code>插件的方式提供,例如:</p>\n<p>创建vs2013工程文件:</p>\n<pre><code class=\"language-bash\">$ xmake project -k vs2013\n</code></pre>\n"
+  },
+  {
+    "title": "xmake v2.0.4发布!",
+    "url": "/zh/posts/update-v2.0.4",
+    "date": {
+      "time": 1472472000000,
+      "string": "August 29, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "版本更新"
+    ],
+    "excerpt": "<p>title: xmake v2.0.4发布!\ntags: [xmake, 版本更新]\ndate: 2016-08-29\nauthor: Ruki</p>\n<hr>\n<h3>新特性</h3>\n<ul>\n<li>在<code>xmake.lua</code>中添加原生shell支持,例如:<code>add_ldflags(&quot;$(shell pkg-config --libs sqlite3)&quot;)</code></li>\n<li>编译windows目标程序,默认默认启用pdb符号文件</li>\n<li>在windows上添加调试器支持(vsjitdebugger, ollydbg, windbg ... )</li>\n<li>添加<code>getenv</code>接口到<code>xmake.lua</code>的全局作用域中</li>\n<li>添加生成vstudio工程插件(支持:vs2002 - vs2015)</li>\n<li>为option添加<code>set_default</code>接口</li>\n</ul>\n"
+  },
+  {
+    "title": "xmake支持vs2008生成",
+    "url": "/zh/posts/generate-vs2008-project",
+    "date": {
+      "time": 1471003200000,
+      "string": "August 12, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "VisualStudio",
+      "vs2008"
+    ],
+    "excerpt": "<p>xmake master上最新版本已经支持vs2008工程文件的生成,通过<code>project</code>插件的方式提供,例如:</p>\n<p>创建vs2008工程文件:</p>\n<pre><code class=\"language-bash\">$ xmake project -k vs2008\n</code></pre>\n"
+  },
+  {
+    "title": "xmake内建变量和外置变量的使用",
+    "url": "/zh/posts/variables-usage",
+    "date": {
+      "time": 1470657600000,
+      "string": "August 8, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "内建变量",
+      "外置变量"
+    ],
+    "excerpt": "<p>title: xmake内建变量和外置变量的使用\ntags: [xmake, 内建变量, 外置变量]\ndate: 2016-08-08\nauthor: Ruki</p>\n<hr>\n<h2>内建变量</h2>\n<p>内置在字符串中,例如:</p>\n"
+  },
+  {
+    "title": "xmake高级特性之自定义选项",
+    "url": "/zh/posts/custom-option",
+    "date": {
+      "time": 1470571200000,
+      "string": "August 7, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "自定义选项"
+    ],
+    "excerpt": "<p>xmake还可以支持一些自定义选项开关,使得工程支持可选编译,方便工程的模块化管理。</p>\n<p>我们拿一个实际的例子来说:</p>\n<p>我们想在自己的工程中增加一个新开关选项:hello, 如果这个开关被启用,会在target中添加特定的一些源码文件,但是这个开挂默认是不被启用的,需要通过配置<code>xmake f --hello=true</code>才会被链接和使用</p>\n"
+  },
+  {
+    "title": "依赖包的添加和自动检测机制",
+    "url": "/zh/posts/add-package-and-autocheck",
+    "date": {
+      "time": 1470484800000,
+      "string": "August 6, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "依赖包",
+      "自动检测"
+    ],
+    "excerpt": "<p>xmake将依赖库、依赖头文件、依赖类型、依赖接口统一用 option 选项机制进行了封装,更在上一层引入package包的机制,使得添加和检测依赖更加的模块化,简单化。。。</p>\n<p>下面通过一个具体实例,来看下xmake的包机制怎么使用。。</p>\n<p>假如你现在的工程已经有了两个包:zlib.pkg,polarssl.pkg(如何构建包,后续会详细说明,现在可以参考<a href=\"https://github.com/waruqi/tbox/tree/master/pkg\">TBOX依赖包</a>下已有包的例子),你的工程目录结构如下:</p>\n"
+  },
+  {
+    "title": "xmake高级特性之批量检测库函数",
+    "url": "/zh/posts/batch-check-library-interfaces",
+    "date": {
+      "time": 1470484800000,
+      "string": "August 6, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "批量检测"
+    ],
+    "excerpt": "<p>有时候可能用到某个库的某些函数接口,但是这个库有可能在某个平台上被裁减过了,接口支持不全,如果你想跨平台使用,就会出问题</p>\n<p>因此在使用之前进行检测是否存在这个函数,还是很有必要的,xmake提供了方便的api,可以批量检测某个库的一些函数:</p>\n<p>例如:</p>\n"
+  },
+  {
+    "title": "使用xmake编译swift代码",
+    "url": "/zh/posts/compile-swift",
+    "date": {
+      "time": 1470484800000,
+      "string": "August 6, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "swift"
+    ],
+    "excerpt": "<p>xmake不仅可以支持 c/c++文件,同时也支持 objc/c++,甚至swift代码的编译。</p>\n<p>我们先看一下如何创建Swift工程,首先执行--help,看下帮助文档:</p>\n<pre><code class=\"language-bash\">xmake create --help \n</code></pre>\n"
+  },
+  {
+    "title": "静态库和动态库的编译切换",
+    "url": "/zh/posts/switch-library-kind",
+    "date": {
+      "time": 1470225600000,
+      "string": "August 3, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "静态库",
+      "动态库"
+    ],
+    "excerpt": "<p>title: 静态库和动态库的编译切换\ntags: [xmake, 静态库, 动态库]\ndate: 2016-08-03\nauthor: Ruki</p>\n<hr>\n<p>如果你想在同一个target上既编译静态库,又能编译动态库,那么稍微修改下 xmale.lua就行了:</p>\n<pre><code class=\"language-lua\">add_target(&quot;test&quot;)</code></pre>\n"
+  },
+  {
+    "title": "xmake高级特性之选项绑定",
+    "url": "/zh/posts/binding-option",
+    "date": {
+      "time": 1470139200000,
+      "string": "August 2, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "选项绑定"
+    ],
+    "excerpt": "<p>什么是选项的绑定呢?</p>\n<p>例如我想在命令行中配置一个smallest的参数:<code>xmake f --smallest=y</code></p>\n<p>这个时候,需要同时禁用多个其他的选项开关,来禁止编译多个模块,就是这个需求,相当于一个选项 与其他 多个选项之间 是有联动效应的。。</p>\n"
+  },
+  {
+    "title": "xmake插件使用之doxygen文档生成",
+    "url": "/zh/posts/plugin-doxygen",
+    "date": {
+      "time": 1470139200000,
+      "string": "August 2, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "doxygen",
+      "插件",
+      "文档生成"
+    ],
+    "excerpt": "<p>这个doxygen插件比较简单,说白了就是一键生成工程文档,只需要执行下面这行命令就行了</p>\n<pre><code class=\"language-bash\">xmake doxygen\n</code></pre>\n<p>当然你也可以指定输出目录,可以工程源码目录:</p>\n"
+  },
+  {
+    "title": "关于xmake下一步的开发计划",
+    "url": "/zh/posts/next-plan",
+    "date": {
+      "time": 1469793600000,
+      "string": "July 29, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "插件",
+      "后续计划"
+    ],
+    "excerpt": "<p>title: 关于xmake下一步的开发计划\ntags: [xmake, 插件, 后续计划]\ndate: 2016-07-29\nauthor: Ruki</p>\n<hr>\n<p>最近有很多用户反馈xmake在windows上编译体验不是很好,不方便进行调试和开发。。</p>\n<p>其实xmake的定位主要还是以直接编译为主,提供跨平台的编译和部署,不依赖第三方IDE工程,不过目前确实在windows的体验还不是很好</p>\n"
+  },
+  {
+    "title": "在windows下支持调试运行",
+    "url": "/zh/posts/support-debugger-on-windows",
+    "date": {
+      "time": 1469448000000,
+      "string": "July 25, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "编译",
+      "符号文件",
+      "调试器",
+      "windows"
+    ],
+    "excerpt": "<p>现在xmake在windows下,也已经支持调试运行了,可以在编译完debug版本的程序后,直接进行调试开发。。</p>\n<p>我们继续以tbox工程为例:</p>\n<pre><code class=\"language-bash\">$ xmake f -m debug\n$ xmake r -d demo\n</code></pre>\n"
+  },
+  {
+    "title": "xmake默认启用pdb符号文件",
+    "url": "/zh/posts/enable-pdb-on-windows",
+    "date": {
+      "time": 1469361600000,
+      "string": "July 24, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "编译",
+      "符号文件",
+      "调试符号"
+    ],
+    "excerpt": "<p>title: xmake默认启用pdb符号文件\ntags: [xmake, 编译, 符号文件, 调试符号]\ndate: 2016-07-24\nauthor: Ruki</p>\n<hr>\n<p>之前xmake默认编译windows目标,debug模式下采用的是<code>-Z7</code>编译选项,内置的调试符号信息到obj文件里面</p>\n<p>但是这种方式按msdn的文档上说,是属于旧式的调试符号文件格式,所以为了考虑后续的兼容性,xmake修改了默认的调试符号生成规则,</p>\n"
+  },
+  {
+    "title": "xmake工程描述编写之选择性编译",
+    "url": "/zh/posts/condition-and-select-compile",
+    "date": {
+      "time": 1469275200000,
+      "string": "July 23, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "编译",
+      "工程描述",
+      "xmake.lua",
+      "条件判断"
+    ],
+    "excerpt": "<p>xmake 提供了一些内置的条件判断api,用于在选择性编译时,获取到一些工程状态的相关信息,来调整编译逻辑。。</p>\n<p>例如:<code>is_os</code>, <code>is_plat</code>, <code>is_arch</code>, <code>is_kind</code>, <code>is_mode</code>, <code>is_option</code></p>\n<p>我们先拿最常用的<code>is_mode</code>来讲讲如何使用,这个api主要用来判断当前的编译模式,例如平常编译配置的时候,会执行:</p>\n"
+  },
+  {
+    "title": "如何通过xmake进行交叉编译",
+    "url": "/zh/posts/how-to-compile-on-cross-toolchains",
+    "date": {
+      "time": 1469188800000,
+      "string": "July 22, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "交叉编译"
     ],
-    "excerpt": "<p>构建能在多个平台上运行的应用程序可能具有挑战性,但 Xmake 让这一切变得简单得多。在本文中,我们将探索如何使用 Xmake 构建跨平台应用程序。</p>\n<p>在当今多样化的计算环境中,用户期望您的应用程序能在他们偏好的平台上运行。无论是 Windows、macOS 还是 Linux,Xmake 都提供了从单一代码库为所有平台构建应用所需的工具。</p>\n<p>以下是如何配置 Xmake 进行跨平台构建的简单示例:</p>\n"
+    "excerpt": "<p>title: 如何通过xmake进行交叉编译\ntags: [xmake, 交叉编译]\ndate: 2016-07-22\nauthor: Ruki</p>\n<hr>\n<p>xmake 提供了方便灵活的交叉编译支持,大部分情况下,都不需要配置很复杂的toolchains前缀,例如:<code>arm-linux-</code> 什么的</p>\n<p>只要这个toolchains目录满足如下结构(大部分的交叉工具链都是这个结构):</p>\n"
   },
   {
-    "title": "Xmake 入门指南",
-    "url": "/zh/posts/post-3",
+    "title": "xmake编译配置过程详解",
+    "url": "/zh/posts/config-description",
     "date": {
-      "time": 1704456000000,
-      "string": "January 5, 2024"
+      "time": 1468929600000,
+      "string": "July 19, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "教程",
-      "入门"
+      "xmake",
+      "配置",
+      "android",
+      "vs",
+      "自动检测"
+    ],
+    "excerpt": "<p>xmake 在构建程序的时候,会去自动检测系统环境,工程描述等来创建最合适的编译配置来进行编译。。</p>\n<p>一般情况下,我们只需要执行:</p>\n<pre><code class=\"language-bash\">$ xmake\n</code></pre>\n"
+  },
+  {
+    "title": "内置变量与原生shell脚本运行",
+    "url": "/zh/posts/builtinvar-and-shell",
+    "date": {
+      "time": 1468843200000,
+      "string": "July 18, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "shell",
+      "内置变量",
+      "pkg-config"
+    ],
+    "excerpt": "<p>xmake在xmake.lua中提供了 <code>$(varname)</code> 的语法,来支持内置变量的获取,例如:</p>\n<pre><code class=\"language-lua\">add_cxflags(&quot;-I$(buildir)&quot;)\n</code></pre>\n<p>它将会在在实际编译的时候,将内置的 <code>buildir</code> 变量转换为实际的构建输出目录:<code>-I./build</code></p>\n"
+  },
+  {
+    "title": "如何为windows编译启用pdb支持",
+    "url": "/zh/posts/enable-pdb-for-windows",
+    "date": {
+      "time": 1468843200000,
+      "string": "July 18, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "pdb",
+      "调试符号",
+      "windows"
+    ],
+    "excerpt": "<p>xmake默认情况下是不会去生成pdb文件,就算是debug编译,启用了调试符号:</p>\n<pre><code class=\"language-lua\">set_symbols(&quot;debug&quot;)\n</code></pre>\n<p>也是不会生成额外的pdb文件,它会把所有调试符号内置到程序里面,如果要独立生成pdb文件,可以对<code>xmake.lua</code>进行如下修改:</p>\n"
+  },
+  {
+    "title": "演示:构建一个简单的程序",
+    "url": "/zh/posts/demo-build-a-simple-project",
+    "date": {
+      "time": 1468756800000,
+      "string": "July 17, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "演示",
+      "编译",
+      "交叉编译"
+    ],
+    "excerpt": "<p><a href=\"https://asciinema.org/a/79998\"><img src=\"https://asciinema.org/a/79998.png\" alt=\"asciicast\"></a></p>\n"
+  },
+  {
+    "title": "xmake v2.0.3 更新!",
+    "url": "/zh/posts/update-v2.0.3",
+    "date": {
+      "time": 1468756800000,
+      "string": "July 17, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "版本更新",
+      "xmake.io",
+      "windows"
+    ],
+    "excerpt": "<p><a href=\"http://www.xmake.io/cn\">主页</a>\n<a href=\"https://github.com/waruqi/xmake\">源码</a></p>\n<ul>\n<li>\n<p>增加头文件依赖自动检测和增量编译,提高编译速度</p>\n</li>\n<li>\n<p>在终端中进行颜色高亮提示</p>\n</li>\n<li>\n<p>添加调试器支持,<code>xmake run -d program ...</code></p>\n</li>\n<li>\n<p>增强运行shell的系列接口</p>\n</li>\n<li>\n<p>更新luajit到v2.0.4版本</p>\n</li>\n<li>\n<p>改进makefile生成插件,移除对xmake的依赖,并且支持<code>windows/linux/macosx</code>等大部分pc平台</p>\n</li>\n<li>\n<p>优化多任务编译速度,在windows下编译提升较为明显</p>\n</li>\n</ul>\n"
+  },
+  {
+    "title": "如何快速构建一个简单的程序",
+    "url": "/zh/posts/how-to-build-a-simple-project",
+    "date": {
+      "time": 1468670400000,
+      "string": "July 16, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "编译",
+      "交叉编译"
+    ],
+    "excerpt": "<p>title: 如何快速构建一个简单的程序\ntags: [xmake, 编译, 交叉编译]\ndate: 2016-07-16\nauthor: Ruki</p>\n<hr>\n<p>首先我们通过内置的工程模板创建一个空工程:</p>\n<pre><code class=\"language-bash\">$ xmake create -P ./hello</code></pre>\n"
+  },
+  {
+    "title": "利用xmake运行和调试程序",
+    "url": "/zh/posts/run-debug",
+    "date": {
+      "time": 1468670400000,
+      "string": "July 16, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "调试",
+      "运行"
+    ],
+    "excerpt": "<p>title: 利用xmake运行和调试程序\ntags: [xmake, 调试, 运行]\ndate: 2016-07-16\nauthor: Ruki</p>\n<hr>\n<p>xmake默认在编译完程序后,可以通过以下命令运行指定目标程序:</p>\n<pre><code class=\"language-bash\">    $xmake run [target] [arguments] ...\n</code></pre>\n"
+  },
+  {
+    "title": "插件开发之色彩高亮显示",
+    "url": "/zh/posts/plugin-print-colors",
+    "date": {
+      "time": 1468497600000,
+      "string": "July 14, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "插件",
+      "终端色彩高亮"
+    ],
+    "excerpt": "<p>xmake在开发插件脚本的时候,除了可以使用lua内置的print进行终端输出外,还可以通过另外一个接口:<code>cprint</code>实现终端的色彩高亮输出</p>\n<p>例如:</p>\n<pre><code class=\"language-lua\">    cprint('${bright}hello xmake')\n    cprint('${red}hello xmake')\n    cprint('${bright green}hello ${clear}xmake')\n    cprint('${blue onyellow underline}hello xmake${clear}')\n    cprint('${red}hello ${magenta}xmake')\n    cprint('${cyan}hello ${dim yellow}xmake')\n</code></pre>\n"
+  },
+  {
+    "title": "头文件自动依赖检测和构建",
+    "url": "/zh/posts/includes-check",
+    "date": {
+      "time": 1468324800000,
+      "string": "July 12, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "头文件依赖",
+      "增量编译"
+    ],
+    "excerpt": "<p>为了进一步提升构建效率,减少没必要的重建,xmake新增了对头文件的依赖检测,以及自动构建仅仅需要重新编译的源文件,提升编译速度,并且完全支持windows、linux、macosx等大部分平台。。</p>\n<p>由于检测过程本身也会有一些性能损耗,因此xmake对此进行了深度优化,实现极速依赖检测:</p>\n<ul>\n<li>对依赖头文件进行过滤,如果是系统头文件,非自身项目的第三方头文件,自动忽略,这些头文件基本上不会再开发项目的时候,经常变动,所以没必要去每次检测他们,如果真有变动,手动重建下就行了</li>\n</ul>\n"
+  },
+  {
+    "title": "插件使用之加载自定义lua脚本",
+    "url": "/zh/posts/plugin-lua",
+    "date": {
+      "time": 1467892800000,
+      "string": "July 7, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "plugin",
+      "scripts"
     ],
-    "excerpt": "<p>Xmake 是一个现代化的构建系统,让 C/C++ 开发变得更加简单和高效。在本指南中,我们将介绍 Xmake 的基本设置和使用方法。</p>\n<p>安装 Xmake 非常简单。您可以使用以下方法之一:</p>\n<p>让我们创建一个简单的 C++ 项目:</p>\n"
+    "excerpt": "<p>xmake里面的lua脚本加载插件,可以让你方便调试和编写一些自定义的lua脚本,这个时候xmake就是一个纯lua的加载引擎。。</p>\n<p>例如,我想写个简单的<code>hello xmake!</code>的lua脚本,可以自己建个 <code>hello.lua</code> 文件,编写如下脚本:</p>\n<pre><code class=\"language-lua\">    function main()\n        print(&quot;hello xmake!&quot;)\n    end\n</code></pre>\n"
   },
   {
-    "title": "高级包管理",
-    "url": "/zh/posts/post-4",
+    "title": "xmake插件开发之类库使用",
+    "url": "/zh/posts/plugin-modules",
     "date": {
-      "time": 1704283200000,
-      "string": "January 3, 2024"
+      "time": 1467892800000,
+      "string": "July 7, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
+      "xmake",
+      "插件",
+      "类库"
+    ],
+    "excerpt": "<p>xmake通过import接口,可以在自定义脚本中导入各种内置类库和扩展类库模块,使得xmake的插件开发具有更多的灵活性,提供更丰富的功能。</p>\n<p>我们先看下,目前xmake提供的一些类库:</p>\n<pre><code>    .\n    ├── _g.lua\n    ├── assert.lua\n    ├── catch.lua\n    ├── coroutine.lua\n    ├── debug.lua\n    ├── finally.lua\n    ├── format.lua\n    ├── ifelse.lua\n    ├── import\n    │   └── core\n    │       ├── base\n    │       │   └── option.lua\n    │       ├── platform\n    │       │   ├── environment...</code></pre>\n"
+  },
+  {
+    "title": "xmake v2.0.2 更新!",
+    "url": "/zh/posts/update-v2.0.2",
+    "date": {
+      "time": 1467806400000,
+      "string": "July 6, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "版本更新",
+      "xmake.io",
+      "windows"
+    ],
+    "excerpt": "<p><a href=\"https://xmake.io/cn\">主页</a>\n<a href=\"https://github.com/waruqi/xmake\">源码</a></p>\n<p>此版本,主要修复一些bug和稳定性改善</p>\n<ul>\n<li>修改安装和卸载的action处理</li>\n<li>更新工程模板</li>\n<li>增强函数检测</li>\n</ul>\n"
+  },
+  {
+    "title": "xmake 新站发布:xmake.io",
+    "url": "/zh/posts/xmake-io",
+    "date": {
+      "time": 1467460800000,
+      "string": "July 2, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "站点",
+      "xmake.io"
+    ],
+    "excerpt": "<p>title: xmake 新站发布:xmake.io\ntags: [xmake, 站点, xmake.io]\ndate: 2016-07-02\nauthor: Ruki</p>\n<hr>\n<p>tboox.org 开源项目组织旗下开源项目xmake发布独立站点:</p>\n<p><a href=\"https://xmake.io/cn\">https://xmake.io</a></p>\n"
+  },
+  {
+    "title": "xmake后期发展随想",
+    "url": "/zh/posts/v2.1.1-goal",
+    "date": {
+      "time": 1466856000000,
+      "string": "June 25, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
       "包管理",
-      "高级"
+      "插件",
+      "代码移植编译"
+    ],
+    "excerpt": "<p>title: xmake后期发展随想\ntags: [xmake, 包管理, 插件, 代码移植编译]\ndate: 2016-06-25\nauthor: Ruki</p>\n<hr>\n<p>随着xmake v2.0.1 版本的发布,这大半年的辛苦总算告一段落,这个版本我基本上重构整个项目的90%的代码,几乎算是重写了,但结果还算挺满意的。。</p>\n<p>因为上个版本的架构设计的不是很好,不能很好进行扩展,也不支持插件模式,语法设计上也不严谨,容易出现各种隐患,这对于后期维护和发展来说,已经出现了不可逾越的瓶颈。。</p>\n"
+  },
+  {
+    "title": "插件开发之import类库",
+    "url": "/zh/posts/api-import",
+    "date": {
+      "time": 1465473600000,
+      "string": "June 9, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "插件",
+      "import",
+      "类库",
+      "自定义脚本"
+    ],
+    "excerpt": "<p>import的主要用于导入xmake的扩展类库以及一些自定义的类库模块,一般用于 自定义脚本(on_build, on_run ..)、插件开发、模板开发、平台扩展、自定义任务task等地方。</p>\n<p>导入机制如下:</p>\n<ol>\n<li>优先从当前脚本目录下导入</li>\n<li>再从扩展类库中导入</li>\n</ol>\n"
+  },
+  {
+    "title": "高级特性之自定义脚本使用",
+    "url": "/zh/posts/custom-action",
+    "date": {
+      "time": 1465473600000,
+      "string": "June 9, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "自定义脚本",
+      "安装",
+      "打包",
+      "android",
+      "apk",
+      "jni"
+    ],
+    "excerpt": "<p>xmake提供了自定义打包、安装、运行脚本,可以更加灵活的针对个人实际需求来操作xmake</p>\n<p>这里用一个例子详细说明下,比如有个需求,我需要自动编译、安装、运行android app工程,并且能够支持jni\n可以进行如下操作</p>\n<p>首先创建个基于ant的android app工程,目录结构如下:</p>\n"
+  },
+  {
+    "title": "高级特性之自定义task任务",
+    "url": "/zh/posts/custom-task",
+    "date": {
+      "time": 1465473600000,
+      "string": "June 9, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "task",
+      "自定义脚本",
+      "插件"
+    ],
+    "excerpt": "<p>task是xmake 2.0开始新增的特性,也是插件开发的核心,在 <a href=\"/cn/2016/06/09/plugin-hello/\">插件开发之hello xmake</a> 中我们简单介绍了下task的定义和使用</p>\n<p>当然task不仅可以用来写插件,而且还可以写一些简单的自定义任务。。</p>\n<p>我们先看下一个简单task实现:</p>\n"
+  },
+  {
+    "title": "插件开发之参数配置",
+    "url": "/zh/posts/plugin-arguments",
+    "date": {
+      "time": 1465473600000,
+      "string": "June 9, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "插件",
+      "菜单选项"
+    ],
+    "excerpt": "<p>title: 插件开发之参数配置\ntags: [xmake, 插件, 菜单选项]\ndate: 2016-06-09\nauthor: Ruki</p>\n<hr>\n<p>我们继续以之前讲解的hello插件为基础,现在为其增加参数配置选项,并且指定一个独立的脚本文件中进行开发,这样我们就可以写一些更复杂的插件</p>\n<pre><code class=\"language-lua\">    -- 定义一个名叫hello的插件任务\n    task(&quot;hello&quot;)</code></pre>\n"
+  },
+  {
+    "title": "插件开发之hello xmake",
+    "url": "/zh/posts/plugin-hello",
+    "date": {
+      "time": 1465473600000,
+      "string": "June 9, 2016"
+    },
+    "author": "Ruki",
+    "tags": [
+      "xmake",
+      "插件",
+      "hello",
+      "makefile",
+      "doxygen",
+      "宏脚本"
     ],
-    "excerpt": "<p>Xmake 提供了一个强大的包管理系统,简化了 C/C++ 项目中的依赖处理。</p>\n<p>向您的项目添加包很简单:</p>\n<pre><code class=\"language-lua\">target(&quot;myapp&quot;)\n    set_kind(&quot;binary&quot;)\n    add_files(&quot;src/*.cpp&quot;)\n    add_packages(&quot;fmt&quot;, &quot;spdlog&quot;, &quot;nlohmann_json&quot;)\n</code></pre>\n"
+    "excerpt": "<p>xmake从v2.0开始,全面支持插件模式,我们可以很方便的扩展实现自己的插件,并且xmake也提供了一些内建的使用插件</p>\n<p>我们可以执行下 <code>xmake -h</code> 看下当前支持的插件:</p>\n<pre><code>    Plugins: \n        l, lua                                 Run the lua script.\n        m, macro                               Run the given macro.\n           doxygen                             Generate the doxygen document.\n           hello                               Hello xmake!...</code></pre>\n"
   },
   {
-    "title": "IDE 集成指南",
-    "url": "/zh/posts/post-10",
+    "title": "插件使用之批量打包",
+    "url": "/zh/posts/plugin-macro-package",
     "date": {
-      "time": 1704110400000,
-      "string": "January 1, 2024"
+      "time": 1465473600000,
+      "string": "June 9, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "ide",
-      "集成"
+      "xmake",
+      "插件",
+      "宏脚本",
+      "打包"
     ],
-    "excerpt": "<p>Xmake 为流行的 IDE 和编辑器提供了出色的集成,使开发更加高效。</p>\n<p>为 VS Code 安装 Xmake 扩展:</p>\n<ol>\n<li>打开 VS Code</li>\n<li>转到扩展 (Ctrl+Shift+X)</li>\n<li>搜索 &quot;Xmake&quot;</li>\n<li>安装扩展</li>\n</ol>\n"
+    "excerpt": "<p>xmake提供了一些比较实用的内置宏脚本,比如 批量打包宏脚本 <code>xmake macro package</code></p>\n<p>这个宏脚本可以批量打包指定平台的所有架构,例如:</p>\n<pre><code class=\"language-bash\">    # 批量打包当前平台的所有架构\n    xmake macro package</code></pre>\n"
   },
   {
-    "title": "IDE 集成指南",
-    "url": "/zh/posts/post-11",
+    "title": "插件使用之宏脚本记录",
+    "url": "/zh/posts/plugin-macro",
     "date": {
-      "time": 1704110400000,
-      "string": "January 1, 2024"
+      "time": 1465473600000,
+      "string": "June 9, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "ide",
-      "集成"
+      "xmake",
+      "插件",
+      "宏脚本"
     ],
-    "excerpt": "<p>Xmake 为流行的 IDE 和编辑器提供了出色的集成,使开发更加高效。</p>\n<p>为 VS Code 安装 Xmake 扩展:</p>\n<ol>\n<li>打开 VS Code</li>\n<li>转到扩展 (Ctrl+Shift+X)</li>\n<li>搜索 &quot;Xmake&quot;</li>\n<li>安装扩展</li>\n</ol>\n"
+    "excerpt": "<p>xmake 提供了一些内置的比较实用的插件,其中宏脚本插件是最具有代表性和实用性的,也是xmake比较推荐的一款插件,那它有哪些使用功能呢?</p>\n<p>我们先来看下:<code>xmake macro --help</code></p>\n<pre><code>    Usage: xmake macro|m [options] [name] [arguments]</code></pre>\n"
   },
   {
-    "title": "IDE 集成指南",
-    "url": "/zh/posts/post-5",
+    "title": "xmake v2.0.1 更新!",
+    "url": "/zh/posts/update-v2.0.1",
     "date": {
-      "time": 1704110400000,
-      "string": "January 1, 2024"
+      "time": 1465473600000,
+      "string": "June 9, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "ide",
-      "集成"
+      "xmake",
+      "版本更新",
+      "doxygen",
+      "插件"
     ],
-    "excerpt": "<p>Xmake 为流行的 IDE 和编辑器提供了出色的集成,使开发更加高效。</p>\n<p>为 VS Code 安装 Xmake 扩展:</p>\n<ol>\n<li>打开 VS Code</li>\n<li>转到扩展 (Ctrl+Shift+X)</li>\n<li>搜索 &quot;Xmake&quot;</li>\n<li>安装扩展</li>\n</ol>\n"
+    "excerpt": "<p>title: xmake v2.0.1 更新!\ntags: [xmake, 版本更新, doxygen, 插件]\ndate: 2016-06-09\nauthor: Ruki</p>\n<hr>\n<p><a href=\"https://github.com/waruqi/xmake\">源码</a></p>\n<p>此版本重构了90%的代码</p>\n"
   },
   {
-    "title": "IDE 集成指南",
-    "url": "/zh/posts/post-6",
+    "title": "xmake高级特性之合并静态库",
+    "url": "/zh/posts/merge-static-library",
     "date": {
-      "time": 1704110400000,
-      "string": "January 1, 2024"
+      "time": 1454587200000,
+      "string": "February 4, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "ide",
-      "集成"
+      "xmake",
+      "静态库"
     ],
-    "excerpt": "<p>Xmake 为流行的 IDE 和编辑器提供了出色的集成,使开发更加高效。</p>\n<p>为 VS Code 安装 Xmake 扩展:</p>\n<ol>\n<li>打开 VS Code</li>\n<li>转到扩展 (Ctrl+Shift+X)</li>\n<li>搜索 &quot;Xmake&quot;</li>\n<li>安装扩展</li>\n</ol>\n"
+    "excerpt": "<p>title: xmake高级特性之合并静态库\ntags: [xmake, 静态库]\ndate: 2016-02-04\nauthor: Ruki</p>\n<hr>\n<p>xmake的add_files接口不仅可以添加源代码文件进行编译,还可以直接添加*.o/obj对象文件、以及*.a/lib的库文件到编译目标中,这个跟add_links是有区别的</p>\n<ul>\n<li>add_links:只能添加链接,例如: -lxxxx 这种,链接的目标也只能是可执行程序、动态库,而且只会链接需要的代码进去</li>\n<li>add_files:是直接将静态库中的所有对象文件,解包、重新打包到新的target中,这个target可以是新的静态库,也可以是可执行程序、或者动态库</li>\n</ul>\n"
   },
   {
-    "title": "IDE 集成指南",
-    "url": "/zh/posts/post-7",
+    "title": "xmake中add_files的使用",
+    "url": "/zh/posts/project-add-files",
     "date": {
-      "time": 1704110400000,
-      "string": "January 1, 2024"
+      "time": 1454587200000,
+      "string": "February 4, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "ide",
-      "集成"
+      "xmake",
+      "模式匹配"
     ],
-    "excerpt": "<p>Xmake 为流行的 IDE 和编辑器提供了出色的集成,使开发更加高效。</p>\n<p>为 VS Code 安装 Xmake 扩展:</p>\n<ol>\n<li>打开 VS Code</li>\n<li>转到扩展 (Ctrl+Shift+X)</li>\n<li>搜索 &quot;Xmake&quot;</li>\n<li>安装扩展</li>\n</ol>\n"
+    "excerpt": "<p>如果你看了<a href=\"/cn/2016/02/03/project-description/\">工程描述入门</a>,那么是否觉得通过 add_files 添加源文件相当的方便?</p>\n<p>目前它可以支持<code>.c/.cpp/.s/.S/.m/.mm/.o/.obj/.a/.lib</code>这些后缀的源代码和库文件,其中通配符*表示匹配当前目录下文件,而**则匹配多级目录下的文件。</p>\n<p>例如:</p>\n"
   },
   {
-    "title": "IDE 集成指南",
-    "url": "/zh/posts/post-8",
+    "title": "使用xmake编译工程",
+    "url": "/zh/posts/project-compile",
     "date": {
-      "time": 1704110400000,
-      "string": "January 1, 2024"
+      "time": 1454587200000,
+      "string": "February 4, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "ide",
-      "集成"
+      "xmake",
+      "编译",
+      "跨平台"
     ],
-    "excerpt": "<p>Xmake 为流行的 IDE 和编辑器提供了出色的集成,使开发更加高效。</p>\n<p>为 VS Code 安装 Xmake 扩展:</p>\n<ol>\n<li>打开 VS Code</li>\n<li>转到扩展 (Ctrl+Shift+X)</li>\n<li>搜索 &quot;Xmake&quot;</li>\n<li>安装扩展</li>\n</ol>\n"
+    "excerpt": "<p>title: 使用xmake编译工程\ntags: [xmake, 编译, 跨平台]\ndate: 2016-02-04\nauthor: Ruki</p>\n<hr>\n<p>如果你只想编译当前主机环境的平台,例如在windows上编译windows版本,在macosx上编译macosx版本,那么你只需要敲以下命令即可:</p>\n<pre><code class=\"language-bash\">    xmake\n</code></pre>\n"
   },
   {
-    "title": "IDE 集成指南",
-    "url": "/zh/posts/post-9",
+    "title": "xmake工程描述入门",
+    "url": "/zh/posts/project-description",
     "date": {
-      "time": 1704110400000,
-      "string": "January 1, 2024"
+      "time": 1454500800000,
+      "string": "February 3, 2016"
     },
-    "author": "waruqi",
+    "author": "Ruki",
     "tags": [
-      "ide",
-      "集成"
+      "xmake",
+      "premake"
     ],
-    "excerpt": "<p>Xmake 为流行的 IDE 和编辑器提供了出色的集成,使开发更加高效。</p>\n<p>为 VS Code 安装 Xmake 扩展:</p>\n<ol>\n<li>打开 VS Code</li>\n<li>转到扩展 (Ctrl+Shift+X)</li>\n<li>搜索 &quot;Xmake&quot;</li>\n<li>安装扩展</li>\n</ol>\n"
+    "excerpt": "<p>title: xmake工程描述入门\ntags: [xmake, premake]\ndate: 2016-02-03\nauthor: Ruki</p>\n<hr>\n<p>xmake的工程描述文件,摈弃了makefile的繁琐复杂,借鉴了premake的简洁明了,原生支持lua脚本,使得更加的灵活、方便扩展。</p>\n<p>工程默认描述文件名为xmake.lua,支持多级目录嵌套,也可以通过以下命令,指定其他文件作为工程描述文件:</p>\n"
   }
 ]

+ 0 - 145
docs/BLOG_README.md

@@ -1,145 +0,0 @@
-# Xmake Blog System
-
-This document describes how to use the blog system for the Xmake documentation site.
-
-## Overview
-
-The blog system is built using VitePress and automatically generates blog pages from markdown files in the `docs/posts/` and `docs/zh/posts/` directories.
-
-## Features
-
-- **Automatic Post Discovery**: Blog posts are automatically discovered from markdown files
-- **Pagination**: Blog pages support pagination with 10 posts per page
-- **Multi-language Support**: Separate blogs for English and Chinese
-- **Author Information**: Display author names and optional Twitter links
-- **Tags Support**: Posts can be tagged for categorization
-- **Excerpt Generation**: Automatic excerpt generation from post content
-- **Responsive Design**: Mobile-friendly layout
-
-## Directory Structure
-
-```
-docs/
-├── posts/           # English blog posts
-├── zh/posts/        # Chinese blog posts
-├── blog/            # English blog index
-│   └── index.md
-├── zh/blog/         # Chinese blog index
-│   └── index.md
-└── .vitepress/
-    └── theme/
-        ├── posts.data.ts      # English posts data loader
-        ├── zh-posts.data.ts   # Chinese posts data loader
-        ├── BlogHome.vue       # English blog home component
-        ├── ZhBlogHome.vue     # Chinese blog home component
-        ├── Date.vue           # Date display component
-        └── Author.vue         # Author display component
-```
-
-## Creating Blog Posts
-
-### English Posts
-
-Create markdown files in `docs/posts/` with the following frontmatter:
-
-```markdown
----
-title: Your Post Title
-date: 2024-01-15
-author: Author Name
-tags: [tag1, tag2, tag3]
----
-
-Your post content here...
-```
-
-### Chinese Posts
-
-Create markdown files in `docs/zh/posts/` with the same frontmatter structure:
-
-```markdown
----
-title: 您的文章标题
-date: 2024-01-15
-author: 作者姓名
-tags: [标签1, 标签2, 标签3]
----
-
-您的文章内容...
-```
-
-## Frontmatter Fields
-
-- `title` (required): The title of the blog post
-- `date` (required): Publication date in YYYY-MM-DD format
-- `author` (optional): Author name
-- `tags` (optional): Array of tags for categorization
-
-## Blog URLs
-
-- English blog: `/blog/`
-- Chinese blog: `/zh/blog/`
-
-## Navigation
-
-Blog links are automatically added to the navigation menu:
-- English: "Blog" in the main navigation
-- Chinese: "博客" in the main navigation
-
-## Styling
-
-The blog uses Tailwind CSS classes for styling and supports both light and dark themes. The design is responsive and mobile-friendly.
-
-## Customization
-
-### Changing Posts Per Page
-
-Edit the `postsPerPage` variable in the blog home components:
-- English: `docs/.vitepress/theme/BlogHome.vue`
-- Chinese: `docs/.vitepress/theme/ZhBlogHome.vue`
-
-### Modifying the Layout
-
-The blog layout can be customized by editing the Vue components in `docs/.vitepress/theme/`.
-
-### Adding New Features
-
-To add new features like search, categories, or RSS feeds, you can extend the existing components or create new ones.
-
-## Development
-
-To run the development server:
-
-```bash
-npm run docs:dev
-```
-
-To build for production:
-
-```bash
-npm run docs:build
-```
-
-## Example Posts
-
-The system includes several example posts to demonstrate the functionality:
-
-### English Posts
-- `docs/posts/xmake-3-0-release.md`
-- `docs/posts/building-cross-platform-apps.md`
-- `docs/posts/post-3.md` through `docs/posts/post-5.md`
-
-### Chinese Posts
-- `docs/zh/posts/xmake-3-0-release.md`
-- `docs/zh/posts/cross-platform-development.md`
-- `docs/zh/posts/post-3.md` through `docs/zh/posts/post-5.md`
-
-## Generating Sample Posts
-
-You can generate additional sample posts using the provided script:
-
-```bash
-node scripts/generate-blog-posts.js
-```
-
-This will create additional posts to test pagination and other features. 

+ 77 - 0
docs/posts/a-simple-demo.md

@@ -0,0 +1,77 @@
+---
+title: A simple xmake.lua
+tags: [xmake, example, xmake.lua]
+date: 2016-06-26
+author: Ruki
+---
+
+A simplest xmake.lua
+
+```lua
+    -- define a target with named 'demo'
+    target("demo")
+
+        -- set the target kind, .e.g 'binary' is a console program
+        -- - static: a static library
+        -- - shared: a shared library
+        set_kind("binary")
+
+        -- add all c source files in the directory: src
+        add_files("src/*.c") 
+```
+
+And we run the following command for building it.
+
+```bash
+    xmake
+```
+
+
+Next, we write another xmake.lua for switching 'debug' or 'release' mode.
+
+```lua
+    -- is debug now?
+    if is_mode("debug") then
+        
+        -- enable debug symbols for debugger
+        set_symbols("debug")
+
+        -- disable optimization
+        set_optimize("none")
+    end
+
+    -- is release now?
+    if is_mode("release") then
+
+        -- set visibility as hidden
+        set_symbols("hidden")
+
+        -- enable optimization for fastest mode
+        set_optimize("fastest")
+
+        -- strip all symbols
+        set_strip("all")
+    end
+
+    -- define a target
+    target("test")
+
+        -- set the program kind as a static library
+        set_kind("static")
+
+        -- add all c++ files recursively
+        add_files("src/**.cpp") 
+```
+
+We configure this project with the debug mode now.
+
+```bash
+    xmake f -m debug
+    #xmake config --mode=debug
+```
+
+And we build it.
+
+```bash
+    xmake
+```

+ 230 - 0
docs/posts/batch-check-functions.md

@@ -0,0 +1,230 @@
+---
+title: Batch checking library functions
+tags: [xmake, check, batch, function]
+date: 2016-07-16
+author: Ruki
+---
+
+xmake provides some api, which can detect whether exist some library functions.
+
+```lua
+
+target("test")
+
+    -- checks some libc functions from the header files: wchar.h and stdlib.h
+    add_cfuncs("libc", nil,         {"wchar.h", "stdlib.h"},            "wcscat",
+                                                                        "wcsncat",
+                                                                        "wcscpy",
+                                                                        "wcsncpy",
+                                                                        "wcslcpy",
+                                                                        "wcslen",
+                                                                        "wcsnlen",
+                                                                        "wcsstr",
+                                                                        "wcscasestr",
+                                                                        "wcscmp",
+                                                                        "wcscasecmp",
+                                                                        "wcsncmp",
+                                                                        "wcsncasecmp",
+                                                                        "wcstombs",
+                                                                        "mbstowcs")
+
+    -- checks the interfaces: pthread_mutex_init, pthread_create in the pthread
+    -- the first argument is the library alias name
+    add_cfuncs("posix", nil,        "pthread.h",                        "pthread_mutex_init", "pthread_create")
+
+    -- checks the pthread interfaces and attempt to links it using flags: -lpthread
+    add_cfuncs("posix", "pthread",  "pthread.h",                        "pthread_mutex_init", "pthread_create")
+
+```
+
+
+
+We can run `xmake f -v` to get the verbose info:
+
+```
+checking for the c include string.h ... ok
+checking for the c include stdlib.h ... ok
+checking for the c function strlen ... ok
+checking for the c function sincosf ... no
+checking for the c include wchar.h ... ok
+checking for the c function wcscmp ... ok
+checking for the c function wcsncat ... ok
+checking for the c include dlfcn.h ... ok
+checking for the c function dlopen ... ok
+checking for the links polarssl ... ok
+checking for the c include polarssl/polarssl.h ... ok
+checking for the c function strcat ... ok
+checking for the c function wcsstr ... ok
+checking for the c function wcscat ... ok
+checking for the c function sincos ... no
+checking for the c function memcpy ... ok
+checking for the c function sqrtf ... ok
+checking for the c function wcsnlen ... ok
+checking for the c function acosf ... ok
+checking for the links pthread, dl, m, c ... ok
+checking for the c include sys/stat.h ... ok
+checking for the c function open ... ok
+checking for the c function strnlen ... ok
+checking for the c function system ... ok
+checking for the links z ... ok
+checking for the c include zlib/zlib.h ... ok
+checking for the c function strncat ... ok
+checking for the c function wcsncpy ... ok
+checking for the c function gmtime ... ok
+checking for the c include signal.h ... ok
+checking for the c include setjmp.h ... ok
+checking for the c function sigsetjmp ... ok
+checking for the c function sinf ... ok
+checking for the c function strncmp ... ok
+checking for the c function memmove ... ok
+checking for the c function strncasecmp ... ok
+checking for the c function strlcpy ... ok
+checking for the links sqlite3 ... ok
+checking for the c include sqlite3/sqlite3.h ... ok
+checking for the c include sys/sem.h ... ok
+checking for the c include sys/ipc.h ... ok
+checking for the c function semtimedop ... no
+checking for the c function wcscpy ... ok
+checking for the c function sqrt ... ok
+checking for the c function strcmp ... ok
+checking for the c function strcasecmp ... ok
+checking for the c function semget ... ok
+checking for the c include unistd.h ... ok
+checking for the c function sysconf ... ok
+checking for the c function memset ... ok
+checking for the c function getpagesize ... ok
+checking for the c include semaphore.h ... ok
+checking for the c function sem_init ... ok
+checking for the c function strncpy ... ok
+checking for the c function localtime ... ok
+checking for the c include ifaddrs.h ... ok
+checking for the c function getifaddrs ... ok
+checking for the c function strcpy ... ok
+checking for the c function gethostname ... ok
+checking for the c function wcslcpy ... ok
+checking for the c include dirent.h ... ok
+checking for the c function opendir ... ok
+checking for the c function wcslen ... ok
+checking for the c function cos ... ok
+checking for the c include sys/time.h ... ok
+checking for the c function gettimeofday ... ok
+checking for the c function signal ... ok
+checking for the c function strstr ... ok
+checking for the c function exp ... ok
+checking for the c function log2f ... ok
+checking for the c function sin ... ok
+checking for the c function log2 ... ok
+checking for the c function cosf ... ok
+checking for the c include pthread.h ... ok
+checking for the c function pthread_mutex_init ... ok
+checking for the c function fmodf ... ok
+checking for the c function wcstombs ... ok
+checking for the c function fmod ... ok
+checking for the c function memcmp ... ok
+checking for the c function atan2f ... ok
+checking for the c function atan2 ... ok
+checking for the c function atanf ... ok
+checking for the c function atan ... ok
+checking for the c function powf ... ok
+checking for the c function pow ... ok
+checking for the c function asinf ... ok
+checking for the c function asin ... ok
+checking for the c function pthread_create ... ok
+```
+
+xmake will generate the results into the config.h after checking if the config file has been enabled.
+
+```lua
+target("test")
+    -- set the auto-generated config.h
+    set_config_h("$(buildir)/tbox/tbox.config.h")
+    set_config_h_prefix("TB_CONFIG")
+```
+
+And the content of config.h is: 
+
+```c
+#define TB_CONFIG_LIBC_HAVE_MEMCPY
+#define TB_CONFIG_LIBC_HAVE_MEMSET
+#define TB_CONFIG_LIBC_HAVE_MEMMOVE
+#define TB_CONFIG_LIBC_HAVE_MEMCMP
+#define TB_CONFIG_LIBC_HAVE_MEMMEM
+#define TB_CONFIG_LIBC_HAVE_STRCAT
+#define TB_CONFIG_LIBC_HAVE_STRNCAT
+#define TB_CONFIG_LIBC_HAVE_STRCPY
+#define TB_CONFIG_LIBC_HAVE_STRNCPY
+#define TB_CONFIG_LIBC_HAVE_STRLCPY
+#define TB_CONFIG_LIBC_HAVE_STRLEN
+#define TB_CONFIG_LIBC_HAVE_STRNLEN
+#define TB_CONFIG_LIBC_HAVE_STRSTR
+#define TB_CONFIG_LIBC_HAVE_STRCASESTR
+#define TB_CONFIG_LIBC_HAVE_STRCMP
+#define TB_CONFIG_LIBC_HAVE_STRCASECMP
+#define TB_CONFIG_LIBC_HAVE_STRNCMP
+#define TB_CONFIG_LIBC_HAVE_STRNCASECMP
+#define TB_CONFIG_LIBC_HAVE_WCSCAT
+#define TB_CONFIG_LIBC_HAVE_WCSNCAT
+#define TB_CONFIG_LIBC_HAVE_WCSCPY
+#define TB_CONFIG_LIBC_HAVE_WCSNCPY
+#define TB_CONFIG_LIBC_HAVE_WCSLCPY
+#define TB_CONFIG_LIBC_HAVE_WCSLEN
+#define TB_CONFIG_LIBC_HAVE_WCSNLEN
+#define TB_CONFIG_LIBC_HAVE_WCSSTR
+#define TB_CONFIG_LIBC_HAVE_WCSCMP
+#define TB_CONFIG_LIBC_HAVE_WCSCASECMP
+#define TB_CONFIG_LIBC_HAVE_WCSNCMP
+#define TB_CONFIG_LIBC_HAVE_WCSNCASECMP
+#define TB_CONFIG_LIBC_HAVE_WCSTOMBS
+#define TB_CONFIG_LIBC_HAVE_MBSTOWCS
+#define TB_CONFIG_LIBC_HAVE_GMTIME
+#define TB_CONFIG_LIBC_HAVE_MKTIME
+#define TB_CONFIG_LIBC_HAVE_LOCALTIME
+#define TB_CONFIG_LIBC_HAVE_GETTIMEOFDAY
+#define TB_CONFIG_LIBC_HAVE_SIGNAL
+#define TB_CONFIG_LIBC_HAVE_SETJMP
+#define TB_CONFIG_LIBC_HAVE_SIGSETJMP
+#define TB_CONFIG_LIBC_HAVE_BACKTRACE
+#define TB_CONFIG_LIBC_HAVE_SYSTEM
+#define TB_CONFIG_LIBM_HAVE_LOG2
+#define TB_CONFIG_LIBM_HAVE_LOG2F
+#define TB_CONFIG_LIBM_HAVE_SQRT
+#define TB_CONFIG_LIBM_HAVE_SQRTF
+#define TB_CONFIG_LIBM_HAVE_ACOS
+#define TB_CONFIG_LIBM_HAVE_ACOSF
+#define TB_CONFIG_LIBM_HAVE_ASIN
+#define TB_CONFIG_LIBM_HAVE_ASINF
+#define TB_CONFIG_LIBM_HAVE_POW
+#define TB_CONFIG_LIBM_HAVE_POWF
+#define TB_CONFIG_LIBM_HAVE_FMOD
+#define TB_CONFIG_LIBM_HAVE_FMODF
+#define TB_CONFIG_LIBM_HAVE_ATAN
+#define TB_CONFIG_LIBM_HAVE_ATANF
+#define TB_CONFIG_LIBM_HAVE_ATAN2
+#define TB_CONFIG_LIBM_HAVE_ATAN2F
+#define TB_CONFIG_LIBM_HAVE_COS
+#define TB_CONFIG_LIBM_HAVE_COSF
+#define TB_CONFIG_LIBM_HAVE_SIN
+#define TB_CONFIG_LIBM_HAVE_SINF
+#define TB_CONFIG_LIBM_HAVE_EXP
+#define TB_CONFIG_LIBM_HAVE_EXPF
+#define TB_CONFIG_POSIX_HAVE_POLL
+#define TB_CONFIG_POSIX_HAVE_PTHREAD_MUTEX_INIT
+#define TB_CONFIG_POSIX_HAVE_PTHREAD_CREATE
+#define TB_CONFIG_POSIX_HAVE_SOCKET
+#define TB_CONFIG_POSIX_HAVE_OPENDIR
+#define TB_CONFIG_POSIX_HAVE_DLOPEN
+#define TB_CONFIG_POSIX_HAVE_OPEN
+#define TB_CONFIG_POSIX_HAVE_GETHOSTNAME
+#define TB_CONFIG_POSIX_HAVE_GETIFADDRS
+#define TB_CONFIG_POSIX_HAVE_SEM_INIT
+#define TB_CONFIG_POSIX_HAVE_GETPAGESIZE
+#define TB_CONFIG_POSIX_HAVE_SYSCONF
+#define TB_CONFIG_POSIX_HAVE_SCHED_YIELD
+#define TB_CONFIG_SYSTEMV_HAVE_SEMGET
+```
+
+Please use the following api if we want to check the c++ function in the static library.
+
+```lua
+add_cxxfuncs(...)
+```

+ 528 - 0
docs/posts/build-without-makefile.md

@@ -0,0 +1,528 @@
+---
+title: Scan source codes and build project without makefile
+tags: [xmake, lua, makefile, scanner]
+date: 2017-01-07
+author: Ruki
+---
+
+We recently added a new feature for xmake:
+
+```
+you need not write any make-like file (xmake.lua, makefile.am, cmakelist.txt, etc.) and also build it directly.
+```
+
+It will scan all source files and generate xmake.lua automatically for building project.
+
+And xmake will detect 'main' function in source file in order to distinguish between static libraries and executable programs.
+
+(Currently, only projects with single-level directory are supported)
+
+#### Compile open source libraries
+
+Although this approach has some limitations, but it is sufficient to complie and run some temporary codes for testing. 
+
+For example, we downloaded a zlib-1.2.10 source and want to compile it.
+
+We only need to enter the zlib source directory and run the following command:
+
+```bash
+$ cd zlib-1.2.10
+$ xmake
+```
+
+It's done, the output results: 
+
+
+
+
+
+
+```
+xmake.lua not found, scanning files ..
+target(zlib-1.2): static
+    [+]: ./adler32.c
+    [+]: ./compress.c
+    [+]: ./crc32.c
+    [+]: ./deflate.c
+    [+]: ./gzclose.c
+    [+]: ./gzlib.c
+    [+]: ./gzread.c
+    [+]: ./gzwrite.c
+    [+]: ./infback.c
+    [+]: ./inffast.c
+    [+]: ./inflate.c
+    [+]: ./inftrees.c
+    [+]: ./trees.c
+    [+]: ./uncompr.c
+    [+]: ./zutil.c
+xmake.lua generated, scan ok!👌
+checking for the architecture ... x86_64
+checking for the Xcode SDK version for macosx ... 10.12
+checking for the target minimal version ... 10.12
+checking for the c compiler (cc) ... xcrun -sdk macosx clang
+checking for the c++ compiler (cxx) ... xcrun -sdk macosx clang
+checking for the objc compiler (mm) ... xcrun -sdk macosx clang
+checking for the objc++ compiler (mxx) ... xcrun -sdk macosx clang++
+checking for the swift compiler (sc) ... xcrun -sdk macosx swiftc
+checking for the assember (as) ... xcrun -sdk macosx clang
+checking for the linker (ld) ... xcrun -sdk macosx clang++
+checking for the static library archiver (ar) ... xcrun -sdk macosx ar
+checking for the static library extractor (ex) ... xcrun -sdk macosx ar
+checking for the shared library linker (sh) ... xcrun -sdk macosx clang++
+checking for the debugger (dd) ... xcrun -sdk macosx lldb
+checking for the golang compiler (go) ... go
+configure
+{
+    ex = "xcrun -sdk macosx ar"
+,   sh = "xcrun -sdk macosx clang++"
+,   host = "macosx"
+,   ar = "xcrun -sdk macosx ar"
+,   buildir = "build"
+,   as = "xcrun -sdk macosx clang"
+,   plat = "macosx"
+,   xcode_dir = "/Applications/Xcode.app"
+,   arch = "x86_64"
+,   mxx = "xcrun -sdk macosx clang++"
+,   go = "go"
+,   target_minver = "10.12"
+,   ccache = "ccache"
+,   mode = "release"
+,   clean = true
+,   cxx = "xcrun -sdk macosx clang"
+,   cc = "xcrun -sdk macosx clang"
+,   dd = "xcrun -sdk macosx lldb"
+,   kind = "static"
+,   ld = "xcrun -sdk macosx clang++"
+,   xcode_sdkver = "10.12"
+,   sc = "xcrun -sdk macosx swiftc"
+,   mm = "xcrun -sdk macosx clang"
+}
+configure ok!
+clean ok!
+[00%]: ccache compiling.release ./adler32.c
+[06%]: ccache compiling.release ./compress.c
+[13%]: ccache compiling.release ./crc32.c
+[20%]: ccache compiling.release ./deflate.c
+[26%]: ccache compiling.release ./gzclose.c
+[33%]: ccache compiling.release ./gzlib.c
+[40%]: ccache compiling.release ./gzread.c
+[46%]: ccache compiling.release ./gzwrite.c
+[53%]: ccache compiling.release ./infback.c
+[60%]: ccache compiling.release ./inffast.c
+[66%]: ccache compiling.release ./inflate.c
+[73%]: ccache compiling.release ./inftrees.c
+[80%]: ccache compiling.release ./trees.c
+[86%]: ccache compiling.release ./uncompr.c
+[93%]: ccache compiling.release ./zutil.c
+[100%]: archiving.release libzlib-1.2.a
+build ok!👌
+```
+
+Xmake will scan the current directory to detect all source codes and it do not found main function.
+
+So it should be static library project and we build it as a static library: libzlib-1.2.a
+
+We did not write any make-like files (xmake.lua, ..) and did not use the makefile of zlib project.
+
+It is compiled directly and a xmake.lua file was generated which we can edit this xmake.lua to build more complicated project. 
+
+The content of the generated xmake.lua:
+
+```lua
+-- define target
+target("zlib-1.2")
+
+    -- set kind
+    set_kind("static")
+
+    -- add files
+    add_files("./adler32.c")
+    add_files("./compress.c")
+    add_files("./crc32.c")
+    add_files("./deflate.c")
+    add_files("./gzclose.c")
+    add_files("./gzlib.c")
+    add_files("./gzread.c")
+    add_files("./gzwrite.c")
+    add_files("./infback.c")
+    add_files("./inffast.c")
+    add_files("./inflate.c")
+    add_files("./inftrees.c")
+    add_files("./trees.c")
+    add_files("./uncompr.c")
+    add_files("./zutil.c")
+```
+
+#### Fastly compile and run testing code
+
+For example, I want to write a simple program in the main.c only to echo 'hello world!'.
+
+If we use gcc to compile and run it, need run two commands: 
+
+```bash
+gcc ./main.c -o demo
+./demo
+```
+
+If we use xmake to run it, only need run:
+
+```bash
+xmake run
+```
+
+Or
+
+```bash
+xmake r
+```
+
+It's done, the output results is:
+
+```
+hello world!
+```
+
+If we have a lot of code files, need also run only one command:
+
+
+```bash
+xmake run
+```
+
+It's so easy and convenient.
+
+#### Multi-language support
+
+This feature of code detection and real-time compilation not only supports c / c ++, also supports objc / swift 
+and it will support golang in future.
+
+For example, we downloaded a ios open source framework code 'fmdb':
+
+
+```
+.
+├── FMDB.h
+├── FMDatabase.h
+├── FMDatabase.m
+├── FMDatabaseAdditions.h
+├── FMDatabaseAdditions.m
+├── FMDatabasePool.h
+├── FMDatabasePool.m
+├── FMDatabaseQueue.h
+├── FMDatabaseQueue.m
+├── FMResultSet.h
+└── FMResultSet.m
+```
+
+There are no any make-like files in it's project directory.
+
+We uses xmake to build it directly as a ios static library:
+
+
+```bash
+$ xmake f -p iphoneos; xmake
+```
+
+The output results are:
+
+```
+xmake.lua not found, scanning files ..
+target(FMDB): static
+    [+]: ./FMDatabase.m
+    [+]: ./FMDatabaseAdditions.m
+    [+]: ./FMDatabasePool.m
+    [+]: ./FMDatabaseQueue.m
+    [+]: ./FMResultSet.m
+xmake.lua generated, scan ok!👌
+checking for the architecture ... armv7
+checking for the Xcode SDK version for iphoneos ... 10.1
+checking for the target minimal version ... 10.1
+checking for the c compiler (cc) ... xcrun -sdk iphoneos clang
+checking for the c++ compiler (cxx) ... xcrun -sdk iphoneos clang
+checking for the objc compiler (mm) ... xcrun -sdk iphoneos clang
+checking for the objc++ compiler (mxx) ... xcrun -sdk iphoneos clang++
+checking for the assember (as) ... gas-preprocessor.pl xcrun -sdk iphoneos clang
+checking for the linker (ld) ... xcrun -sdk iphoneos clang++
+checking for the static library archiver (ar) ... xcrun -sdk iphoneos ar
+checking for the static library extractor (ex) ... xcrun -sdk iphoneos ar
+checking for the shared library linker (sh) ... xcrun -sdk iphoneos clang++
+checking for the swift compiler (sc) ... xcrun -sdk iphoneos swiftc
+configure
+{
+    ex = "xcrun -sdk iphoneos ar"
+,   ccache = "ccache"
+,   host = "macosx"
+,   ar = "xcrun -sdk iphoneos ar"
+,   buildir = "build"
+,   as = "/usr/local/share/xmake/tools/utils/gas-preprocessor.pl xcrun -sdk iphoneos clang"
+,   arch = "armv7"
+,   mxx = "xcrun -sdk iphoneos clang++"
+,   cxx = "xcrun -sdk iphoneos clang"
+,   target_minver = "10.1"
+,   xcode_dir = "/Applications/Xcode.app"
+,   clean = true
+,   sh = "xcrun -sdk iphoneos clang++"
+,   cc = "xcrun -sdk iphoneos clang"
+,   ld = "xcrun -sdk iphoneos clang++"
+,   mode = "release"
+,   kind = "static"
+,   plat = "iphoneos"
+,   xcode_sdkver = "10.1"
+,   sc = "xcrun -sdk iphoneos swiftc"
+,   mm = "xcrun -sdk iphoneos clang"
+}
+configure ok!
+clean ok!
+[00%]: ccache compiling.release ./FMDatabase.m
+[20%]: ccache compiling.release ./FMDatabaseAdditions.m
+[40%]: ccache compiling.release ./FMDatabasePool.m
+[60%]: ccache compiling.release ./FMDatabaseQueue.m
+[80%]: ccache compiling.release ./FMResultSet.m
+[100%]: archiving.release libFMDB.a
+build ok!👌
+```
+
+#### Compile multiple executables at the same time
+
+
+```bash
+$ cd jpeg-6b
+$ xmake
+```
+
+The output results are:
+
+```
+xmake.lua not found, scanning files ..
+target(jpeg-6b): static
+    [+]: ./cdjpeg.c
+    [+]: ./example.c
+    [+]: ./jcapimin.c
+    [+]: ./jcapistd.c
+    [+]: ./jccoefct.c
+    [+]: ./jccolor.c
+    [+]: ./jcdctmgr.c
+    [+]: ./jchuff.c
+    [+]: ./jcinit.c
+    [+]: ./jcmainct.c
+    [+]: ./jcmarker.c
+    [+]: ./jcmaster.c
+    [+]: ./jcomapi.c
+    [+]: ./jcparam.c
+    [+]: ./jcphuff.c
+    [+]: ./jcprepct.c
+    [+]: ./jcsample.c
+    [+]: ./jctrans.c
+    [+]: ./jdapimin.c
+    [+]: ./jdapistd.c
+    [+]: ./jdatadst.c
+    [+]: ./jdatasrc.c
+    [+]: ./jdcoefct.c
+    [+]: ./jdcolor.c
+    [+]: ./jddctmgr.c
+    [+]: ./jdhuff.c
+    [+]: ./jdinput.c
+    [+]: ./jdmainct.c
+    [+]: ./jdmarker.c
+    [+]: ./jdmaster.c
+    [+]: ./jdmerge.c
+    [+]: ./jdphuff.c
+    [+]: ./jdpostct.c
+    [+]: ./jdsample.c
+    [+]: ./jdtrans.c
+    [+]: ./jerror.c
+    [+]: ./jfdctflt.c
+    [+]: ./jfdctfst.c
+    [+]: ./jfdctint.c
+    [+]: ./jidctflt.c
+    [+]: ./jidctfst.c
+    [+]: ./jidctint.c
+    [+]: ./jidctred.c
+    [+]: ./jmemansi.c
+    [+]: ./jmemmgr.c
+    [+]: ./jmemname.c
+    [+]: ./jmemnobs.c
+    [+]: ./jquant1.c
+    [+]: ./jquant2.c
+    [+]: ./jutils.c
+    [+]: ./rdbmp.c
+    [+]: ./rdcolmap.c
+    [+]: ./rdgif.c
+    [+]: ./rdppm.c
+    [+]: ./rdrle.c
+    [+]: ./rdswitch.c
+    [+]: ./rdtarga.c
+    [+]: ./transupp.c
+    [+]: ./wrbmp.c
+    [+]: ./wrgif.c
+    [+]: ./wrppm.c
+    [+]: ./wrrle.c
+    [+]: ./wrtarga.c
+target(ansi2knr): binary
+    [+]: ./ansi2knr.c
+target(cjpeg): binary
+    [+]: ./cjpeg.c
+target(ckconfig): binary
+    [+]: ./ckconfig.c
+target(djpeg): binary
+    [+]: ./djpeg.c
+target(jpegtran): binary
+    [+]: ./jpegtran.c
+target(rdjpgcom): binary
+    [+]: ./rdjpgcom.c
+target(wrjpgcom): binary
+    [+]: ./wrjpgcom.c
+xmake.lua generated, scan ok!👌
+checking for the architecture ... x86_64
+checking for the Xcode SDK version for macosx ... 10.12
+checking for the target minimal version ... 10.12
+checking for the c compiler (cc) ... xcrun -sdk macosx clang
+checking for the c++ compiler (cxx) ... xcrun -sdk macosx clang
+checking for the objc compiler (mm) ... xcrun -sdk macosx clang
+checking for the objc++ compiler (mxx) ... xcrun -sdk macosx clang++
+checking for the swift compiler (sc) ... xcrun -sdk macosx swiftc
+checking for the assember (as) ... xcrun -sdk macosx clang
+checking for the linker (ld) ... xcrun -sdk macosx clang++
+checking for the static library archiver (ar) ... xcrun -sdk macosx ar
+checking for the static library extractor (ex) ... xcrun -sdk macosx ar
+checking for the shared library linker (sh) ... xcrun -sdk macosx clang++
+checking for the debugger (dd) ... xcrun -sdk macosx lldb
+checking for the golang compiler (go) ... go
+configure
+{
+    ex = "xcrun -sdk macosx ar"
+,   sh = "xcrun -sdk macosx clang++"
+,   host = "macosx"
+,   ar = "xcrun -sdk macosx ar"
+,   buildir = "build"
+,   as = "xcrun -sdk macosx clang"
+,   plat = "macosx"
+,   xcode_dir = "/Applications/Xcode.app"
+,   arch = "x86_64"
+,   mxx = "xcrun -sdk macosx clang++"
+,   go = "go"
+,   target_minver = "10.12"
+,   ccache = "ccache"
+,   mode = "release"
+,   clean = true
+,   cxx = "xcrun -sdk macosx clang"
+,   cc = "xcrun -sdk macosx clang"
+,   dd = "xcrun -sdk macosx lldb"
+,   kind = "static"
+,   ld = "xcrun -sdk macosx clang++"
+,   xcode_sdkver = "10.12"
+,   sc = "xcrun -sdk macosx swiftc"
+,   mm = "xcrun -sdk macosx clang"
+}
+configure ok!
+clean ok!
+[00%]: ccache compiling.release ./cdjpeg.c
+[00%]: ccache compiling.release ./example.c
+[00%]: ccache compiling.release ./jcapimin.c
+[00%]: ccache compiling.release ./jcapistd.c
+[00%]: ccache compiling.release ./jccoefct.c
+[00%]: ccache compiling.release ./jccolor.c
+[01%]: ccache compiling.release ./jcdctmgr.c
+[01%]: ccache compiling.release ./jchuff.c
+[01%]: ccache compiling.release ./jcinit.c
+[01%]: ccache compiling.release ./jcmainct.c
+[01%]: ccache compiling.release ./jcmarker.c
+[02%]: ccache compiling.release ./jcmaster.c
+[02%]: ccache compiling.release ./jcomapi.c
+[02%]: ccache compiling.release ./jcparam.c
+[02%]: ccache compiling.release ./jcphuff.c
+[02%]: ccache compiling.release ./jcprepct.c
+[03%]: ccache compiling.release ./jcsample.c
+[03%]: ccache compiling.release ./jctrans.c
+[03%]: ccache compiling.release ./jdapimin.c
+[03%]: ccache compiling.release ./jdapistd.c
+[03%]: ccache compiling.release ./jdatadst.c
+[04%]: ccache compiling.release ./jdatasrc.c
+[04%]: ccache compiling.release ./jdcoefct.c
+[04%]: ccache compiling.release ./jdcolor.c
+[04%]: ccache compiling.release ./jddctmgr.c
+[04%]: ccache compiling.release ./jdhuff.c
+[05%]: ccache compiling.release ./jdinput.c
+[05%]: ccache compiling.release ./jdmainct.c
+[05%]: ccache compiling.release ./jdmarker.c
+[05%]: ccache compiling.release ./jdmaster.c
+[05%]: ccache compiling.release ./jdmerge.c
+[06%]: ccache compiling.release ./jdphuff.c
+[06%]: ccache compiling.release ./jdpostct.c
+[06%]: ccache compiling.release ./jdsample.c
+[06%]: ccache compiling.release ./jdtrans.c
+[06%]: ccache compiling.release ./jerror.c
+[07%]: ccache compiling.release ./jfdctflt.c
+[07%]: ccache compiling.release ./jfdctfst.c
+[07%]: ccache compiling.release ./jfdctint.c
+[07%]: ccache compiling.release ./jidctflt.c
+[07%]: ccache compiling.release ./jidctfst.c
+[08%]: ccache compiling.release ./jidctint.c
+[08%]: ccache compiling.release ./jidctred.c
+[08%]: ccache compiling.release ./jmemansi.c
+[08%]: ccache compiling.release ./jmemmgr.c
+[08%]: ccache compiling.release ./jmemname.c
+[09%]: ccache compiling.release ./jmemnobs.c
+[09%]: ccache compiling.release ./jquant1.c
+[09%]: ccache compiling.release ./jquant2.c
+[09%]: ccache compiling.release ./jutils.c
+[09%]: ccache compiling.release ./rdbmp.c
+[10%]: ccache compiling.release ./rdcolmap.c
+[10%]: ccache compiling.release ./rdgif.c
+[10%]: ccache compiling.release ./rdppm.c
+[10%]: ccache compiling.release ./rdrle.c
+[10%]: ccache compiling.release ./rdswitch.c
+[11%]: ccache compiling.release ./rdtarga.c
+[11%]: ccache compiling.release ./transupp.c
+[11%]: ccache compiling.release ./wrbmp.c
+[11%]: ccache compiling.release ./wrgif.c
+[11%]: ccache compiling.release ./wrppm.c
+[12%]: ccache compiling.release ./wrrle.c
+[12%]: ccache compiling.release ./wrtarga.c
+[12%]: archiving.release libjpeg-6b.a
+[12%]: ccache compiling.release ./wrjpgcom.c
+[25%]: linking.release wrjpgcom
+[25%]: ccache compiling.release ./ansi2knr.c
+[37%]: linking.release ansi2knr
+[37%]: ccache compiling.release ./jpegtran.c
+[50%]: linking.release jpegtran
+[50%]: ccache compiling.release ./djpeg.c
+[62%]: linking.release djpeg
+[62%]: ccache compiling.release ./ckconfig.c
+[75%]: linking.release ckconfig
+[75%]: ccache compiling.release ./rdjpgcom.c
+[87%]: linking.release rdjpgcom
+[87%]: ccache compiling.release ./cjpeg.c
+[100%]: linking.release cjpeg
+build ok!👌
+```
+
+In addition to a static library, we also compiled some other executable programs.
+
+```
+target(ansi2knr): binary
+    [+]: ./ansi2knr.c
+target(cjpeg): binary
+    [+]: ./cjpeg.c
+target(ckconfig): binary
+    [+]: ./ckconfig.c
+target(djpeg): binary
+    [+]: ./djpeg.c
+target(jpegtran): binary
+    [+]: ./jpegtran.c
+target(rdjpgcom): binary
+    [+]: ./rdjpgcom.c
+target(wrjpgcom): binary
+    [+]: ./wrjpgcom.c
+```
+
+#### Manual configuration
+
+we need add them before compiling if the source code requires some special compiler options
+
+For example:
+
+```bash
+$ xmake f --cxflags="" --ldflags="" --includedirs="" --linkdirs=""; xmake
+```
+

+ 3 - 2
docs/posts/building-cross-platform-apps.md

@@ -1,8 +1,9 @@
 ---
+---
 title: Building Cross-Platform Applications with Xmake
-date: 2024-01-10
-author: waruqi
 tags: [cross-platform, tutorial, cpp]
+date: 2024-01-10
+author: Ruki
 ---
 
 Building applications that work across multiple platforms can be challenging, but Xmake makes it much easier. In this post, we'll explore how to use Xmake to build cross-platform applications.

+ 93 - 0
docs/posts/builtinvar-and-shell.md

@@ -0,0 +1,93 @@
+---
+title: Builtin variables and shell
+tags: [xmake, shell, builtin-variables, pkg-config]
+date: 2016-07-18
+author: Ruki
+---
+
+xmake provides the grammar: `$(varname)` for supporting builtin variable.
+
+.e.g
+
+```lua
+add_cxflags("-I$(buildir)")
+```
+
+It will translate this variable to the real value when building.
+
+```
+-I$(buildir) => -I./build
+```
+
+We can also use these variables in the custom scripts.
+
+```lua
+target("test")
+    after_build(target)
+        print("build ok for $(plat)!")
+    end
+```
+
+And the output result is
+
+```lua
+build ok for macosx!
+```
+
+
+
+xmake will get values of these valriables from the cached configure after running `xmake config --plat=macosx ...` 
+
+Also we have some variables which are not in the configure file.
+
+.e.g
+
+```lua
+print("$(os)")
+print("$(host)")
+print("$(tmpdir)")
+print("$(curdir)")
+```
+
+we can uses these variable for writing `xmake.lua` more easily.
+
+.e.g
+
+```lua
+os.cp("$(projectdir)/file", "$(tmpdir)")
+```
+
+vs 
+
+```lua
+-- import project module
+import("core.project.project")
+
+-- copy file
+os.cp(path.join(project.directory(), "file"), os.tmpdir())
+```
+
+xmake can also run native shell for calling some third-party tools.
+
+.e.g 
+
+```lua
+target("test")
+    set_kind("binary")
+    if is_plat("linux") then
+        add_ldflags("$(shell pkg-config --libs sqlite3)")
+    end
+```
+
+Or
+
+```lua
+target("test")
+    set_kind("binary")
+    if is_plat("linux") then
+        add_linkdir("$(shell find ./ -name lib)")
+    end
+```
+
+But often, we do not need to do this. The Lua srcipt has been very powerful : )
+

+ 271 - 0
docs/posts/compile-project.md

@@ -0,0 +1,271 @@
+---
+title: Compile project
+tags: [xmake, compile, configure]
+date: 2016-06-26
+author: Ruki
+---
+
+Typically, you only need to execute the following command for compiling project.
+
+```bash
+    xmake
+```
+
+xmake will probe your host environment and target platform automaticly. 
+
+The default mode is release and xmake will compile all targets.
+
+You can compile only one given target which name is 'test' for executing the following command.
+
+```bash
+    xmake test
+```
+
+If you want to complie the debug program, you need configure it for switching to the debug mode and compile it.
+
+```bash
+    xmake config --mode=debug
+    xmake
+```
+
+We provide shorthand for each command, for example:
+
+```bash
+    xmake f -m debug
+    xmake
+```
+
+Please run `xmake --help` to get more info about it.
+
+
+
+We need to describe them for the debug and release compile mode in xmake.lua file, for example:
+
+```bash
+    -- the debug mode
+    if is_mode("debug") then
+        
+        -- enable the debug symbols
+        set_symbols("debug")
+
+        -- disable optimization
+        set_optimize("none")
+
+        -- add defines for debug
+        add_defines("__tb_debug__")
+    end
+
+    -- the release or profile modes
+    if is_mode("release", "profile") then
+
+        -- the release mode
+        if is_mode("release") then
+            
+            -- set the symbols visibility: hidden
+            set_symbols("hidden")
+
+            -- strip all symbols
+            set_strip("all")
+
+            -- fomit the frame pointer
+            add_cxflags("-fomit-frame-pointer")
+            add_mxflags("-fomit-frame-pointer")
+
+        -- the profile mode
+        else
+        
+            -- enable the debug symbols
+            set_symbols("debug")
+
+        end
+
+        -- for pc
+        if is_arch("i386", "x86_64") then
+     
+            -- enable fastest optimization
+            set_optimize("fastest")
+
+        -- for embed
+        else
+            -- enable smallest optimization
+            set_optimize("smallest")
+        end
+
+        -- attempt to add vector extensions 
+        add_vectorexts("sse2", "sse3", "ssse3", "mmx")
+    end
+```
+
+We can rebuild all targets:
+
+```bash
+       xmake -r
+    or xmake --rebuild
+```
+
+And we can compile target with a gived architecture:
+
+```bash
+       xmake f -a armv7
+    or xmake config --arch=armv7
+
+       xmake
+```
+
+If you want to compile target for the iphoneos platform in macosx host, you can do it:
+
+```bash
+       xmake f -p iphoneos
+    or xmake f --plat=iphoneos
+
+       xmake
+```
+
+We need configure the NDK directory path for android platform.
+
+```bash
+       xmake f -p android --ndk=xxxx
+       xmake
+```
+
+Or we can configure the NDK path as global.
+
+```bash
+       xmake g --ndk=xxxx
+    or xmake global --ndk=xxx
+
+       xmake f -p android
+       xmake
+```
+
+Please run `xmake f --help` to get more info about architecture and platform.
+
+We also can compile target using other cross-toolchains for the linux and android platfrom.
+
+```bash
+       xmake f -p android -a armv7-a --cross=arm-linux-androideabi- --toolchains=/xxxx/bin
+    or xmake f -p linux --cross=arm-linux-androideabi- --toolchains=/toolsdk/bin --ldflags="-arch armv7 -L/use/lib -lm -lc -lz" --cxflags="-I/usr/include"
+    or xmake f -p mingw --sdk=/mingwsdk
+    or xmake f -p linux --sdk=/toolsdk
+
+       xmake 
+```
+
+Uses `--clean` argument for cleaning up all cached configuration
+
+```bash
+       xmake f -c
+    or xmake f --clean
+       xmake
+```
+
+Or cleans target files
+
+```bash
+    # clean targets only
+    xmake -c
+    or xmake --clean
+
+    # clean all targets and temporary files 
+    or xmake --clean --all
+```
+
+Please run `xmake f --help` for getting more configuration info
+
+```bash
+    Usage: xmake config|f [options] [target]
+
+    Configure the project.
+
+    Options: 
+        -c, --clean                            Clean the cached configure and configure all again.
+                                               
+        -p PLAT, --plat=PLAT                   Compile for the given platform. (default: macosx)
+                                                   - android
+                                                   - iphoneos
+                                                   - linux
+                                                   - macosx
+                                                   - mingw
+                                                   - watchos
+                                                   - windows
+        -a ARCH, --arch=ARCH                   Compile for the given architecture. (default: auto)
+                                                   - android: armv5te armv6 armv7-a armv8-a arm64-v8a
+                                                   - iphoneos: armv7 armv7s arm64 i386 x86_64
+                                                   - linux: i386 x86_64
+                                                   - macosx: i386 x86_64
+                                                   - mingw: i386 x86_64
+                                                   - watchos: armv7 armv7s arm64 i386 x86_64
+                                                   - windows: x86 x64 amd64 x86_amd64
+        -m MODE, --mode=MODE                   Compile for the given mode. (default: release)
+                                                   - debug
+                                                   - release
+                                                   - profile
+        -k KIND, --kind=KIND                   Compile for the given target kind. (default: static)
+                                                   - static
+                                                   - shared
+                                                   - binary
+            --host=HOST                        The current host environment. (default: macosx)
+                                               
+            --make=MAKE                        Set the make path. (default: auto)
+            --ccache=CCACHE                    Enable or disable the c/c++ compiler cache. (default: auto)
+                                               
+            --cross=CROSS                      The cross toolchains prefix
+                                               .e.g
+                                                   - i386-mingw32-
+                                                   - arm-linux-androideabi-
+            --toolchains=TOOLCHAINS            The cross toolchains directory
+                                               
+            --cc=CC                            The C Compiler
+            --cxx=CXX                          The C++ Compiler
+            --cflags=CFLAGS                    The C Compiler Flags
+            --cxflags=CXFLAGS                  The C/C++ compiler Flags
+            --cxxflags=CXXFLAGS                The C++ Compiler Flags
+                                               
+            --as=AS                            The Assembler
+            --asflags=ASFLAGS                  The Assembler Flags
+                                               
+            --sc=SC                            The Swift Compiler
+            --scflags=SCFLAGS                  The Swift Compiler Flags
+                                               
+            --ld=LD                            The Linker
+            --ldflags=LDFLAGS                  The Binary Linker Flags
+                                               
+            --ar=AR                            The Static Library Linker
+            --arflags=ARFLAGS                  The Static Library Linker Flags
+                                               
+            --sh=SH                            The Shared Library Linker
+            --shflags=SHFLAGS                  The Shared Library Linker Flags
+                                               
+            --ndk=NDK                          The NDK Directory
+            --ndk_sdkver=NDK_SDKVER            The SDK Version for NDK (default: auto)
+                                               
+            --mm=MM                            The Objc Compiler
+            --mxx=MXX                          The Objc++ Compiler
+            --mflags=MFLAGS                    The Objc Compiler Flags
+            --mxflags=MXFLAGS                  The Objc/c++ Compiler Flags
+            --mxxflags=MXXFLAGS                The Objc++ Compiler Flags
+                                               
+            --xcode_dir=XCODE_DIR              The Xcode Application Directory (default: auto)
+            --xcode_sdkver=XCODE_SDKVER        The SDK Version for Xcode (default: auto)
+            --target_minver=TARGET_MINVER      The Target Minimal Version (default: auto)
+                                               
+            --mobileprovision=MOBILEPROVISION  The Provisioning Profile File (default: auto)
+            --codesign=CODESIGN                The Code Signing Indentity (default: auto)
+            --entitlements=ENTITLEMENTS        The Code Signing Entitlements (default: auto)
+                                               
+            --vs=VS                            The Microsoft Visual Studio (default: auto)
+                                               
+        -f FILE, --file=FILE                   Read a given xmake.lua file. (default: xmake.lua)
+        -P PROJECT, --project=PROJECT          Change to the given project directory.
+                                               Search priority:
+                                                   1. The Given Command Argument
+                                                   2. The Envirnoment Variable: XMAKE_PROJECT_DIR
+                                                   3. The Current Directory
+        -o BUILDIR, --buildir=BUILDIR          Set the build directory. (default: build)
+                                               
+        -v, --verbose                          Print lots of verbose information.
+            --version                          Print the version number and exit.
+        -h, --help                             Print this help message and exit.
+                                               
+        target                                 Configure for the given target. (default: all)
+```

+ 82 - 0
docs/posts/config-description.md

@@ -0,0 +1,82 @@
+---
+title: How to configure for compiling
+tags: [xmake, configure, android, auto-detection]
+date: 2016-07-19
+author: Ruki
+---
+
+xmake will automatically detect the system environment and create the most appropriate configuration to compile project when building a program
+
+Usually we only need to run:
+
+```bash
+$ xmake
+```
+
+And it will not re-generate configuration if the project description has not changed.
+
+But we can also modify configuration manually.
+
+e.g
+
+We want to build android program on macosx:
+
+```bash
+$ xmake f -p android --ndk=~/file/android-ndk
+```
+
+
+
+
+Or 
+
+```bash
+$ xmake config --plat=android --ndk=~/file/android-ndk
+```
+
+Next we build it.
+
+```bash
+$ xmake
+```
+
+We need add argument `-c` to clear the cached configuration and recheck it when some caching problem occurs
+
+```bash
+$ xmake f -c
+```
+
+The project configuration was storaged in the following directory: 
+
+```
+projectdir/.xmake
+```
+
+We can also use the global configuration to simplify our works.
+
+.e.g
+
+```bash
+$ xmake global --ndk=~/file/android-ndk
+```
+
+Or
+
+
+```bash
+$ xmake g --ndk=~/file/android-ndk
+```
+
+Now we only run the following command to build project without the ndk argument each time. : )
+
+```bash
+$ xmake f -p android
+$ xmake
+```
+
+Lastly,we can run xmake with `--help` to know more argument usages.
+
+```bash
+$ xmake f -h
+$ xmake g -h
+```

+ 90 - 0
docs/posts/create-project.md

@@ -0,0 +1,90 @@
+---
+title: Create project
+tags: [xmake, create, project, template]
+date: 2016-06-26
+author: Ruki
+---
+
+xmake provides some project templates, you can easily create an empty project.
+
+Create a c++ console project:
+
+```bash
+        xmake create -l c++ -t 1 demo
+     or xmake create --language=c++ --template=1 demo
+```
+
+Create a c static library project:
+
+```bash
+        xmake create -l c -t 5 demo
+     or xmake create --language=c --template=5 demo
+```
+
+Create a c shared library project:
+
+```bash
+        xmake create -t 3 demo
+     or xmake create --template=3 demo
+```
+
+The default language is C language and `-t/--template` argument is used to get specific types of templates.
+
+Only supports three templates which are console, static library and shared library.
+
+We will add some application templates in the future.
+
+We need note that the template's ID is variable. 
+
+
+
+You can run `xmake create --help` to get more arguments info for template.
+
+```bash
+    Usage: xmake create [options] [target]
+
+    Create a new project.
+
+    Options: 
+        -n NAME, --name=NAME                   The project name.
+        -f FILE, --file=FILE                   Create a given xmake.lua file. (default: xmake.lua)
+        -P PROJECT, --project=PROJECT          Create from the given project directory.
+                                               Search priority:
+                                                   1. The Given Command Argument
+                                                   2. The Envirnoment Variable: XMAKE_PROJECT_DIR
+                                                   3. The Current Directory
+        -l LANGUAGE, --language=LANGUAGE       The project language (default: c)
+                                                   - c
+                                                   - c++
+                                                   - objc
+                                                   - objc++
+                                                   - swift
+        -t TEMPLATE, --template=TEMPLATE       Select the project template id of the given language. (default: 1)
+                                                   - language: c
+                                                     1. The Console Program
+                                                     2. The Console Program (tbox)
+                                                     3. The Shared Library
+                                                     4. The Shared Library (tbox)
+                                                     5. The Static Library
+                                                     6. The Static Library (tbox)
+                                                   - language: c++
+                                                     1. The Console Program
+                                                     2. The Console Program (tbox)
+                                                     3. The Shared Library
+                                                     4. The Shared Library (tbox)
+                                                     5. The Static Library
+                                                     6. The Static Library (tbox)
+                                                   - language: objc
+                                                     1. The Console Program
+                                                   - language: objc++
+                                                     1. The Console Program
+                                                   - language: swift
+                                                     1. The Console Program
+                                               
+        -v, --verbose                          Print lots of verbose information.
+            --version                          Print the version number and exit.
+        -h, --help                             Print this help message and exit.
+                                               
+        target                                 Create the given target.
+                                               Uses the project name as target if not exists.
+```

+ 8 - 0
docs/posts/demo-build-a-simple-project.md

@@ -0,0 +1,8 @@
+---
+title: Build a simple project
+tags: [xmake, demo, build, project, hello]
+date: 2016-07-17
+author: Ruki
+---
+
+[![asciicast](https://asciinema.org/a/79998.png)](https://asciinema.org/a/79998)

+ 72 - 0
docs/posts/generate-vs2015-project.md

@@ -0,0 +1,72 @@
+---
+title: The xmake plugin for generating vstudio project file (vs2002 - 2015)
+tags: [xmake, VisualStudio, plugin, vs2008, vs2015]
+date: 2016-08-29
+author: Ruki
+---
+
+Xmake provide a builtin-plugin for generating VisualStudio project file (vs2002 - 2015) now.
+
+.e.g 
+
+We need enter the project directory first and run the following command if we want to generate vs2013 project.
+
+```bash
+$ xmake project -k vs2013
+```
+
+It will generate a directory(vs2013) in the current project and the directory structure is similar to:
+
+```
+vs2013
+├── demo
+│   └── demo.vcxproj
+├── tbox
+│   └── tbox.vcxproj
+└── tbox.sln
+```
+
+
+
+
+
+We also modify the other building directory manulally.
+
+```bash
+$ xmake f -o f:\build
+$ xmake project -k vs2015
+```
+
+Or we set the other VisualStudio project directory.
+
+```bash
+$ xmake project -k vs2008 f:\vsproject
+```
+
+We can also configure some other options before generate VisualStudio project and building it.
+
+.e.g 
+
+Generate the project for building the debug version.
+
+```bash
+$ xmake f -m debug
+$ xmake project -k vs2015
+```
+
+Or Disable some modules and re-generate vs project.
+
+```bash
+$ xmake f --demo=n --openssl=n --xml=n
+$ xmake project -k vs2015
+```
+
+Xmake can also build project directly without the VisualStudio project file.
+
+We need only open cmd windows and run the following command:
+
+```bash
+$ xmake
+```
+
+Done! :)

+ 333 - 0
docs/posts/how-to-build-a-simple-project.md

@@ -0,0 +1,333 @@
+---
+title: How to build a simple project quickly
+tags: [xmake, build, project, hello]
+date: 2016-07-16
+author: Ruki
+---
+
+We create an empty console project first:
+
+```bash
+$ xmake create -P ./hello
+
+create hello ...
+create ok!👌
+```
+
+And xmake will generate some files:
+
+```bash
+$ cd ./hello
+$ tree .
+
+.
+├── src
+│   └── main.c
+└── xmake.lua
+```
+
+It is a simple console program only for printing `hello xmake!`
+
+```bash
+$ cat ./src/main.c 
+
+#include <stdio.h>
+int main(int argc, char** argv)
+{
+    printf("hello xmake!\n");
+    return 0;
+}
+```
+
+The content of `xmake.lua` is very simple:
+
+```lua
+$ cat xmake.lua 
+
+target("hello")
+    set_kind("binary")
+    add_files("src/*.c") 
+
+```
+
+
+
+We build it now.
+
+```bash
+$ xmake
+
+checking for the architecture ... x86_64
+checking for the Xcode SDK version for macosx ... 10.11
+checking for the target minimal version ... 10.11
+checking for the c compiler (cc) ... xcrun -sdk macosx clang
+checking for the c++ compiler (cxx) ... xcrun -sdk macosx clang
+checking for the objc compiler (mm) ... xcrun -sdk macosx clang
+checking for the objc++ compiler (mxx) ... xcrun -sdk macosx clang++
+checking for the assember (as) ... xcrun -sdk macosx clang
+checking for the linker (ld) ... xcrun -sdk macosx clang++
+checking for the static library archiver (ar) ... xcrun -sdk macosx ar
+checking for the static library extractor (ex) ... xcrun -sdk macosx ar
+checking for the shared library linker (sh) ... xcrun -sdk macosx clang++
+checking for the swift compiler (sc) ... xcrun -sdk macosx swiftc
+checking for the debugger (dd) ... xcrun -sdk macosx lldb
+configure
+{
+    ex = "xcrun -sdk macosx ar"
+,   ccache = "ccache"
+,   plat = "macosx"
+,   ar = "xcrun -sdk macosx ar"
+,   buildir = "build"
+,   as = "xcrun -sdk macosx clang"
+,   sh = "xcrun -sdk macosx clang++"
+,   arch = "x86_64"
+,   mxx = "xcrun -sdk macosx clang++"
+,   xcode_dir = "/Applications/Xcode.app"
+,   target_minver = "10.11"
+,   sc = "xcrun -sdk macosx swiftc"
+,   mode = "release"
+,   make = "make"
+,   cc = "xcrun -sdk macosx clang"
+,   host = "macosx"
+,   dd = "xcrun -sdk macosx lldb"
+,   kind = "static"
+,   ld = "xcrun -sdk macosx clang++"
+,   xcode_sdkver = "10.11"
+,   cxx = "xcrun -sdk macosx clang"
+,   mm = "xcrun -sdk macosx clang"
+}
+configure ok!
+clean ok!
+[00%]: ccache compiling.release src/main.c
+[100%]: linking.release hello
+build ok!👌
+```
+
+And we run this program:
+
+```bash
+$ xmake run hello
+
+hello world!
+```
+
+Or we can debug it.
+
+```bash
+$ xmake run -d hello 
+
+[lldb]$target create "build/hello"
+Current executable set to 'build/hello' (x86_64).
+[lldb]$b main
+Breakpoint 1: where = hello`main, address = 0x0000000100000f50
+[lldb]$r
+Process 7509 launched: '/private/tmp/hello/build/hello' (x86_64)
+Process 7509 stopped
+* thread #1: tid = 0x435a2, 0x0000000100000f50 hello`main, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
+    frame #0: 0x0000000100000f50 hello`main
+hello`main:
+->  0x100000f50 <+0>:  pushq  %rbp
+    0x100000f51 <+1>:  movq   %rsp, %rbp
+    0x100000f54 <+4>:  leaq   0x2b(%rip), %rdi          ; "hello world!"
+    0x100000f5b <+11>: callq  0x100000f64               ; symbol stub for: puts
+[lldb]$
+```
+
+Next we build it for android.
+
+```bash
+$ xmake f -p android --ndk=~/files/android-ndk-r10e/
+
+checking for the architecture ... armv7-a
+checking for the SDK version of NDK ... android-21
+checking for the c compiler (cc) ... arm-linux-androideabi-gcc
+checking for the c++ compiler (cxx) ... arm-linux-androideabi-g++
+checking for the assember (as) ... arm-linux-androideabi-gcc
+checking for the linker (ld) ... arm-linux-androideabi-g++
+checking for the static library archiver (ar) ... arm-linux-androideabi-ar
+checking for the static library extractor (ex) ... arm-linux-androideabi-ar
+checking for the shared library linker (sh) ... arm-linux-androideabi-g++
+configure
+{
+    ex = "/Users/ruki/files/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar"
+,   ccache = "ccache"
+,   ndk = "~/files/android-ndk-r10e/"
+,   sc = "xcrun -sdk macosx swiftc"
+,   ar = "/Users/ruki/files/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ar"
+,   ld = "/Users/ruki/files/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++"
+,   buildir = "build"
+,   host = "macosx"
+,   as = "/Users/ruki/files/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc"
+,   toolchains = "/Users/ruki/files/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin"
+,   arch = "armv7-a"
+,   mxx = "xcrun -sdk macosx clang++"
+,   xcode_dir = "/Applications/Xcode.app"
+,   target_minver = "10.11"
+,   ndk_sdkver = 21
+,   mode = "release"
+,   cc = "/Users/ruki/files/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-gcc"
+,   cxx = "/Users/ruki/files/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++"
+,   make = "make"
+,   dd = "xcrun -sdk macosx lldb"
+,   kind = "static"
+,   sh = "/Users/ruki/files/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++"
+,   xcode_sdkver = "10.11"
+,   plat = "android"
+,   mm = "xcrun -sdk macosx clang"
+}
+configure ok!
+
+$ xmake
+
+clean ok!
+[00%]: ccache compiling.release src/main.c
+[100%]: linking.release hello
+build ok!👌
+```
+
+Or we build it for iphoneos.
+
+```bash
+$ xmake f -p iphoneos
+
+checking for the architecture ... armv7
+checking for the Xcode SDK version for iphoneos ... 9.2
+checking for the target minimal version ... 9.2
+checking for the c compiler (cc) ... xcrun -sdk iphoneos clang
+checking for the c++ compiler (cxx) ... xcrun -sdk iphoneos clang
+checking for the objc compiler (mm) ... xcrun -sdk iphoneos clang
+checking for the objc++ compiler (mxx) ... xcrun -sdk iphoneos clang++
+checking for the assember (as) ... gas-preprocessor.pl xcrun -sdk iphoneos clang
+checking for the linker (ld) ... xcrun -sdk iphoneos clang++
+checking for the static library archiver (ar) ... xcrun -sdk iphoneos ar
+checking for the static library extractor (ex) ... xcrun -sdk iphoneos ar
+checking for the shared library linker (sh) ... xcrun -sdk iphoneos clang++
+checking for the swift compiler (sc) ... xcrun -sdk iphoneos swiftc
+configure
+{
+    ex = "xcrun -sdk iphoneos ar"
+,   ccache = "ccache"
+,   ndk = "~/files/android-ndk-r10e/"
+,   sc = "xcrun -sdk iphoneos swiftc"
+,   ar = "xcrun -sdk iphoneos ar"
+,   sh = "xcrun -sdk iphoneos clang++"
+,   buildir = "build"
+,   xcode_dir = "/Applications/Xcode.app"
+,   as = "/usr/local/share/xmake/tools/utils/gas-preprocessor.pl xcrun -sdk iphoneos clang"
+,   toolchains = "/Users/ruki/files/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin"
+,   arch = "armv7"
+,   mxx = "xcrun -sdk iphoneos clang++"
+,   ndk_sdkver = 21
+,   target_minver = "9.2"
+,   cc = "xcrun -sdk iphoneos clang"
+,   mode = "release"
+,   host = "macosx"
+,   cxx = "xcrun -sdk iphoneos clang"
+,   make = "make"
+,   dd = "xcrun -sdk macosx lldb"
+,   kind = "static"
+,   ld = "xcrun -sdk iphoneos clang++"
+,   xcode_sdkver = "9.2"
+,   plat = "iphoneos"
+,   mm = "xcrun -sdk iphoneos clang"
+}
+configure ok!
+
+$ xmake
+ 
+[00%]: ccache compiling.release src/main.c
+[100%]: linking.release hello
+build ok!👌
+```
+
+Last, we attempt to build it for mingw.
+
+```bash
+$ xmake f -p mingw --sdk=/usr/local/i386-mingw32-4.3.0/
+
+checking for the architecture ... i386
+checking for the c compiler (cc) ... i386-mingw32-gcc
+checking for the c++ compiler (cxx) ... i386-mingw32-g++
+checking for the assember (as) ... i386-mingw32-gcc
+checking for the linker (ld) ... i386-mingw32-g++
+checking for the static library archiver (ar) ... i386-mingw32-ar
+checking for the static library extractor (ex) ... i386-mingw32-ar
+checking for the shared library linker (sh) ... i386-mingw32-g++
+checking for the swift compiler (sc) ... no
+configure
+{
+    ex = "/usr/local/i386-mingw32-4.3.0/bin/i386-mingw32-ar"
+,   ccache = "ccache"
+,   ndk = "~/files/android-ndk-r10e/"
+,   sc = "xcrun -sdk iphoneos swiftc"
+,   sdk = "/usr/local/i386-mingw32-4.3.0/"
+,   cc = "/usr/local/i386-mingw32-4.3.0/bin/i386-mingw32-gcc"
+,   ndk_sdkver = 21
+,   buildir = "build"
+,   plat = "mingw"
+,   as = "/usr/local/i386-mingw32-4.3.0/bin/i386-mingw32-gcc"
+,   toolchains = "/Users/ruki/files/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin"
+,   arch = "i386"
+,   mxx = "xcrun -sdk iphoneos clang++"
+,   xcode_dir = "/Applications/Xcode.app"
+,   target_minver = "9.2"
+,   sh = "/usr/local/i386-mingw32-4.3.0/bin/i386-mingw32-g++"
+,   mode = "release"
+,   host = "macosx"
+,   cxx = "/usr/local/i386-mingw32-4.3.0/bin/i386-mingw32-g++"
+,   make = "make"
+,   dd = "xcrun -sdk macosx lldb"
+,   kind = "static"
+,   ar = "/usr/local/i386-mingw32-4.3.0/bin/i386-mingw32-ar"
+,   xcode_sdkver = "9.2"
+,   ld = "/usr/local/i386-mingw32-4.3.0/bin/i386-mingw32-g++"
+,   mm = "xcrun -sdk iphoneos clang"
+}
+configure ok!
+
+$ xmake
+
+[00%]: ccache compiling.release src/main.c
+[100%]: linking.release hello.exe
+build ok!👌
+``` 
+
+xmake can build project directly on cmd if your system is windows and it will check your vs tools automatically.
+
+.e.g
+
+```bash
+$ xmake
+
+checking for the architecture ... x86
+checking for the Microsoft Visual Studio version ... 2008
+checking for the c compiler (cc) ... cl.exe
+checking for the c++ compiler (cxx) ... cl.exe
+checking for the assember (as) ... ml.exe
+checking for the linker (ld) ... link.exe
+checking for the static library archiver (ar) ... link.exe -lib
+checking for the shared library linker (sh) ... link.exe -dll
+checking for the static library extractor (ex) ... lib.exe
+configure
+{
+    ex = "lib.exe"
+,   sh = "link.exe -dll"
+,   host = "windows"
+,   ar = "link.exe -lib"
+,   as = "ml.exe"
+,   plat = "windows"
+,   buildir = "build"
+,   arch = "x86"
+,   cc = "cl.exe"
+,   cxx = "cl.exe"
+,   mode = "release"
+,   clean = true
+,   kind = "static"
+,   ld = "link.exe"
+,   vs = "2008"
+}
+configure ok!
+[00%]: compiling.release src\main.c
+[100%]: linking.release hello.exe
+build ok!
+```

+ 60 - 0
docs/posts/how-to-compile-on-cross-toolchains.md

@@ -0,0 +1,60 @@
+---
+title: How to complie project using the cross-toolchains
+tags: [xmake, cross-toolchains, cross-compiling]
+date: 2016-07-22
+author: Ruki
+---
+
+xmake provides a convenient and flexible cross-compiling support, in most cases, we need not to configure complex toolchains prefix, for example: `arm-linux-`
+
+As long as this toolchains meet the following directory structure:
+
+```
+/home/toolchains_sdkdir
+   - bin
+       - arm-linux-gcc
+       - arm-linux-ld
+       - ...
+   - lib
+       - libxxx.a
+   - include
+       - xxx.h
+```
+
+Then,we can only configure the sdk directory and build it.
+
+```bash
+$ xmake f -p linux --sdk=/home/toolchains_sdkdir
+$ xmake
+```
+
+
+
+
+xmake will detect the prefix: `arm-linux-` and add the include and library search directory automatically.
+
+```
+-I/home/toolchains_sdkdir/include -L/home/toolchains_sdkdir/lib
+```
+
+However, we need set it manually if the toolchains `/bin` directory is in other places.
+
+```bash
+$ xmake f -p linux --sdk=/home/toolchains_sdkdir --toolchains=/usr/opt/bin
+$ xmake
+```
+
+Or we need configure all options for compiling successfully if this toolchains has completely differen directory structure.
+
+```bash
+$ xmake f -p linux --sdk=/home/toolchains_sdkdir --toolchains=/usr/opt/bin --cxflags="-I/usr/xxx/include" --ldflags="-L/usr/zzz/lib"
+$ xmake
+```
+
+We can also set the prefix using the argument `--cross=` manually. 
+
+.e.g
+
+```bash
+$ xmake f -p linux --cross=arm-linux- --sdk=/home/toolchains_sdkdir ...
+```

+ 36 - 0
docs/posts/how-to-install-xmake.md

@@ -0,0 +1,36 @@
+---
+title: How to install xmake
+tags: [xmake, install, linux, windows, macosx, homebrew]
+date: 2016-07-19
+author: Ruki
+---
+
+### Install on windows
+
+1. Download xmake source codes
+2. Enter the source code directory
+3. Run `install.bat`
+4. Select the installed directory and enter into this directory
+5. Please wait some mintues
+
+### Install from source codes on linux and macosx
+
+```bash
+$ git clone [email protected]:waruqi/xmake.git
+$ cd ./xmake
+$ sudo ./install
+```
+
+### Install using homebrew on macosx
+
+```bash
+$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+$ sudo brew install xmake
+```
+
+### Install using homebrew on linux
+
+```bash
+$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/linuxbrew/go/install)"
+$ sudo brew install xmake
+```

+ 156 - 0
docs/posts/luarocks-build-xmake-v1.0.md

@@ -0,0 +1,156 @@
+---
+title: A luarocks build plugin for lua module with c/c++ based on xmake
+tags: [xmake, lua, C/C++, toolchains, xrepo, packages, vcpkg, conan, Apple, Silicon]
+date: 2021-01-22
+author: Ruki
+---
+
+[luarocks](https://luarocks.org/) is a package management tool of lua, which provides the installation and integration of various lua modules.
+
+When users install lua modules, it will use the built-in build system to build lua module with c/c++ codes.
+
+However, it's build system only provides simple configuration. For complex c/c++ modules, it is a little bit powerless, and it cannot be flexibly switch the toolchain.
+
+Although it also provides other back-ends (make, cmake), but make/makefile is also not flexible enough,
+and cmake requires users to install the cmake program in advance, otherwise the installation of the lua module will be interrupted.
+
+Here, I have implemented a luarocks plugin [luarocks-build-xmake](https://github.com/xmake-io/luarocks-build-xmake) based on xmake to build lua c/c++ modules
+to achieve more flexible and convenient lua module maintenance.
+
+Compared with the builtin build system of luarocks, it provides a more powerful build configuration and supports c/c++ dependency management.
+Compared with cmake, it does not require users to manually install xmake. This plugin will automatically install xmake and directly compile lua modules.
+In terms of users, no additional operations are required.
+
+* [luarocks-build-xmake](https://github.com/xmake-io/luarocks-build-xmake)
+* [xmake](https://github.com/xmake-io/xmake)
+
+### Example1 (with xmake.lua)
+
+We can build c/c++ modules if the project contain xmake.lua
+
+```
+├── src
+│   ├── test.c
+│   └── test.h
+└── xmake.lua
+```
+
+#### xmake.lua
+
+We need to use `add_rules("luarocks.module")` to add build rules for luarocks modules.
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("example1.hello")
+    add_rules("luarocks.module")
+    add_files("src/test.c")
+```
+
+#### rockspec
+
+```lua
+package = "example1"
+version = "1.0-1"
+source = {
+    url = "git://github.com/xmake-io/luarocks-build-xmake",
+    tag = "example1"
+}
+dependencies = {
+    "lua >= 5.1",
+    "luarocks-build-xmake"
+}
+build = {
+    type = "xmake",
+    copy_directories = {}
+}
+```
+
+
+
+
+
+
+### Example2 (without xmake.lua)
+
+We can use xmake as builtin build type to build c/c++ modules if the project does not contain xmake.lua
+
+```
+├── src
+    ├── test.c
+    └── test.h
+```
+
+#### rockspec
+
+```lua
+package = "example2"
+version = "1.0-1"
+source = {
+    url = "git://github.com/xmake-io/luarocks-build-xmake",
+    tag = "example2"
+}
+dependencies = {
+    "lua >= 5.1",
+    "luarocks-build-xmake"
+}
+build = {
+    type = "xmake",
+    modules = {
+        ["example2.hello"] = {
+            sources = "src/test.c"
+        }
+    },
+    copy_directories = {}
+}
+```
+
+### Set special xmake version
+
+```lua
+dependencies = {
+    "lua >= 5.1",
+    "luarocks-build-xmake"
+}
+build = {
+    type = "xmake",
+    variables = {
+        xmake = {
+            version = "2.5.1"
+        }
+    },
+    copy_directories = {}
+}
+```
+
+### Set xmake compilation configuration
+
+This plugin provides more flexible toolchain configuration, such as switching to the mingw toolchain, or switching between vs and sdk versions,
+modifying the vs runtime library, or switching to debug compilation mode, etc.
+
+```lua
+dependencies = {
+    "lua >= 5.1",
+    "luarocks-build-xmake"
+}
+build = {
+    type = "xmake",
+    variables = {
+        xmake = {
+            plat = "mingw",
+            arch = "x86_64",
+            mode = "debug",
+            cflags = "-DTEST1",
+            cc = "gcc",
+            ld = "gcc",
+            ldflags = "...",
+            mingw = "mingw sdk path",
+            vs = "2019",
+            vs_runtime = "MT",
+            vs_toolset = "",
+            vs_sdkver = "",
+        }
+    },
+    copy_directories = {}
+}
+```

+ 15 - 0
docs/posts/new-document.md

@@ -0,0 +1,15 @@
+---
+title: The new version document of xmake
+tags: [xmake, lua, document]
+date: 2017-02-07
+author: Ruki
+---
+
+Before the [wiki document](#https://github.com/xmake-io/xmake/wiki) structure is not very good, and not convenient to retrieve.
+
+So I recently rewritten the document of xmake using [docute](https://docute.js.org/) again.
+
+The Documents:
+
+* [English Document](https://xmake.io)  
+* [Chinese Document](https://xmake.io/zh/)  

+ 5 - 5
docs/posts/new-feature-announcement.md

@@ -1,9 +1,9 @@
 ---
-title: "New Feature: Enhanced Package Management"
-date: "2024-01-20"
-author: "waruqi"
-tags: ["feature", "package-management", "xmake"]
-excerpt: "We're excited to announce a major enhancement to Xmake's package management system that will make dependency handling even more powerful and user-friendly."
+---
+title: New Feature, Enhanced Package Management
+tags: [feature, package-management, xmake]
+date: 2024-01-20
+author: Ruki
 ---
 
 # New Feature: Enhanced Package Management

+ 394 - 0
docs/posts/new-features-v2.1.5.md

@@ -0,0 +1,394 @@
+---
+title: Some new features of xmake v2.1.5
+tags: [xmake, lua, cmake, detect, compiler, features]
+date: 2017-07-29
+author: Ruki
+---
+
+#### find_package
+
+This interface refers to the design of CMake for the `find_*` interfaces, which finds and adds package dependencies in the project target.
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("*.c")
+    on_load(function (target)
+        import("lib.detect.find_package")
+        target:add(find_package("zlib"))
+    end)
+```
+
+#### Package Dependency Management 2.0
+
+Now through `find_package` and `option`, we can achieve better package management.
+
+```lua
+option("zlib")
+    set_showmenu(true)
+    before_check(function (option)
+        import("lib.detect.find_package")
+        option:add(find_package("zlib"))
+    end)
+
+target("test")
+    add_options("zlib")
+```
+
+If you want to manually disable this zlib package and automatic detection and linking, you only need:
+
+```bash
+$ xmake f --zlib=n 
+$ xmake
+```
+
+Note: We will implement package management 3.0 in the 2.2.1 version, if you want to known more info, please see:[Remote package management](https://github.com/xmake-io/xmake/issues/69)。
+
+For example:
+
+```lua
+add_requires("mbedtls master optional")
+add_requires("pcre2 >=1.2.0", "zlib >= 1.2.11")
+add_requires("[email protected]:glennrp/libpng.git@libpng >=1.6.28")
+target("test")
+    add_packages("pcre2", "zlib", "libpng", "mbedtls")
+```
+
+We are currently working to develop ...
+
+
+
+
+
+
+#### Custom Extensions for Modules
+
+We can specify the extended modules directory in the project file (`xmake.lua`):
+
+```lua
+add_moduledirs("$(projectdir)/xmake/modules")
+```
+
+And add custom `detect.package.find_openssl` module to this directory.
+
+```
+projectdir
+ - xmake
+   - modules
+     - detect/package/find_openssl.lua
+```
+
+Now we can get more package info about openssl by `lib.detect.find_package("openssl")`.
+
+The search order of `find_package`:
+
+1. Find the local package "openssl.pkg" from the argument `{packagedirs = "./pkg"}`
+2. Call `detect.packages.find_openssl` to find it from the custom module directory `xmake/modules`in the project.
+3. If `pkg-config` exists in the current system, we can use it to get more info and find it.
+4. If `homebrew` exists in the current system, we can use `brew --prefix openssl` to get more info and find it.
+5. Find it from the some system library directories, .e.g `/usr/lib`, `/usr/include`
+
+#### Fast compiler feature detection support
+
+This is also a reference to the design of CMake, details see: [issues#83](https://github.com/xmake-io/xmake/issues/83)。
+
+```lua
+target("test")
+    on_load(function (target)
+        import("core.tool.compiler")
+        if compiler.has_features("cxx_constexpr") then
+            target:add("defines", "HAS_CXX_CONSTEXPR=1")
+        end
+    end)
+```
+
+We can also add some parameters to control the compilation option for detection.
+
+```lua
+if compiler.has_features({"c_static_assert", "cxx_constexpr"}, {languages = "cxx11"}) then
+    -- ok
+end
+```
+
+Even we can pass the target and inherit all of it's compiled configuration.
+
+```lua
+if compiler.has_features("cxx_constexpr", {target = target, defines = "..", includedirs = ".."}) then
+    -- ok
+end
+```
+
+#### Detect specified c/c++ headers 
+
+```lua
+import("lib.detect.has_cincludes")
+
+local ok = has_cincludes("stdio.h")
+local ok = has_cincludes({"stdio.h", "stdlib.h"}, {target = target})
+```
+
+The interface of c++ is `has_cxxincludes`:
+
+```lua
+import("lib.detect.has_cxxincludes")
+
+local ok = has_cxxincludes({"stdio.h", "stdlib.h"}, {defines = "_GNU_SOURCE=1", languages = "cxx11"})
+```
+
+#### Detect specified c/c++ functions
+
+```lua
+import("lib.detect.has_cfuncs")
+
+local ok = has_cfuncs("setjmp")
+local ok = has_cfuncs({"sigsetjmp((void*)0, 0)", "setjmp"}, {includes = "setjmp.h"})
+```
+
+The interface of c++ is `has_cxxfuncs`.
+
+#### Detect specified c/c++ types
+
+```lua
+import("lib.detect.has_ctypes")
+
+local ok = has_ctypes("wchar_t")
+local ok = has_ctypes({"char", "wchar_t"}, {includes = "stdio.h"})
+local ok = has_ctypes("wchar_t", {includes = {"stdio.h", "stdlib.h"}, "defines = "_GNU_SOURCE=1", languages = "cxx11"})
+```
+
+The interface of c++ is `has_cxxtypes`.
+
+#### Check specified c/c++ snippets
+
+```lua
+import("lib.detect.check_cxsnippets")
+
+local ok = check_cxsnippets("void test() {}")
+local ok = check_cxsnippets({"void test(){}", "#define TEST 1"}, {types = "wchar_t", includes = "stdio.h"})
+```
+
+And we can pass some detection condition (types, functions, includes, and links).
+
+```lua
+local ok = check_cxsnippets("void test() {}", {types = {"wchar_t", "char*"}, includes = "stdio.h", funcs = {"sigsetjmp", "sigsetjmp((void*)0, 0)"}})
+```
+
+#### Quick Test Module interface
+
+The `xmake lua` plugin has supported REPL (READ-EVAL-PRINT) to test modules in 2.1.4 version:
+
+```bash
+$ xmake lua
+> 1 + 2
+3
+
+> a = 1
+> a
+1
+
+> for _, v in pairs({1, 2, 3}) do
+>> print(v)
+>> end
+1
+2
+3
+```
+
+we can now test the module interface more quickly through a line of commands:
+
+```bash
+$ xmake lua lib.detect.find_package openssl
+```
+
+The results: `{links = {"ssl", "crypto", "z"}, linkdirs = {"/usr/local/lib"}, includedirs = {"/usr/local/include"}}`
+
+#### Precompiled header File Support
+
+We can add a precompiled header file to speed up the c/c++ program compile, currently supported compilers are: gcc, clang and msvc.
+
+Set c precompiled header:
+
+```lua
+target("test")
+    set_pcheader("header.h")
+```
+
+Set c++ precompiled header:
+
+```lua
+target("test")
+    set_pcxxheader("header.h")
+```
+
+#### Generate compiler_commands.json
+
+```console
+$ xmake project -k compile_commands
+```
+
+The output content like:
+
+```
+[
+  { "directory": "/home/user/llvm/build",
+    "command": "/usr/bin/clang++ -Irelative -DSOMEDEF=\"With spaces, quotes and \\-es.\" -c -o file.o file.cc",
+    "file": "file.cc" },
+  ...
+]
+
+```
+
+About the format and description of `compile_commands.json`, you can see [JSONCompilationDatabase](#https://clang.llvm.org/docs/JSONCompilationDatabase.html)
+
+#### Custom option script
+
+Add some configuration conditions dynamically before option detection:
+
+```lua
+option("zlib")
+    before_check(function (option)
+        import("lib.detect.find_package")
+        option:add(find_package("zlib"))
+    end)
+```
+
+Control the detection results of the options by the `on_check` script:
+
+```lua
+option("test")
+    add_deps("small")
+    set_default(true)
+    on_check(function (option)
+        if option:dep("small"):enabled() then
+            option:enable(false)
+        end
+    end)
+```
+
+We can also disable the option after checking option:
+
+```lua
+option("test")
+    add_deps("small")
+    add_links("pthread")
+    after_check(function (option)
+        option:enable(false)
+    end)
+```
+
+#### Custom Target Load Script
+
+We can add and modify target configuration dynamically by `target:add`, `target:set` in the `on_load` script.
+
+```lua
+target("test")
+    on_load(function (target)
+        target:add("defines", "DEBUG", "TEST=\"hello\"")
+        target:add("linkdirs", "/usr/lib", "/usr/local/lib")
+        target:add({includedirs = "/usr/include", "links" = "pthread"})
+    end)
+```
+
+#### Differentiate platform and architecture for custom script 
+
+For iphoneos platform and arm architecture:
+
+```lua
+target("test")
+    on_build("iphoneos|arm*", function (target) 
+        -- TODO
+    end)
+```
+
+For macosx platform and all architecture:
+
+```lua
+target("test")
+    after_build("macosx", function (target) 
+        -- TODO
+    end)
+```
+
+For all platform and architecture:
+
+```lua
+target("test")
+    on_package(function (target) 
+        -- TODO
+    end)
+```
+
+并不能对不同架构、平台分别处理。
+
+#### Get builtin variable
+
+```lua
+print(val("host"))
+print(val("env PATH"))
+local s = val("shell echo hello")
+```
+
+#### Add includes and links from target deps automatically
+
+We can add `includedirs`, `links`, `linkdirs` and `rpathdirs` to target automatically if it's target deps is `static`/`shared` library. 
+
+Before:
+
+```lua
+target("library1")
+    set_kind("static")
+    add_files("*.c")
+    add_headers("inc1/*.h")
+
+target("library2")
+    set_kind("static")
+    add_deps("library1")
+    add_files("*.c")
+    add_headers("inc2/*.h")
+    add_includes("$(buildir)/inc1")
+
+target("test")
+    set_kind("binary")
+    add_deps("library2")
+    add_includes("$(buildirs)/inc2")
+    add_links("library2", "library1")
+    add_linkdirs("$(buildir)")
+```
+
+Now:
+
+```lua
+target("library1")
+    set_kind("static")
+    add_files("*.c")
+    add_headers("inc1/*.h")
+
+target("library2")
+    set_kind("static")
+    add_deps("library1")
+    add_files("*.c")
+    add_headers("inc2/*.h")
+
+target("test")
+    set_kind("binary")
+    add_deps("library2")
+```
+
+#### Detect tool
+
+```lua
+import("lib.detect.find_tool")
+
+local tool = find_tool("clang")
+local tool = find_tool("clang", {check = "--help"}) 
+local tool = find_tool("clang", {check = function (tool) os.run("%s -h", tool) end})
+local tool = find_tool("clang", {version = true, {pathes = {"/usr/bin", "/usr/local/bin", "$(env PATH)", function () return "/usr/xxx/bin" end}})
+```
+
+#### More Secure Root Permissions compilation
+
+You can see: [pull#113](https://github.com/xmake-io/xmake/pull/113)
+
+#### More expansion Modules
+
+You can see: [modules](https://github.com/xmake-io/xmake/tree/master/xmake/modules)

+ 40 - 0
docs/posts/package-target.md

@@ -0,0 +1,40 @@
+---
+title: Package target
+tags: [xmake, package]
+date: 2016-06-26
+author: Ruki
+---
+
+Packages all targets for the current platform:
+
+```bash
+    $xmake p
+    $xmake package
+```
+
+Packages the target test to the output directory: /tmp
+
+```bash
+    $xmake p -o /tmp test
+    $xmake p --output=/tmp test
+```
+
+Packages targets for the iphoneos platform.
+
+```bash
+    $xmake f -p iphoneos
+    $xmake p 
+```
+
+We can uses the macro plugin to package all architectures of the given platform.
+
+```bash
+    # packages targets for all architectures of the current platform
+    $xmake macro package 
+
+    # packages targets for all architectures of the iphoneos platform
+    $xmake m package -p iphoneos
+
+    # packages targets with debug version for all architectures of the iphoneos platform and output to the directory: /tmp/output
+    $xmake m package -p iphoneos -f "-m debug" -o /tmp/output
+```

+ 597 - 0
docs/posts/please-use-xmake.md

@@ -0,0 +1,597 @@
+---
+title: C/C++ build system, I use xmake
+tags: [xmake, lua, C/C++, buildsystem]
+date: 2021-05-03
+author: Ruki
+---
+
+### What is XMake?
+
+[XMake](https://github.com/xmake-io/xmake) is a modern C/C++ build system based on Lua.
+
+Its grammar is concise and easy to use, friendly to novices, even if you don't know Lua at all, you can get started quickly, and it is completely free of any dependencies, lightweight, and cross-platform.
+
+At the same time, it is also a self-satisfied build system with a powerful package management system and a fast build engine.
+
+Compared with Ninja/Scons/Make as `Build backend`, CMake/Meson as `Project Generator`, and XMake not only provides `Build backend` and `Project Generator` at the same time, it also provides a built-in package manager.
+
+```
+xmake = Build backend + Project Generator + Package Manager
+```
+
+Therefore, you only need to install an XMake installation package that is less than 3M, and you don’t need to install other tools. You don’t even need to install make, and you don’t need to install heavyweight runtime environments such as Python and Java. You can quickly start your C/C++ development journey.
+
+Maybe someone will say that the compiler always needs to be installed. This is not necessary, because XMake's package management also supports automatically to pull remote compilation toolchains, such as llvm, Mingw, Android NDK or cross-compilation toolchain.
+
+### Why do XMake
+
+Whenever discussing XMake with others in the Reddit community, everyone will always use the following picture to complain.
+
+![](https://imgs.xkcd.com/comics/standards.png)
+
+Although I was a little helpless and numb by the complaints, I still want to explain that the original intention of XMake was not to split the C/C++ ecology. On the contrary, XMake reuses the existing ecology as much as possible.
+
+At the same time, it also allows users to have the same good experience as other languages when developing C/C++ projects, such as Rust/Cargo, Nodejs/Npm, Dlang/Dub, instead of looking for the third package everywhere, and studying how to transplant and compile. toss.
+
+Therefore, if you don’t know XMake, please don’t draw conclusions too early, you can try it first, or take a moment to read the detailed introduction below.
+
+### Features and advantages of XMake
+
+People often ask me what is special about XMake and what are the advantages compared to existing build tools such as CMake and Meson. Why should I use XMake instead of CMake?
+
+Let me talk about the features and advantages first, XMake has the following points:
+
+- Concise and easy-to-learn configuration syntax, non-DSL
+- Powerful package management, support semantic version, toolchain management
+- Lightweight enough, no dependence
+- Fast, the build speed is as fast as Ninja
+- Simple and convenient multi-platform and toolchain switching
+- Complete plugin system
+- Flexible build rules
+
+
+
+
+
+
+
+
+
+XMake can be used as a supplement for those newcomers who want a simple and quick start to C/C++ development, or want more convenient and easy-to-use package management, or want to quickly write some short test projects temporarily.
+
+XMake can help them improve development efficiency and make them pay more attention to the C/C++ project itself instead of spending more time on building tools and development environments.
+
+Now, let us introduce these main features of XMake in detail.
+
+### Simple syntax 
+
+CMake designs a DSL language for project configuration, which increases learning costs for users, and its grammatical readability is not very intuitive, it is easy to write overly complex configuration scripts, and also increases maintenance costs.
+
+XMake reuses the existing well-known Lua language as its foundation, and provides a simpler and more straightforward configuration syntax.
+
+Lua itself is a simple and lightweight language. There are only a few keywords and built-in types. Just read an article and you can basically get started. Compared with DSL, you can get a lot of relevant information more conveniently from the Internet. 
+
+#### Basic syntax
+
+However, some people still complain: don't you still have to learn Lua?
+
+In fact, it is not necessary. XMake adopts the method of separating the description field and the script field, so that in 80% of the cases, beginner users only need to configure the description field in a simpler and more direct way. It is completely unnecessary to configure it. As a Lua script, for example:
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_files("test/*.c", "example/**.cpp")
+```
+
+If because of the parentheses, it is still like a function call of a scripting language, then we can also write it like this (whether to bring the parentheses depends on personal preference, but I personally recommend the above method)
+
+```lua
+target "test"
+    set_kind "binary"
+    add_files "src/*.c"
+    add_files "test/*.c"
+    add_files "example/**.cpp"
+```
+
+We only need to know the common configuration interface, even if we don't know Lua at all, we can quickly configure it.
+
+We can compare the configuration of CMake:
+
+```cmake
+add_executable(test "")
+file(GLOB SRC_FILES "src/*.c")
+file(GLOB TEST_FILES "test/*.c")
+file(GLOB_RECURSE EXAMPLE_FILES "example/*.cpp")
+target_sources(test PRIVATE
+    ${SRC_FILES}
+    ${TEST_FILES}
+    ${EXAMPLE_FILES}
+)
+```
+
+Which is more intuitive and readable, at a glance.
+
+#### Condition configuration
+
+If you have a preliminary understanding of some basic knowledge such as Lua, such as conditional judgments such as `if then`, then you can further configure some conditions.
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("src/main.c")
+    if is_plat("macosx", "linux") then
+        add_defines("TEST1", "TEST2")
+    end
+    if is_plat("windows") and is_mode("release") then
+        add_cxflags("-Ox", "-fp:fast")
+    end
+```
+
+Continue to compare the CMake version configuration:
+
+```cmake
+add_executable(test "")
+if (APPLE OR LINUX)
+    target_compile_definitions(test PRIVATE TEST1 TEST2)
+endif()
+if (WIN32)
+    target_compile_options(test PRIVATE $<$<CONFIG:Release>:-Ox -fp:fast>)
+endif()
+target_sources(test PRIVATE
+    src/main.c
+)
+```
+
+#### Complex script
+
+If you have basically mastered xmake and are familiar with lua syntax and you want more flexible customized configuration, then XMake also provides more complete Lua script customization capabilities, and you can write any complex script.
+
+For example, before building, do some preprocessing of all source files, after building, execute external gradle commands for later packaging, and even we can rewrite internal link rules to achieve deep custom compilation. We can use [import](https: //xmake.io/#/zh/manual#import) interface, import the built-in linker extension module to realize complex and flexible linking process.
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    before_build_file(function (target, sourcefile)
+        io.replace(sourcefile, "#define HAVE_XXX 1", "#define HAVE_XXX 0")
+    end)
+    on_link(function (target)
+        import("core.tool.linker")
+        linker.link("binary", "cc", target:objectfiles(), target:targetfile(), {target = target})
+    end)
+    after_build(function (target)
+        if is_plat("android" then
+            os.cd("android/app")
+            os.exec("./gradlew app:assembleDebug")
+        end
+    end)
+```
+
+If you use CMake, you can also implement it in add_custom_command, but it seems that you can only simply execute some batch commands, and you can't do all kinds of complex logic judgments, module loading, custom configuration scripts, and so on.
+
+Of course, using cmake can certainly achieve the functions described above, but it is definitely not that simple.
+
+If you are familiar with cmake, you can also try to help complete the following configuration:
+
+```cmake
+add_executable(test "")
+file(GLOB SRC_FILES "src/*.c")
+add_custom_command(TARGET test PRE_BUILD
+    - TODO
+    COMMAND echo hello
+)
+add_custom_command(TARGET test POST_BUILD
+    COMMAND cd android/app
+    COMMAND ./gradlew app:assembleDebug
+)
+- How can we override link stage?
+target_sources(test PRIVATE
+    ${SRC_FILES}
+)
+```
+
+### Powerful package management
+
+As we all know, in the development of C/C++ related projects, the most important thing is the integration of various dependent packages, because there is no complete package management system like Rust/Cargo.
+
+Therefore, every time we want to use a third-party library, we need to find and study the porting and compilation of various platforms, and we often encounter various compilation problems, which greatly delays the developer’s time and cannot concentrate on the actual The project is under development.
+
+Finally, the current platform is done. If you change to another platform, you need to toss the dependency package again. In order to solve this problem, some third-party package managers, such as vcpkg/conan/conda, etc., have appeared, but some do not support semantic versions. , Some supported platforms are limited, but no matter what, it is a big step towards solving the dependency management of the C/C++ library.
+
+However, with the package manager alone, it is still more troublesome to use them in C/C++ projects, because the corresponding build tools also need to be able to integrate and support them well.
+
+#### CMake and Vcpkg
+
+Let's first look at the integrated support of CMake and Vcpkg:
+
+```
+cmake_minimum_required(VERSION 3.0)
+project(test)
+find_package(unofficial-sqlite3 CONFIG REQUIRED)
+add_executable(main main.cpp)
+target_link_libraries(main PRIVATE unofficial::sqlite3::sqlite3)
+```
+
+Disadvantages:
+
+- Additional configuration is required `-DCMAKE_TOOLCHAIN_FILE=<vcpkg_dir>/scripts/buildsystems/vcpkg.cmake
+- Does not support automatic installation of dependent packages, and requires the user to manually execute the `vcpkg install xxx` command to install
+- The semantic version of vcpkg is not supported (it is said that the new version is supported)
+
+#### CMake and Conan
+
+```
+```cmake
+cmake_minimum_required(VERSION 2.8.12)
+project(Hello)
+
+add_definitions("-std=c++11")
+
+include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
+conan_basic_setup()
+
+add_executable(hello hello.cpp)
+target_link_libraries(hello gtest)
+```
+
+conanfile.txt
+
+```text
+[requires]
+gtest/1.10.0
+
+[generators]
+cmake
+```
+
+Disadvantages:
+
+- Similarly, you still need to call `conan install ..` to install the package
+- An additional conanfile.txt file needs to be configured to describe package dependency rules
+
+#### Meson and Vcpkg
+
+I didn't find how to use the vcpkg package in Meson. I just found a related [Issue #3500](https://github.com/mesonbuild/meson/issues/3500) discussion.
+
+#### Meson and Conan
+
+It seems that Meson has not yet supported Conan, but there is a solution in the official Conan document to support alignment, but it is very complicated. I didn't see it. You can research it yourself: [https://docs.conan.io/en/ latest/reference/build_helpers/meson.html](https://docs.conan.io/en/latest/reference/build_helpers/meson.html)
+
+#### XMake and Vcpkg
+
+I have talked about so much before. The integration of other build tools and package management feels very troublesome to use, and different package managers have very different integration methods. Users want to quickly switch from Vcpkg to the Conan package, and the amount of change is very large. .
+
+Next, let's take a look at the packages provided by Vcpkg integrated in XMake:
+
+```lua
+add_requires("vcpkg::zlib", {alias = "zlib"})
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("zlib")
+```
+
+We only need to use the corresponding package name on the `add_requires` configuration and the `vcpkg::` ​​package namespace to directly integrate and use the zlib package provided by vcpkg.
+
+Then, we only need to execute the xmake command to complete the entire compilation process, including the automatic installation of the zlib package, without the need to manually execute `vcpkg install zlib`.
+
+```bash
+$ xmake
+note: try installing these packages (pass -y to skip confirm)?
+-> vcpkg::zlib
+please input: y (y/n)
+
+=> install vcpkg::zlib .. ok
+[25%]: compiling.release src\main.cpp
+[50%]: linking.release test
+[100%]: build ok!
+```
+
+#### XMake and Conan
+
+The next step is to integrate the Conan package, in exactly the same way, just change the package manager name.
+
+```lua
+add_requires("conan::zlib", {alias = "zlib"})
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("zlib")
+```
+
+XMake will also automatically install the zlib package in conan, and then automatically integrate and compile.
+
+#### XMake self-built package management
+
+XMake and CMake have other build systems. The biggest difference, and one of the biggest advantages, is that it has a completely self-built package management system. We can not rely on vcpkg/conan at all, and can also quickly integrate dependent packages, such as :
+
+```lua
+add_requires("zlib 1.2.x", "tbox >= 1.6.0")
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("zlib", "tbox")
+```
+
+Moreover, it also supports complete semantic version selection, multi-platform package integration, cross-compilation tool chain package integration, and even automatic pull and use of compilation tool chain packages.
+
+Not only that, but we can also rely on self-built packages for customized configurations, such as:
+
+##### Use the debug version to depend on the package
+
+We can use the debug version library to implement breakpoint debugging of dependent libraries.
+
+```lua
+add_requires("zlib", {debug = true})
+```
+
+##### Set msvc runtime library
+
+```lua
+add_requires("zlib", {configs = {vs_runtime = "MD"}})
+```
+
+##### Use dynamic libraries
+
+The default integrated is static library, we can also switch to dynamic library.
+
+```lua
+add_requires("zlib", {configs = {shared = true}})
+```
+
+##### Semantic version support
+
+XMake's self-built package integration supports complete version semantic specifications.
+
+```lua
+add_requires("zlib 1.2.x")
+add_requires("zlib >=1.2.10")
+add_requires("zlib ~1.2.0")
+```
+
+##### Prohibit the use of system libraries
+
+By default, if the versions match, XMake will give priority to searching and using the libraries that the user has installed on the system. Of course, we can also forcibly prohibit the search and use of system libraries, and only download the installation package from the self-built package repository.
+
+```lua
+add_requires("zlib", {system = true})
+```
+
+##### Optional dependency package
+
+If the dependent package integration fails, XMake will automatically report an error, interrupt the compilation, and prompt the user: `zlib not found`, but we can also set it as optional package integration. In this way, even if the library is not installed successfully, it will not affect the compilation of the project. , Just skip this dependency.
+
+```lua
+add_requires("zlib", {optional = true})
+```
+
+##### Package customization configuration
+
+For example, the integration uses the boost library with the context/coroutine module configuration enabled.
+
+```lua
+add_requires("boost", {configs = {context = true, coroutine = true}})
+```
+
+#### Support package management repository
+
+In addition to supporting vcpkg/conan and self-built repository package integration support, XMake also supports other package management repositorys, such as Conda/Homebrew/Apt/Pacman/Clib/Dub, etc., and the integration method is exactly the same.
+
+Users can quickly switch to use other repository packs without spending too much time studying how to integrate them.
+
+Therefore, XMake does not destroy the C/C++ ecology, but greatly reuses the existing C/C++ ecology, and strives to improve the user experience of C/C++ dependent packages, improve development efficiency, and enable users to have more More time to focus on the project itself.
+
+* Official self-built repository [xmake-repo](https://github.com/xmake-io/xmake-repo) (tbox >1.6.1)
+* Official package manager [Xrepo](https://github.com/xmake-io/xrepo)
+* [User-built repository](/zh/package/remote_package#%e4%bd%bf%e7%94%a8%e8%87%aa%e5%bb %ba%e7%a7%81%e6%9c%89%e5%8c%85%e4%bb%93%e5%ba%93)
+* Conan (conan::openssl/1.1.1g)
+* Conda (conda::libpng 1.3.67)
+* Vcpkg (vcpkg:ffmpeg)
+* Homebrew/Linuxbrew (brew::pcre2/libpcre2-8)
+* Pacman on archlinux/msys2 (pacman::libcurl)
+* Apt on ubuntu/debian (apt::zlib1g-dev)
+* Clib (clib::clibs/[email protected])
+* Dub (dub::log 0.4.3)
+
+#### Independent package management command (Xrepo)
+
+In order to facilitate the package management in XMake's self-built repository and the management and use of third-party packages, we also provide an independent Xrepo cli command tool to facilitate the management of our dependent packages
+
+We can use this tool to quickly and easily complete the following management operations:
+
+- Installation package: `xrepo install zlib`
+- Uninstall the package: `xrepo remove zlib`
+- Get package information: `xrepo info zlib`
+- Get package compilation link flags: `xrepo fetch zlib`
+- Load package virtual shell environment: `xrepo env shell` (this is a very powerful feature)
+
+We can go to [Xrepo Project Homepage](https://github.com/xmake-io/xrepo) to see more introduction and usage.
+
+![](https://xrepo.xmake.io/assets/img/xrepo.gif)
+
+
+### Lightweight and no dependencies
+
+To use Meson/Scons, you need to install python/pip first. To use Bazel, you need to install a runtime environment such as java. XMake does not need to install any additional dependent libraries and environments. Its own installation package is only 2-3M, which is very lightweight.
+
+Although XMake is based on lua, thanks to the lightweight features of the lua glue language, xmake has fully built-in it, so installing XMake is equivalent to having a complete lua vm.
+
+Some people will say that the compilation tool chain is always needed, not completely. On Windows, we provide a pre-compiled installation package, which can be downloaded and installed directly. The address is: [Releases](https://github.com/ xmake-io/xmake/releases)
+
+In addition, XMake also supports remotely pulling the compilation toolchain, so even if your system environment has not installed any compiler, it doesn’t matter, users don’t have to worry about how to toss the compilation environment, only need to configure the tools needed in xmake.lua The chain is fine.
+
+For example, if we use the mingw-w64 tool chain to compile C/C++ projects on Windows, we only need to do the following configuration.
+
+```lua
+add_requires("mingw-w64")
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    set_toolchains("mingw@mingw-w64")
+```
+
+After binding the mingw-w64 toolchain package through the `set_toolchains` configuration, XMake will automatically detect whether mingw-64 exists in the current system. If it has not been installed, it will automatically download and install, and then complete the project compilation. It can be done by executing the command `xmake`.
+
+```bash
+$ xmake
+note: try installing these packages (pass -y to skip confirm)?
+in xmake-repo:
+-> mingw-w64 8.1.0 [vs_runtime:MT]
+please input: y (y/n)
+
+=> download https://jaist.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0 -release-posix-seh-rt_v6-rev0.7z .. ok
+checking for mingw directory ... C:\Users\ruki\AppData\Local\.xmake\packages\m\mingw-w64\8.1.0\aad6257977e0449595004d7441358fc5
+[25%]: compiling.release src\main.cpp
+[50%]: linking.release test.exe
+[100%]: build ok!
+```
+
+In addition to mingw-w64, we can also configure remote pull to use other tool chains, and even cross-compile tool chains, such as: llvm-mingw, llvm, tinycc, muslcc, gnu-rm, zig, etc.
+
+If you want to learn more about the pull integration of the remote toolchain, you can read the document: [Automatically pull the remote toolchain](/zh/package/remote_package#%e8 %87%aa%e5%8a%a8%e6%8b%89%e5%8f%96%e8%bf%9c%e7%a8%8b%e5%b7%a5%e5%e5%85%b7%e9%93 %be).
+
+### Extremely fast parallel compilation
+
+Everyone knows that Ninja builds very fast, so many people like to use CMake/Meson to generate build.ninja, and then use Ninja to meet the needs of extremely fast builds.
+
+Although Ninja is fast, we still need to generate build.ninja through the meson.build and CMakelist.txt files first. This generation process will take several seconds or even ten seconds.
+
+And XMake not only has almost the same build speed as Ninja, but also does not need to generate additional build files. It has a built-in build system directly. In any case, only one `xmake` command can be used to achieve extremely fast compilation.
+
+We have also done some comparative test data for your reference:
+
+#### Multi-task parallel compilation test
+
+| Build System | Termux (8core/-j12) | Build System | MacOS (8core/-j12) |
+|----- | ---- | --- | --- |
+|xmake | 24.890s | xmake | 12.264s |
+|ninja | 25.682s | ninja | 11.327s |
+|cmake(gen+make) | 5.416s+28.473s | cmake(gen+make) | 1.203s+14.030s |
+|cmake(gen+ninja) | 4.458s+24.842s | cmake(gen+ninja) | 0.988s+11.644s |
+
+#### Single task compilation test
+
+| Build System | Termux (-j1) | Build System | MacOS (-j1) |
+|----- | ---- | --- | --- |
+|xmake | 1m57.707s | xmake | 39.937s |
+|ninja | 1m52.845s | ninja | 38.995s |
+|cmake(gen+make) | 5.416s+2m10.539s | cmake(gen+make) | 1.203s+41.737s |
+|cmake(gen+ninja) | 4.458s+1m54.868s | cmake(gen+ninja) | 0.988s+38.022s |
+
+
+### Fool-style multi-platform compilation
+
+Another feature of XMake is efficient and simple multi-platform compilation, whether you are compiling programs under windows/linux/macOS, compiling iphoneos/android or cross compiling.
+
+Compilation configuration methods are similar, so users don't need to go here to study how to compile under various platforms.
+
+![](/assets/img/index/xmake-basic-render.gif)
+
+#### Compile native Windows/Linux/MacOS programs
+
+The current native program compilation, we only need to execute:
+
+```bash
+$ xmake
+```
+
+##### CMake
+
+```bash
+$ mkdir build
+$ cd build
+$ cmake --build ..
+```
+
+#### Compile Android program
+
+```bash
+$ xmake f -p android --ndk=~/android-ndk-r21e
+$ xmake
+```
+
+##### CMake
+
+```bash
+$ mkdir build
+$ cd build
+$ cmake -DCMAKE_TOOLCHAIN_FILE=~/android-ndk-r21e/build/cmake/android.toolchain.cmake ..
+$ make
+```
+
+#### Compile iOS program
+
+```bash
+$ xmake f -p iphoneos
+$ xmake
+```
+
+##### CMake
+
+```bash
+$ mkdir build
+$ cd build
+$ wget https://raw.githubusercontent.com/leetal/ios-cmake/master/ios.toolchain.cmake
+$ cmake -DCMAKE_TOOLCHAIN_FILE=`pwd`/ios.toolchain.cmake ..
+$ make
+```
+
+I didn't find a very convenient way to configure and compile the ios program. I could only find a third-party ios tool chain from other places to configure and compile.
+
+#### Cross compilation
+
+We usually only need to set the root directory of the cross-compilation toolchain. XMake will automatically detect the toolchain structure and extract the compiler inside to participate in the compilation. No additional configuration is required.
+
+```bash
+$ xmake f -p cross --sdk=~/aarch64-linux-musl-cross
+$ xmake
+```
+
+##### CMake
+
+We need to write an additional cross-toolchain.cmake configuration file first.
+
+```cmake
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_PROCESSOR aarch64)
+
+set(TOOL_CHAIN_DIR ~/aarch64-linux-musl)
+set(TOOL_CHAIN_INCLUDE ${TOOL_CHAIN_DIR}/aarch64-linux-musl/include)
+set(TOOL_CHAIN_LIB ${TOOL_CHAIN_DIR}/aarch64-linux-musl/lib)
+
+set(CMAKE_C_COMPILER "aarch64-linux-gcc")
+set(CMAKE_CXX_COMPILER "aarch64-linux-g++")
+
+set(CMAKE_FIND_ROOT_PATH ${TOOL_CHAIN_DIR}/aarch64-linux-musl)
+
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
+
+include_directories(${TOOL_CHAIN_DIR}/aarch64-linux-musl/include)
+set(CMAKE_INCLUDE_PATH ${TOOL_CHAIN_INCLUDE})
+set(CMAKE_LIBRARY_PATH ${TOOL_CHAIN_LIB})
+```
+
+```bash
+$ mkdir build
+$ cd build
+$ cmake -DCMAKE_TOOLCHAIN_FILE=../cross-toolchain.cmake ..
+$ make
+```
+
+### Conclusion
+
+If you are new to C/C++ development, you can use XMake to quickly get started with C/C++ compilation and construction.
+
+If you want to develop and maintain a cross-platform C/C++ project, you can also consider using XMake to maintain the build, improve development efficiency, and let you focus more on the project itself, and no longer worry about tossing about transplanting dependent libraries.
+
+Welcome to the XMake project:
+
+- [Github project](https://github.com/xmake-io/xmake/)
+- [Project Homepage](https://xmake.io/#/)
+- [XMake Package Management Repository](https://github.com/xmake-io/xmake-repo)
+- Community
+  - [Discord chat room](https://discord.gg/xmake)

+ 97 - 0
docs/posts/plugin-hello.md

@@ -0,0 +1,97 @@
+---
+title: Plugin development of hello xmake
+tags: [xmake, plugin, example, hello]
+date: 2016-07-08
+author: Ruki
+---
+
+xmake v2.0 has supported the plugin module and we can develop ourself plugin module conveniently.
+
+We can run command `xmake -h` to look over some builtin plugins of xmake
+
+```
+    Plugins: 
+        l, lua                                 Run the lua script.
+        m, macro                               Run the given macro.
+           doxygen                             Generate the doxygen document.
+           hello                               Hello xmake!
+           project                             Create the project file.
+```
+
+* lua: Run a given lua script.
+* macro: Record and playback some xmake commands repeatly.
+* doxygen:Generate doxygen document automatically.
+* hello:  The demo plugin and only print: 'hello xmake!'
+* project:Generate project file for IDE, only generate makefile now and will generate vs, xcode project in the future
+
+
+
+Next we write a simple plugin demo for printing 'hello xmake!'
+
+```lua
+    -- define a plugin task 
+    task("hello")
+
+        -- set the category for showing it in plugin category menu (optional)
+        set_category("plugin")
+
+        -- the main entry of the plugin
+        on_run(function ()
+
+            -- print 'hello xmake!'
+            print("hello xmake!")
+        end)
+
+        -- set the menu options, but we put empty options now.
+        set_menu({
+                        -- usage
+                        usage = "xmake hello [options]"
+
+                        -- description
+                    ,   description = "Hello xmake!"
+
+                        -- options
+                    ,   options = {}
+                    }) 
+```
+
+The file tree of this plugin:
+
+```
+    hello
+     - xmake.lua
+```
+
+Now one of the most simple plugin finished, how was it to be xmake detected it, there are three ways:
+
+1. Put this plugin directory into xmake/plugins the source codes as the builtin plugin.
+2. Put this plugin directory into ~/.xmake/plugins as the global user plugin.
+3. Put this plugin directory to anywhere and call `add_plugindirs("./hello")` in xmake.lua as the local project plugin.
+
+Next we run this plugin
+
+```bash
+    $xmake hello
+```
+
+The results is 
+
+```
+    hello xmake!
+```
+
+Finally, we can also run this plugin in the custom scripts of `xmake.lua`
+
+```lua
+    target("demo")
+        
+        -- run this plugin after building target
+        after_build(function (target)
+      
+            -- import task module
+            import("core.project.task")
+
+            -- run the plugin task
+            task.run("hello")
+        end)
+```

+ 0 - 44
docs/posts/post-10.md

@@ -1,44 +0,0 @@
----
-title: IDE Integration Guide 10
-date: 2024-01-01
-author: waruqi
-tags: [ide, integration]
----
-
-# IDE Integration Guide
-
-Xmake provides excellent integration with popular IDEs and editors, making development more efficient.
-
-## VS Code Integration
-
-Install the Xmake extension for VS Code:
-
-1. Open VS Code
-2. Go to Extensions (Ctrl+Shift+X)
-3. Search for "Xmake"
-4. Install the extension
-
-## CLion Integration
-
-CLion supports Xmake projects natively:
-
-1. Open CLion
-2. Open your project directory
-3. CLion will automatically detect the xmake.lua file
-4. Configure your run configurations
-
-## Vim/Neovim Integration
-
-For Vim/Neovim users, there are several plugins available:
-
-- xmake.nvim
-- vim-xmake
-
-## Benefits of IDE Integration
-
-- IntelliSense support
-- Debugging integration
-- Build task integration
-- Error highlighting
-
-Proper IDE integration significantly improves the development experience.

+ 0 - 59
docs/posts/post-3.md

@@ -1,59 +0,0 @@
----
-title: Getting Started with Xmake
-date: 2024-01-05
-author: waruqi
-tags: [tutorial, getting-started]
----
-
-# Getting Started with Xmake
-
-Xmake is a modern build system that makes C/C++ development easier and more efficient. In this guide, we'll walk through the basics of setting up and using Xmake.
-
-## Installation
-
-Installing Xmake is straightforward. You can use one of the following methods:
-
-### Using curl (Linux/macOS)
-```bash
-curl -fsSL https://xmake.io/install.sh | bash
-```
-
-### Using PowerShell (Windows)
-```powershell
-Invoke-Expression (Invoke-Webrequest 'https://xmake.io/install.ps1' -UseBasicParsing).Content
-```
-
-## Creating Your First Project
-
-Let's create a simple C++ project:
-
-```bash
-xmake create -l c++ hello
-cd hello
-xmake
-```
-
-This creates a basic C++ project with the following structure:
-- src/main.cpp
-- xmake.lua
-
-## Basic Configuration
-
-The xmake.lua file contains your project configuration:
-
-```lua
-add_rules("mode.debug", "mode.release")
-
-target("hello")
-    set_kind("binary")
-    add_files("src/*.cpp")
-```
-
-## Building and Running
-
-```bash
-xmake build
-xmake run
-```
-
-That's it! You've successfully created and built your first Xmake project.

+ 0 - 48
docs/posts/post-4.md

@@ -1,48 +0,0 @@
----
-title: Advanced Package Management
-date: 2024-01-03
-author: waruqi
-tags: [package-management, advanced]
----
-
-# Advanced Package Management with Xmake
-
-Xmake provides a powerful package management system that simplifies dependency handling in C/C++ projects.
-
-## Adding Packages
-
-Adding packages to your project is simple:
-
-```lua
-target("myapp")
-    set_kind("binary")
-    add_files("src/*.cpp")
-    add_packages("fmt", "spdlog", "nlohmann_json")
-```
-
-## Package Sources
-
-Xmake supports multiple package sources:
-
-- Official packages (xmake-repo)
-- Third-party packages
-- Local packages
-- System packages
-
-## Version Management
-
-You can specify package versions:
-
-```lua
-add_packages("[email protected]", "[email protected]")
-```
-
-## Custom Package Repositories
-
-Add your own package repositories:
-
-```lua
-add_repositories("myrepo https://github.com/myorg/xmake-repo")
-```
-
-This advanced package management system makes dependency handling much easier than traditional approaches.

+ 0 - 44
docs/posts/post-5.md

@@ -1,44 +0,0 @@
----
-title: IDE Integration Guide
-date: 2024-01-01
-author: waruqi
-tags: [ide, integration]
----
-
-# IDE Integration Guide
-
-Xmake provides excellent integration with popular IDEs and editors, making development more efficient.
-
-## VS Code Integration
-
-Install the Xmake extension for VS Code:
-
-1. Open VS Code
-2. Go to Extensions (Ctrl+Shift+X)
-3. Search for "Xmake"
-4. Install the extension
-
-## CLion Integration
-
-CLion supports Xmake projects natively:
-
-1. Open CLion
-2. Open your project directory
-3. CLion will automatically detect the xmake.lua file
-4. Configure your run configurations
-
-## Vim/Neovim Integration
-
-For Vim/Neovim users, there are several plugins available:
-
-- xmake.nvim
-- vim-xmake
-
-## Benefits of IDE Integration
-
-- IntelliSense support
-- Debugging integration
-- Build task integration
-- Error highlighting
-
-Proper IDE integration significantly improves the development experience.

+ 0 - 44
docs/posts/post-6.md

@@ -1,44 +0,0 @@
----
-title: IDE Integration Guide
-date: 2024-01-01
-author: waruqi
-tags: [ide, integration]
----
-
-# IDE Integration Guide
-
-Xmake provides excellent integration with popular IDEs and editors, making development more efficient.
-
-## VS Code Integration
-
-Install the Xmake extension for VS Code:
-
-1. Open VS Code
-2. Go to Extensions (Ctrl+Shift+X)
-3. Search for "Xmake"
-4. Install the extension
-
-## CLion Integration
-
-CLion supports Xmake projects natively:
-
-1. Open CLion
-2. Open your project directory
-3. CLion will automatically detect the xmake.lua file
-4. Configure your run configurations
-
-## Vim/Neovim Integration
-
-For Vim/Neovim users, there are several plugins available:
-
-- xmake.nvim
-- vim-xmake
-
-## Benefits of IDE Integration
-
-- IntelliSense support
-- Debugging integration
-- Build task integration
-- Error highlighting
-
-Proper IDE integration significantly improves the development experience.

+ 0 - 44
docs/posts/post-7.md

@@ -1,44 +0,0 @@
----
-title: IDE Integration Guide
-date: 2024-01-01
-author: waruqi
-tags: [ide, integration]
----
-
-# IDE Integration Guide
-
-Xmake provides excellent integration with popular IDEs and editors, making development more efficient.
-
-## VS Code Integration
-
-Install the Xmake extension for VS Code:
-
-1. Open VS Code
-2. Go to Extensions (Ctrl+Shift+X)
-3. Search for "Xmake"
-4. Install the extension
-
-## CLion Integration
-
-CLion supports Xmake projects natively:
-
-1. Open CLion
-2. Open your project directory
-3. CLion will automatically detect the xmake.lua file
-4. Configure your run configurations
-
-## Vim/Neovim Integration
-
-For Vim/Neovim users, there are several plugins available:
-
-- xmake.nvim
-- vim-xmake
-
-## Benefits of IDE Integration
-
-- IntelliSense support
-- Debugging integration
-- Build task integration
-- Error highlighting
-
-Proper IDE integration significantly improves the development experience.

+ 0 - 44
docs/posts/post-8.md

@@ -1,44 +0,0 @@
----
-title: IDE Integration Guide 8
-date: 2024-01-01
-author: waruqi
-tags: [ide, integration]
----
-
-# IDE Integration Guide
-
-Xmake provides excellent integration with popular IDEs and editors, making development more efficient.
-
-## VS Code Integration
-
-Install the Xmake extension for VS Code:
-
-1. Open VS Code
-2. Go to Extensions (Ctrl+Shift+X)
-3. Search for "Xmake"
-4. Install the extension
-
-## CLion Integration
-
-CLion supports Xmake projects natively:
-
-1. Open CLion
-2. Open your project directory
-3. CLion will automatically detect the xmake.lua file
-4. Configure your run configurations
-
-## Vim/Neovim Integration
-
-For Vim/Neovim users, there are several plugins available:
-
-- xmake.nvim
-- vim-xmake
-
-## Benefits of IDE Integration
-
-- IntelliSense support
-- Debugging integration
-- Build task integration
-- Error highlighting
-
-Proper IDE integration significantly improves the development experience.

+ 0 - 44
docs/posts/post-9.md

@@ -1,44 +0,0 @@
----
-title: IDE Integration Guide 9
-date: 2024-01-01
-author: waruqi
-tags: [ide, integration]
----
-
-# IDE Integration Guide
-
-Xmake provides excellent integration with popular IDEs and editors, making development more efficient.
-
-## VS Code Integration
-
-Install the Xmake extension for VS Code:
-
-1. Open VS Code
-2. Go to Extensions (Ctrl+Shift+X)
-3. Search for "Xmake"
-4. Install the extension
-
-## CLion Integration
-
-CLion supports Xmake projects natively:
-
-1. Open CLion
-2. Open your project directory
-3. CLion will automatically detect the xmake.lua file
-4. Configure your run configurations
-
-## Vim/Neovim Integration
-
-For Vim/Neovim users, there are several plugins available:
-
-- xmake.nvim
-- vim-xmake
-
-## Benefits of IDE Integration
-
-- IntelliSense support
-- Debugging integration
-- Build task integration
-- Error highlighting
-
-Proper IDE integration significantly improves the development experience.

+ 200 - 0
docs/posts/quickstart-1-installation.md

@@ -0,0 +1,200 @@
+---
+title: Xmake Getting Started Tutorial 1, Installation and Updates
+tags: [xmake, lua, installation, update]
+date: 2019-11-09
+author: Ruki
+---
+
+Xmake is a lightweight modern C/C++ project build tool based on Lua. Its main features are: easy to use syntax, more readable project maintenance, and a consistent build experience across platforms.
+
+This article mainly explains the installation process of xmake under various platforms.
+
+* [Project Source](https://github.com/xmake-io/xmake)
+* [Official Document](https://xmake.io)
+
+## Install the Master version
+
+Usually we only need to install the script with a one-click installation script.
+
+### Using curl
+
+```bash
+Bash <(curl -fsSL https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.sh)
+```
+
+### Using wget
+
+```bash
+Bash <(wget https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.sh -O -)
+```
+
+### Using powershell
+
+```bash
+Invoke-Expression (Invoke-Webrequest 'https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.ps1' -UseBasicParsing).Content
+```
+
+Note: If the ps script execution prompt fails, you can try to execute in administrator mode.
+
+
+
+
+
+
+
+## Install Windows version
+
+### Using the installation package
+
+Windows provides a pre-made nsis installation package, we can download the installation package directly from github's Releases download page.
+
+1. Download the windows installation package from [Releases] (https://github.com/xmake-io/xmake/releases)
+2. Run the installer xmake-[version].exe
+
+### Using scoop
+
+```bash
+Scoop install xmake
+```
+
+## MacOS
+
+```bash
+$ ruby ​​-e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+$ brew install xmake
+```
+
+or:
+
+1. Download the pkg installation package from [Releases] (https://github.com/xmake-io/xmake/releases)
+2. Double click to run
+
+Or install the master version:
+
+```bash
+# Install the master version using homebrew
+$ brew install xmake --HEAD
+
+# or directly call the shell to download and install
+$ bash <(curl -fsSL https://raw.githubusercontent.com/tboox/xmake/master/scripts/get.sh)
+```
+
+## Linux
+
+Install on archlinux:
+
+```bash
+$ yaourt xmake
+```
+
+Or download the deb package to install:
+
+1. Download the deb installation package from [Releases] (https://github.com/xmake-io/xmake/releases)
+2. Run: `dpkg -i xmake-xxxx.deb`
+
+## Termux
+
+The latest version of xmake already supports termux well, and we usually only need to execute the above one-click installation script. If it fails, please refer to the following to pull the source code to compile and install.
+
+## Source compilation and installation
+
+### Installation
+
+Note: Remember, xmake is not recommended to install under root, so try not to pull down the source to compile and install!
+
+```bash
+$ git clone --recursive https://github.com/xmake-io/xmake.git
+$ cd ./xmake
+$ ./scripts/get.sh __local__
+$ source ~/.xmake/profile
+```
+
+If you think the source of github is too slow, you can pull it through gitee's image source: `clone --recursive https://gitee.com/tboox/xmake.git`
+
+Note: Since the current xmake source maintains dependencies via git submodule, you need to add the `--recursive` parameter to pull all submodules at the same time. Please do not download the tar.gz source directly, because github does not automatically package submodules. Code.
+
+If you forget to add `--recursive` when git clone, you can also execute `git submodule update --init` to pull all submodules, for example:
+
+```bash
+$ git clone https://github.com/xmake-io/xmake.git
+$ cd ./xmake
+$ git submodule update --init
+$ ./scripts/get.sh __local__
+```
+
+Note: `./get.sh __local__` is installed to `~/.local/xmake`, and then loaded by `source ~/.xmake/profile`, so after the installation, the current terminal fails to execute xmake, If the prompt is not found, manually execute `source ~/.xmake/profile`, and the next time you open the terminal, you don't need it.
+
+### Uninstall
+
+```bash
+$ ./scripts/get.sh __uninstall__
+```
+
+### Just update the installation lua script
+
+This developer needs to debug the xmake source locally:
+
+```bash
+$ ./scripts/get.sh __local__ __install_only__
+```
+
+### Root installation
+
+Xmake is not recommended for root installation, because this is very insecure. If the user has to download the root, if the prompt xmake fails to run, please pass the `--root` parameter as prompted or set `XMAKE_ROOT=y`. The environment variable is forcibly enabled, provided that the user needs to pay attention to the risk of incorrect operating system file files under root.
+
+### Dependency issues
+
+1. If you encounter problems with readline, please install readline-devel or libreadline-dev dependencies. This is optional. It is only needed when the `xmake lua` command executes REPL.
+2. If you want to speed up compilation, you can install ccache, xmake will automatically detect and use, which is also optional.
+
+## Other installation methods
+
+Note: This is also the source code compilation and installation, but the installation path will be directly written to `/usr/`, which requires root privileges, so unless special circumstances, this installation method is not recommended, it is recommended to use the `./get. Sh __local__` way to install, the installation path of the two installation methods is different, do not mix.
+
+Compile and install via make:
+
+```bash
+$ make build; sudo make install
+```
+
+Install to other specified directories:
+
+```bash
+$ sudo make install prefix=/usr/local
+```
+
+Uninstall:
+
+```bash
+$ sudo make uninstall
+```
+
+## Update Upgrade
+
+Starting with v2.2.3, the `xmake update` command has been added to quickly update and upgrade itself. The default is to upgrade to the latest version. Of course, you can also specify to upgrade or roll back to a version:
+
+```bash
+$ xmake update 2.2.4
+```
+
+We can also specify an update to the master/dev branch version:
+
+```bash
+$ xmake update master
+$ xmake update dev
+```
+
+Update from the specified git source
+
+```bash
+$ xmake update github:xmake-io/xmake#master
+$ xmake update gitee:tboox/xmake#dev # gitee mirror
+```
+
+If xmake/core hasn't moved, just update the xaake lua script changes, you can add `-s/--scriptonly` to quickly update the lua script.
+
+```bash
+$ xmake update -s dev
+```
+
+Finally, if we want to uninstall xmake, it is also supported: `xmake update --uninstall`

+ 164 - 0
docs/posts/quickstart-2-create-and-build-project.md

@@ -0,0 +1,164 @@
+---
+title: Xmake Getting Started Tutorial 2, Create and build project
+tags: [xmake, lua, c/c++]
+date: 2019-11-09
+author: Ruki
+---
+
+Xmake is a lightweight modern C/C++ project build tool based on Lua. Its main features are: easy to use syntax, more readable project maintenance, and a consistent build experience across platforms.
+
+This article focuses on how to create a xmake-based project and compilation operations.
+
+* [Project Source](https://github.com/xmake-io/xmake)
+* [Official Document](https://xmake.io/)
+
+### Creating an empty project
+
+Xmake provides the `xmake create` command, which makes it easy to quickly create empty projects in various languages such as c/c++, swift, objc, such as:
+
+```bash
+$ xmake create test
+create test ...
+  [+]: xmake.lua
+  [+]: src/main.cpp
+  [+]: .gitignore
+create ok!
+```
+
+By default, a c++ hello world project is created, and a xmake.lua is generated in the root directory to describe the project's build rules.
+
+```lua
+add_rules("mode.debug", "mode.release")
+target("test")
+    set_kind("binary")
+    add_files("src/*.cpp")
+```
+
+
+
+
+
+
+This is a very simple xmake.lua description, `target("test")` defines a sub-project module test, each target will generate a corresponding object file, the binary type here, specify to create a basic executable file.
+
+The top `mode.debug` and `mode.release` rule settings are optional, but we usually recommend adding them so that the default two common build modes are available: debug and release.
+
+### Execution compilation
+
+Usually if we just compile the executable file of the current host environment, we only need to execute the xmake command:
+
+```bash
+$ xmake
+checking for the Xcode directory ... /Applications/Xcode.app
+assessment for the SDK version of Xcode ... 10.15
+[0%]: ccache compiling.release src/main.cpp
+[100%]: linking.release test
+```
+
+Xmake will detect the existing build environment of the current environment by default, such as the author's current xcode environment, and then compile by default release mode. If the `mode.release` rule is set, it will take effect.
+
+### Compile mode switch
+
+And if we want to cut to `mode.debug` compile, we only need to:
+
+```bash
+$ xmake f -m debug
+$ xmake
+```
+
+Among them, `xmake f` is a shorthand for the `xmake config` command, which is used to quickly switch the configuration. If you start with it, it is more convenient to use shorthand. The shorthand for more commands can be executed by `xmake --help`.
+
+### Create another template project
+
+`xmake create` can also be used to create various other types of engineering projects, we can type `xmake create --help` to see:
+
+```bash
+$ xmake create --help
+Usage: $xmake create [options] [target]
+
+Create a new project.
+
+Options:
+                                           
+    -l LANGUAGE, --language=LANGUAGE The project language (default: c++)
+                                               - c++
+                                               - go
+                                               - dlang
+                                               - cuda
+                                               - rust
+                                               - swift
+                                               - objc
+                                               - c
+                                               - objc++
+    -t TEMPLATE, --template=TEMPLATE Select the project template id or name of the given language.
+                                           (default: console)
+                                               - console: c++, go, dlang, cuda, rust, swift, objc, c, objc++
+                                               - qt.console: c++
+                                               - qt.quickapp: c++
+                                               - qt.quickapp_static: c++
+                                               - qt.shared: c++
+                                               - qt.static: c++
+                                               - qt.widgetapp: c++
+                                               - qt.widgetapp_static: c++
+                                               - shared: c++, dlang, cuda, c
+                                               - static: c++, go, dlang, cuda, rust, c
+                                               - tbox.console: c++, c
+                                               - tbox.shared: c++, c
+                                               - tbox.static: c++, c
+                                           
+    Target Create the given target.
+                                           Uses the project name as target if not exists.
+```
+
+From the help menu above, we can probably understand that the engineering language can be specified by `-l/--language`, and `-t/--template` is used to specify the type of project template.
+
+For example, let's create a static library project based on c:
+
+```bash
+$ xmake create -l c -t static test
+create test ...
+  [+]: xmake.lua
+  [+]: src/interface.c
+  [+]: src/interface.h
+  [+]: src/test.c
+  [+]: src/main.cpp
+  [+]: .gitignore
+create ok!
+```
+
+We can also create qt-based quickapp projects:
+
+```bash
+$ xmake create -l c++ -t qt.quickapp test
+create test ...
+  [+]: xmake.lua
+  [+]: src/interface.c
+  [+]: src/main.qml
+  [+]: src/interface.h
+  [+]: src/test.c
+  [+]: src/main.cpp
+  [+]: src/qml.qrc
+  [+]: .gitignore
+create ok!
+```
+
+In addition to the c/c++ project, xmake also supports project compilation in other languages, but xmake focuses on c/c++. Other languages ​​are supported mainly to support mixed compilation with c/c++. After all, other languages ​​have official rust to rust. Provide a better build solution.
+
+But we can still use xmake to try to compile them:
+
+```bash
+$ xmake create -l rust test
+create test ...
+  [+]: xmake.lua
+  [+]: src/main.rs
+  [+]: .gitignore
+create ok!
+```
+
+```bash
+$ xmake
+checking for the architecture ... x86_64
+checking for the Xcode directory ... /Applications/Xcode.app
+assessment for the SDK version of Xcode ... 10.15
+[0%]: linking.release test
+```

+ 100 - 0
docs/posts/quickstart-3-run-and-debug.md

@@ -0,0 +1,100 @@
+---
+title: Xmake Getting Started Tutorial 3, Run and Debug Program
+tags: [xmake, lua, c/c++, run, debug]
+date: 2019-11-09
+author: Ruki
+---
+
+Xmake is a lightweight modern C/C++ project build tool based on Lua. Its main features are: easy to use syntax, more readable project maintenance, and a consistent build experience across platforms.
+
+This article mainly explains in detail how to load and run the compiled target program, and how to debug.
+
+* [Project Source](https://github.com/xmake-io/xmake)
+* [Official Documents](https://xmake.io/)
+
+### Run build target
+
+xmake also provides a run command to directly run the generated executable file for quick and easy testing, for example:
+
+```bash
+$ xmake run
+hello xmake!
+```
+
+#### Adding runtime environment variables
+
+We can also add environment variables to set the default running target program through the `add_runenvs` interface in xmake.lua.
+
+Therefore, for PATH, it is very convenient to append values through this interface, and this interface supports multi-value setting, so it is usually used to set multi-value env with path sep. .
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_runenvs("PATH", "/tmp/bin", "xxx/bin")
+    add_runenvs("LD_LIBRARY_PATH", "/tmp/lib", "xxx/lib")
+```
+
+For more description of this interface, you can see the documentation: [add_runenvs interface documentation](/zh/manual/project_target#add-runenvs)
+
+
+
+
+
+
+#### Custom run logic
+
+If the simple environment settings and the default loading and running rules do not meet the requirements, we can customize the on_run script to achieve more complex running logic:
+
+For example, run the installed apk program:
+
+```lua
+target("test")
+    -- ...
+    -- Set a custom run script, automatically run the installed app, and automatically obtain device output information
+    on_run(function(target)
+        os.run("adb shell am start -n com.demo/com.demo.DemoTest")
+        os.run("adb logcat")
+    end)
+```
+
+### Debugger
+
+#### Command line debugging
+
+We can also pass `-d` parameters, call debugger programs such as gdb/lldb, load the target file for debugging:
+
+
+```bash
+$ xmake run -d
+```
+
+xmake will use the debugger that comes with the system to load the program.currently it supports: lldb, gdb, windbg, vsjitdebugger, ollydbg and other debuggers.
+
+```bash
+[lldb] $ target create "build/hello"
+Current executable set to 'build/hello' (x86_64).
+[lldb] $ b main
+Breakpoint 1: where = hello`main, address = 0x0000000100000f50
+[lldb] $ r
+Process 7509 launched: '/private/tmp/hello/build/hello' (x86_64)
+Process 7509 stopped
+* thread # 1: tid = 0x435a2, 0x0000000100000f50 hello`main, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
+    frame # 0: 0x0000000100000f50 hello`main
+hello`main:
+-> 0x100000f50 <+0>: pushq% rbp
+    0x100000f51 <+1>: movq% rsp,% rbp
+    0x100000f54 <+4>: leaq 0x2b (% rip),% rdi; "hello world!"
+    0x100000f5b <+11>: callq 0x100000f64; symbol stub for: puts
+[lldb] $
+```
+
+#### Breakpoint debugging with vscode
+
+We can also use the [xmake-vscode](https://github.com/xmake-io/xmake-vscode) plugin to cooperate with vscode to implement breakpoint debugging support for c/c++ projects.
+
+In addition, we need to rely on the c++ plug-in of vscode for debugging support, but since developing c/c++ programs, this plug-in is almost necessary, so there is not much problem.
+
+Even if this plugin is not installed, xmake-vscode will load the system debuggers such as lldb/gdb/vsjitdebugger, and directly load and debug.
+
+<img src="/assets/img/posts/xmake/xmake-vscode-debug.gif">

+ 370 - 0
docs/posts/quickstart-4-basic-project-settings.md

@@ -0,0 +1,370 @@
+---
+title: Xmake Getting Started Tutorial 4, C/C++ project description settings
+tags: [xmake, lua, c/c++, run, debug]
+date: 2019-11-10
+author: Ruki
+---
+
+Xmake is a lightweight and modern C/C++ project build tool based on Lua. Its main features are: easy to use syntax, easy to use project maintenance, and a consistent build experience across platforms.
+
+This article mainly explains in detail how to write some commonly used basic xmake.lua description configurations to achieve some simple C/C++ project build management.
+For most small projects, these configurations are completely sufficient. In the later advanced tutorials in this series, I will explain in detail how to use some advanced features to configure the project more flexibly and customized.
+
+* [Project Source](https://github.com/xmake-io/xmake)
+* [Official Documents](https://xmake.io/)
+
+### A simplest example
+
+One line of description compiles all c source files in the src directory, and then generates an executable file named demo.
+
+```lua
+target("demo", {kind = "binary", files = "src/*.c"})
+```
+
+The above is a condensed version. Generally, we recommend the following expansion method:
+
+```lua
+target("demo")
+    set_kind("binary")
+    add_files("src/*.c")
+```
+
+The two are completely equivalent. If the configuration is short, it can be completely reduced to one line, and splitting into multiple lines is more convenient and flexible.
+
+If there is no special purpose, we will use the second paragraph.
+
+### Configure project target type
+
+There are three main types of object files generated by common C/C++ projects: executable programs, static libraries, and dynamic libraries.
+
+We can set it through `set_kind()` configuration, corresponding to: binary, static, shared
+
+For example, if we want to compile the dynamic library, we just need to modify the kind:
+
+```lua
+target("demo")
+    set_kind("shared")
+    add_files("src/*.c")
+```
+
+### Add macro definition
+
+The compilation macro settings are used by most c/c++ projects. Generally, if we set compilation flags to be passed to gcc/clang, we need to configure: `-DXXX`
+
+In xmake, the `add_defines()` built-in interface is provided for configuration:
+
+```lua
+target("demo")
+    set_kind("shared")
+    add_files("src/*.c")
+    add_defines("XXX")
+```
+
+
+
+
+
+
+### Conditional configuration
+
+What if we want to set different macro switches on different compilation platforms? We can easily implement it using lua's built-in if statement:
+
+```lua
+target("demo")
+    set_kind("shared")
+    add_files("src/*.c")
+    add_defines("XXX")
+    if is_plat("linux", "macosx") then
+        add_defines("YYY")
+    end
+```
+
+We judge by `is_plat()`. If the current compilation target platform is linux or macosx, then the target will additionally add the `-DYYY` macro definition.
+
+### Global configuration
+
+All the configurations under `target("demo")` belong to the target subdomain of demo, not global, so you will see that the indentation is usually added to the configuration to highlight the scope of influence. .
+
+Generally, if multiple targets are defined consecutively, the next target definition will automatically end the scope of the previous target. The configuration of each target is completely independent and does not interfere with each other:
+
+```lua
+target("test1")
+    set_kind("shared")
+    add_files("src/*.c")
+    add_defines("TEST1")
+
+target("test2")
+    set_kind("shared")
+    add_files("src/*.c")
+    add_defines("TEST2")
+```
+
+For example, the above configuration has two targets, each with its own independent macro definition: `TEST1` and` TEST2`.
+
+So, we need to set a common macro definition for these two targets. How should we configure it?
+
+`add_defines("TEST")` is configured under each target? Of course it can, but this is a bit redundant, and it will be difficult to maintain if you configure more. In fact, we only need to place it in the global root scope:
+
+```lua
+-- global settings
+add_defines("TEST")
+if is_arch("arm64", "armv7") then
+    add_defines("ARM")
+end
+
+target("test1")
+    set_kind("shared")
+    add_files("src/*.c")
+    add_defines("TEST1")
+
+target("test2")
+    set_kind("shared")
+    add_files("src/*.c")
+    add_defines("TEST2")
+```
+
+All configurations outside the target belong to the global configuration. We can also call `target_end()` to forcibly end the target subdomain and switch back to the global scope:
+
+```lua
+target("test1")
+    set_kind("shared")
+    add_files("src/*.c")
+    add_defines("TEST1")
+target_end()
+
+-- global settings
+add_defines("TEST")
+if is_arch("arm64", "armv7") then
+    add_defines("ARM")
+end
+
+target("test2")
+    set_kind("shared")
+    add_files("src/*.c")
+    add_defines("TEST2")
+target_end()
+```
+
+### Add compilation options
+
+If there are some compilation options, xmake does not provide built-in api settings, then we can degenerate to `add_cflags`,` add_cxflags`, `add_cxxflags` to set,
+However, this requires the user to determine the compilation platform, because not all compilation flags are supported on every platform.
+
+such as:
+
+```lua
+add_cflags("-g", "-O2", "-DDEBUG")
+if is_plat("windows") then
+    add_cflags("/MT")
+end
+```
+
+All option values are based on the definition of gcc as standard. If other compilers are not compatible (for example: vc), xmake will automatically convert them internally to option values supported by the corresponding compiler.
+The user does not need to worry about its compatibility. If other compilers do not have corresponding matching values, xmake will automatically ignore the compiler settings.
+
+We can also force the automatic detection of flags through the force parameter, and pass it directly to the compiler, even if the compiler may not support it, it will be set:
+
+```lua
+add_cflags("-g", "-O2", {force = true})
+```
+
+So how do you know which flags failed to be ignored, you can see with `-v` compilation, such as:
+
+```bash
+$ xmake -v
+checking for the /usr/bin/xcrun -sdk macosx clang ... ok
+checking for the flags(-Oz) ... ok
+checking for the flags(-Wno-error=deprecated-declarations) ... ok
+checking for the flags(-fno-strict-aliasing) ... ok
+checking for the flags(-Wno-error=expansion-to-defined) ... no
+```
+
+Finally, note the differences between these three APIs:
+
+* `add_cflags`: add only C code-related compilation flags
+* `add_cxflags`: add C/c++ code related flags
+* `add_cxxflags`: add only c++ code-related compilation flags
+
+### Add library related settings
+
+For the integrated use of a C/c++ library, you usually need to set the header file search directory, link library name, and library search directory, such as:
+
+```lua
+target("test")
+    set_kind("binary")
+    add_links("pthread")
+    add_includedirs("/usr/local/include")
+    add_linkdirs("/usr/local/lib")
+```
+
+Generally, in order to ensure the dependency order of the linked libraries, the system library links are usually backward. We use `add_syslinks()` to set the system library links specifically, and `add_links()` is usually used for non-system library links:
+
+```lua
+target("test")
+    set_kind("binary")
+    add_links("A", "B")
+    add_syslinks("pthread")
+```
+
+In the above configuration, we added two third-party link libraries: A, B, and the system library pthread. The complete link sequence is: `-lA -lB -lpthread`, and syslinks will be placed at the end.
+
+If you are unsure of the actual linking order, we can execute `xmake -v` compilation to see the complete link parameter command line.
+
+### Setting the language standard
+
+The c standard and c++ standard can be set at the same time, for example:
+
+```lua
+-- set the c code standard: c99, c++ code standard: c++ 11
+set_languages("c99", "c++11")
+```
+
+Note: The specified standard is not set, and the compiler will compile according to this standard. After all, each compiler supports different strengths, but xmake will try its best to adapt to the current standard of the compilation tool.
+
+For example: the compiler for windows vs does not support compiling c code according to the c99 standard, only c89 is supported, but xmake supports it as much as possible, so after setting the c99 standard,
+xmake will compile c code according to c++ code mode, which solves the problem of c code compiling c99 under windows.
+
+### Set compilation optimization
+
+xmake provides several built-in compilation optimization configurations: none, fast, faster, fastest, smallest, aggressive, to achieve various levels of compilation optimization.
+
+```lua
+set_optimize("fastest")
+```
+
+If you set it through flags, you also need to consider the different compilation options of different compilers. Xmake has an internal mapping process for it, which greatly facilitates users to provide cross-platform.
+
+If you want to view detailed mapping rules, you can go to the official documentation of xmake to check it: [Compile Optimization Settings](/zh/manual/project_target#set-optimize)
+
+### Debug and Release Mode
+
+Even though xmake provides `set_optimize` to simplify the complicated configuration of different compilers, for different compilation modes: debug/release, you still have to make some tedious judgments and configurations yourself:
+
+```lua
+if is_mode("debug") then
+    set_symbols("debug")
+    set_optimize("none")
+end
+if is_mode("release") then
+    set_symbols("hidden")
+    set_strip ("all")
+    if is_plat("iphoneos", "android") then
+        set_optimize("smallest")
+    else
+        set_optimize("fastest")
+    end
+end
+```
+
+These seemingly commonly used settings, if each project is repeated, it is also very tedious, resulting in xmake.lua not concise and readable, so xmake provides some commonly used built-in rules to simplify the setting:
+
+```lua
+add_rules("mode.release", "mode.debug")
+```
+
+Only this line is needed, the effect is completely the same, and the user can also do some additional custom configurations to rewrite based on this:
+
+```lua
+add_rules("mode.release", "mode.debug")
+if is_mode("release") then
+    set_optimize("fastest")
+end
+```
+
+For example, I want to force fastest compilation optimization in release mode. Now that we have a mode configuration, how do we switch to debug mode compilation? (Default is release compilation)
+
+answer:
+
+```lua
+xmake f -m debug;
+xmake
+```
+
+### Add source files
+
+Finally, we introduce one of the most common and powerful settings of xmake, which is the configuration management of compiled source files: `add_files()`.
+
+We can use this interface to add various source files supported by xmake, such as: c/c++, asm, objc, swift, go, dlang and other source files, and even: `.obj`, `.a/.lib`, etc. Binary objects and library files.
+
+E.g:
+
+```lua
+add_files("src/test_*.c")
+add_files("src/xxx/**.cpp")
+add_files("src/asm/*.S", "src/objc/**/hello.m")
+```
+
+The wildcard `*` matches files in the current directory, while `**` matches files in multiple directories.
+
+The use of `add_files` is actually quite flexible and convenient. Its matching pattern borrows the style of premake, but it is improved and enhanced.
+
+This makes it possible not only to match files, but also to filter out a batch of files with a specified pattern while adding files.
+
+E.g:
+
+```lua
+-- Recursively add all c files under src, but not all c files under src/impl/
+add_files("src/**.c|impl/*.c")
+
+-- Add all cpp files under src, but exclude src/test.cpp, src/hello.cpp and all cpp files with xx_ prefix under src
+add_files("src/*.cpp|test.cpp|hello.cpp|xx_*.cpp")
+```
+
+The files after the delimiter `|` are all files that need to be excluded. These files also support matching patterns, and multiple filtering patterns can be added at the same time, as long as they are separated by `|`. .
+
+One of the benefits of supporting filtering some files when adding files is that it can provide a basis for subsequent addition of files based on different switch logic.
+
+Note: In order to make the description more concise, the filtering description after `|` is based on a pattern: the directory before `*` in `src/*.cpp`.
+So the above example filters the files under src, which should be noted.
+
+After 2.1.6, `add_files` has been improved to support more fine-grained compilation option control based on files, for example:
+
+```lua
+target("test")
+    add_defines("TEST1")
+    add_files("src/*.c")
+    add_files("test/*.c", "test2/test2.c", {defines = "TEST2", languages = "c99", includedirs = ".", cflags = "-O0"})
+```
+
+You can pass a configuration table in the last parameter of `add_files` to control the compilation options of the specified files. The configuration parameters are the same as those of the target, and these files will inherit the target's general configuration` -DTEST1`.
+
+After version 2.1.9, it supports adding unknown code files. By setting rule customization rules, these files can be custom built, for example:
+
+```lua
+target("test")
+    -- ...
+    add_files("src/test/*. md", {rule = "markdown"})
+```
+
+And after version 2.1.9, you can use the force parameter to forcibly disable the automatic detection of cxflags, cflags and other compilation options, and pass it directly to the compiler, even if the compiler may not support it, it will be set:
+
+```lua
+add_files("src/*.c", {force = {cxflags = "-DTEST", mflags = "-framework xxx"}})
+```
+
+### Delete the specified source file
+
+Now that we ’ve talked about adding source files, how to delete them, let ’s just drop in. We only need to use the `del_files()` interface to delete the specified files from the list of files added by the `add_files` interface. :
+
+```lua
+target("test")
+    add_files("src/*.c")
+    del_files("src/test.c")
+```
+
+In the above example, you can add all files except `test.c` from the` src` directory. Of course, this can also be achieved by `add_files("src/*.c|test.c")`. But this approach is more flexible.
+
+For example, we can use conditional judgment to control which files are deleted, and this interface also supports `add_files` matching mode, filtering mode, and batch removal.
+
+```lua
+target("test")
+    add_files("src/**.c")
+    del_files("src/test * .c")
+    del_files("src/subdir/*.c|xxx.c")
+    if is_plat("iphoneos") then
+        add_files("xxx.m")
+    end
+```
+
+Through the above example, we can see that `add_files` and` del_files` are added and deleted sequentially according to the calling order, and delete one by `del_files("src/subdir/*.c|xxx.c")` Batch file,
+And exclude `src/subdir/xxx.c` (that is, do not delete this file).

+ 140 - 0
docs/posts/quickstart-5-build-android.md

@@ -0,0 +1,140 @@
+---
+title: Xmake Getting Started Tutorial 5, Introduction to Android platform compilation
+tags: [xmake, lua, android, jni]
+date: 2019-11-15
+author: Ruki
+---
+
+xmake is a lightweight and modern c/c++ project building tool based on Lua. It's main features are: easy to use syntax, easy to use project maintenance, 
+and a consistent build experience across platforms.
+
+This article mainly explains in detail how to compile libraries and executable programs that can run under android through xmake.
+
+* [Project Source](https://github.com/xmake-io/xmake)
+* [Official Document](https://xmake.io)
+
+### Ready to work
+
+First of all, we need to prepare the ndk toolchain necessary for compiling the android native library. 
+If you haven’t, you can download and decompress it from the official websit: [Android NDK](https://developer.android.com/ndk)
+
+If you want to get better backward compatibility, you can choose the r16 version, because this is the last version that supports armeabi. If there is no special requirement, you can download the latest version directly.
+
+### NDK integration and compilation
+
+#### Manually configure the NDK
+
+We only need to pass the decompressed ndk directory path to xmake to complete the configuration, and we can compile directly, for example:
+
+```bash
+$ xmake f -p android --ndk=~/downloads/android-ndk-r19c
+$ xmake
+```
+
+Among them, `-p android` is used to switch to the android platform, because if you do not specify a platform, the target program of the current host platform will be compiled by default.
+
+Generally, if there is no special requirement, the above configuration can complete the compilation of the android native program. Currently, xmake has built-in support for the generation of three types of target files: binary, static, and shared, which correspond to executable programs and .a static libraries. .so dynamic library.
+
+
+
+
+
+
+#### Global configuration of NDK paths
+
+The `xmake f/config` command is only for the configuration of the current project. If you often need to set the ndk path again during cross-platform compilation and configuration switching, it is still a little tedious.
+
+We can set it through the `xmake g/global` global configuration command to ensure it takes effect permanently.
+
+```bash
+$ xmake g --ndk=~/xxx/android-ndk-r19c
+```
+
+We can also ensure the permanent effect by setting the `ANDROID_NDK_HOME` global environment variable, which is similar to the effect of the above command configuration.
+
+#### Automatic detection of NDK paths
+
+Generally, even if the ndk path is not configured, xmake will still try to detect some common paths by default. For example, under macos, it will automatically detect whether the following paths exist:
+
+```
+~/Library/Android/sdk/ndk-bundle
+```
+
+This is the SDK directory automatically created by android studio after downloading the Mac, and the common place for the ndk.
+
+Or try to probe from the environment variable `ANDROID_NDK_HOME`, if it exists.
+
+If it can be detected, there is no need to configure it manually.
+
+### C++ STL library configuration switch
+
+First, let’s introduce the three stl library versions provided by ndk.
+
+* stlport: the stl library built in early ndk, now basically obsolete
+* gnustl: stl library mainly used before ndk r16b, but since r16b, it has also been removed by google
+* llvm-c++: newer ndk built-in stl libraries after r16b
+
+Therefore, when we compile the android library, we need to choose stl and choose the appropriate ndk version according to our needs. Xmake usually uses the llvm-c++ library by default if possible. If it finds that the current ndk version is older, it will try to degrade Go to gnustl.
+
+Users can also manually modify the version of the stl library, for example:
+
+```bash
+$ xmake f -p android --ndk=xxxx --ndk_cxxstl=gnustl_shared
+```
+
+Specifically, for the configuration value of the ndk_cxxstl option, you can type help to view, `xmake f --help`, mainly:
+
+* `llvmstl_static`
+* `llvmstl_shared`
+* `gnustl_static`
+* `gnustl_shared`
+* `stlport_static`
+* `stlport_shared`
+
+### API Version Settings
+
+If during the compilation process, some libc library symbols are not found, it is usually possible that the api version is not set correctly, because some libc functions exist only in higher version apis.
+
+At this time, we can solve it by trying to manually modify the api version:
+
+```bash
+$ xmake f -p android --ndk=xxx --ndk_sdkver=16
+```
+
+### Switch compilation architecture
+
+At present xmake provides configuration of these architectures `armv7-a`,` arm64-v8a`, `armv5te`,` mips`, `mips64`,` i386`, `x86_64`. If arch is not specified, then armv7 will be used by default. Architecture.
+
+Manually modify the arch as follows:
+
+```bash
+$ xmake f -p android --ndk=xxx -a arm64-v8a
+```
+
+### Android related configuration settings
+
+If the project needs to configure some compilation settings unique to the android platform, such as adding specific macro switches, link libraries, etc., you can use `is_plat("android")` to determine the processing in xmake.lua.
+
+```lua
+target ("test")
+    set_kind ("shared")
+    add_files ("src/*. c")
+    if is_plat ("android") then
+        add_defines ("ANDROID")
+        add_syslinks ("log")
+    end
+```
+
+### FAQ
+
+#### What should I do if I cannot find some libc/stl library header files?
+
+You can try to modify the stl library version and api version to solve it. For example, ndk r16b recommends using the gnustl library, because this version of the llvmc++ library has just been integrated shortly, there are many problems, and it is easy to encounter various compilation problems during use.
+
+```bash
+$ xmake f -p android --ndk=xxxx --ndk_cxxstl=gnustl_shared --ndk_sdkver=16
+```
+
+#### The compiled executable does not run on the device?
+
+Usually the api version is set too high, causing incompatibility issues, you can try to reduce the api version.

+ 27 - 0
docs/posts/run-target.md

@@ -0,0 +1,27 @@
+---
+title: Run target
+tags: [xmake, run]
+date: 2016-06-26
+author: Ruki
+---
+
+You can use xmake to run the given target and need not know where is the target program.
+
+e.g. 
+
+We define a simple target with named 'test'.
+
+```lua
+    target("test")
+        set_kind("console")
+        add_files("*.c")
+```
+
+So, we can run it directly.
+
+```bash
+    $xmake r test
+    or $xmake run test
+```
+
+xmake will compile it automaticly if the target has not been built.

+ 67 - 0
docs/posts/support-debugger-on-windows.md

@@ -0,0 +1,67 @@
+---
+title: Running and debugging program using xmake
+tags: [xmake, symbolfile, run, debug, windbg, ollydbg, windows]
+date: 2016-07-25
+author: Ruki
+---
+
+xmake can run and debug the given target program now.
+
+We only need configure the debug mode to compile this target and run it.
+
+e.g.
+
+```lua
+
+-- enable debug symbols
+if is_mode("debug")
+    set_symbols("debug")
+end
+
+-- define target
+target("demo")
+    set_kind("kind")
+    add_files("src/*.c")
+```
+
+And we compile and run this program with the debug symbols.
+
+```bash
+$ xmake f -m debug
+$ xmake r -d demo
+```
+
+It will generate pdb debug symbol files and detect the default debugger automatically on windows. (.e.g vsjitdebugger, windbg, ollydbg ...)
+
+![vsjitdebugger](/assets/img/posts/xmake/vsjitdebugger.png)
+
+
+
+
+
+![ollydbg](/assets/img/posts/xmake/ollydbg.png)
+
+
+And we can set the given third-party debugger manually.
+
+
+```bash
+$ xmake f --dd="C:\Program Files\Debugging Tools for Windows (x86)\windbg.exe"
+$ xmake r -d demo 
+```
+
+Or we set it to the global configuration.
+
+```bash
+$ xmake g --dd="C:\Program Files\Debugging Tools for Windows (x86)\windbg.exe"
+```
+
+xmake will load the debugger (lldb or gdb ..) to debug program in default case on macosx and linux.
+
+```bash
+$ xmake r -d demo
+
+$ [lldb]$target create "build/demo"
+  Current executable set to 'build/demo' (x86_64).
+$ [lldb]$
+```

+ 132 - 0
docs/posts/support-qt.md

@@ -0,0 +1,132 @@
+---
+title: XMake, Support for the Qt SDK environment
+tags: [xmake, lua, Qt, Widgets, QuickApplication]
+date: 2018-05-30
+author: Ruki
+---
+
+In the latest [xmake](https://github.com/xmake-io/xmake) v2.2.1 release, we have supported for the QT SDK environment, and we can fully develop QT applications 
+in VScode/Sublime Text/IDEA Intellij and xmake plugin ([xmake-vscode](https://github.com/xmake-io/xmake-vscode), [xmake-idea](https://github.com/tboox/
+xmake-idea) ...).
+
+Users can completely switch to their most commonly used editor environments to develop and build QT programs, such as:
+
+<img src="/assets/img/posts/xmake/vscode-qt.jpeg">
+
+#### Create an empty project from a template
+
+xmake provides some project templates that can be used to quickly create an empty project based on QT, for example:
+
+```console
+$ xmake create -l c++ -t console_qt test
+$ xmake create -l c++ -t static_qt test
+$ xmake create -l c++ -t shared_qt test
+$ xmake create -l c++ -t quickapp_qt test
+```
+
+At present, mainly provide the four types of engineering templates, corresponding to: console programs, static libraries, dynamic libraries, UI applications.
+
+The content of xmake.lua for quickapp is this:
+
+```lua
+target("qt_demo")
+
+    -- add rules
+    add_rules("qt.application")
+
+    -- add headers
+    add_headers("src/*.h")
+
+    -- add files
+    add_files("src/*.cpp") 
+    add_files("src/qml.qrc")
+
+    -- add frameworks
+    add_frameworks("QtQuick")
+```
+
+
+
+
+
+
+
+
+
+
+#### Qt SDK Configuration
+
+The QT environment is automatically detected by xmake by default, but if the QT SDK environment is not found, users can manually specify the QT SDK Environment directory:
+
+```console
+$ xmake f --qt=~/Qt/Qt5.9.1
+```
+
+##### Static Library 
+
+xmake uses the built-in build rule `qt.static` to apply it to target to support the compilation of the QT Static library.
+
+```lua
+target("test")
+    add_rules("qt.static")
+    add_files("src/*.cpp")
+    add_frameworks("QtNetwork", "QtGui")
+```
+
+If you need to use some Qt libraries, you can add them through `add_frameworks`.
+
+Then we can build this program via the following command:
+
+```console
+$ xmake
+```
+
+##### Shared Library
+
+The dynamic library program is similar to the static library description rule described in the previous section, 
+and the only difference is that the build rule is changed to `add_rules("qt.shared")` on the line.
+
+```lua
+target("test")
+    add_rules("qt.shared")
+    add_files("src/*.cpp")
+    add_frameworks("QtNetwork", "QtGui")
+```
+
+##### Console Program
+
+```lua
+target("test")
+    add_rules("qt.console")
+    add_files("src/*.cpp")
+```
+
+##### Quick Application Program
+
+从Qt目前最新的SDK,主要提供了两种ui app的构建框架,Quick App 和 Widgets App,xmake也都进行了支持,并且统一规范成:`qt.application` Qt应用程序规则来简化设置。
+
+```lua
+target("qt_quickapp")
+    add_rules("qt.application")
+    add_files("src/*.cpp") 
+    add_files("src/qml.qrc")
+    add_frameworks("QtQuick")
+```
+
+Note: Although xmake's `add_links` is also used to add dependent libraries for linking, 
+it is recommended that the library provided by the QT SDK be added with `add_frameworks` because all Qt build rules extend to `add_frameworks`.
+
+##### Widgets Application Program
+
+The Widgets app description rule is also `qt.application`, just add the `.ui` file and the only thing to note is that the header file with `Q_OBJECT` meta, for example: `mainwindow.h`.
+
+```lua
+target("qt_widgetapp")
+    add_rules("qt.application")
+    add_files("src/*.cpp") 
+    add_files("src/mainwindow.ui")
+    add_files("src/mainwindow.h")  -- add files with Q_OBJECT meta (only for qt.moc)
+    add_frameworks("QtWidgets")
+```
+
+For more information on QT SDK Environment support, refer to: [#160] (https://github.com/xmake-io/xmake/issues/160)

+ 121 - 0
docs/posts/syntax-style.md

@@ -0,0 +1,121 @@
+---
+title: Two Syntax Styles of xmake
+tags: [xmake, syntax, style]
+date: 2016-11-15
+author: Ruki
+---
+
+Recently, xmake's description syntax has been enhanced to support two different grammar styles at the same time.
+
+* The `set-add` style
+* The `key-val` style
+
+#### The `set-add` style
+
+This is xmake's classic style, for example:
+
+```lua
+target("test")
+    set_kind("static")
+    add_defines("DEBUG")
+    add_files("src/*.c", "test/*.cpp")
+```
+
+* Advantages: more flexible control, you can control a variety of highly complex configuration requirements.
+* Disadvantages: scope control is not obvious, need to manually standardized indentation
+
+#### The `key-val` style
+
+This is added style recently, for example:
+
+```lua
+target
+{
+    name = "test",
+    defines = "DEBUG",
+    files = {"src/*.c", "test/*.cpp"}
+}
+```
+
+* Advantages: more readable
+* Disadvantages: conditional compilation is not very flexible
+
+
+
+
+
+These two styles, xmake are currently compatible with the support, but our recommendations are:
+
+* For simple projects, do not need too complicated conditional compilation, you can use the key-val way, more streamlined, good readability
+* For complex engineering, the need for greater control, and flexibility, it is recommended to use set-add way
+* Try not to mix and write the two styles, although it is supported, but this description of the entire project will feel confused, so try to unify the style as their description of the specification
+
+In addition, not only for target, like option, task, template are supported in two ways to write, for example:
+
+```lua
+-- set-add style
+option("demo")
+    set_default(true)
+    set_showmenu(true)
+    set_category("option")
+    set_description("Enable or disable the demo module", "    =y|n")
+
+-- key-val style
+option
+{
+    name = "demo",
+    default = true,
+    showmenu = true,
+    category = "option",
+    desciption = {"Enable or disable the demo module", "    =y|n"}
+}
+```
+
+The custom tasks or plugins can be written like this:
+
+```lua
+-- set-add style
+task("hello")
+
+    -- on run
+    on_run(function ()
+
+        -- trace
+        print("hello xmake!")
+
+    end)
+
+    -- set menu
+    set_menu({
+                    -- usage
+                    usage = "xmake hello [options]"
+
+                    -- description
+                ,   description = "Hello xmake!"
+
+                    -- options
+                ,   options = {}
+                }) 
+
+-- key-val style
+task
+{
+    name = "hello",
+    run = (function ()
+
+        -- trace
+        print("hello xmake!")
+
+    end),
+    menu = {
+                -- usage
+                usage = "xmake hello [options]"
+
+                -- description
+            ,   description = "Hello xmake!"
+
+                -- options
+            ,   options = {}
+            }
+}
+```

+ 47 - 0
docs/posts/update-v2.0.1.md

@@ -0,0 +1,47 @@
+---
+title: xmake v2.0.1 update!
+tags: [xmake, plugin, task, macro, update]
+date: 2016-06-09
+author: Ruki
+---
+
+[Sources](https://github.com/waruqi/xmake)
+
+# Changelog
+
+### New features
+
+* Add task api for running custom tasks
+* Add plugin expansion and provide some builtin plugins
+* Add export ide project plugin(.e.g makefile and will support to export other projects for vs, xcode in feature)
+* Add demo plugin for printing 'hello xmake'
+* Add make doxygen documents plugin
+* Add macro script plugin
+* Add more modules for developing plugin
+* Add exception using try/catch and simplify grammar for plugin script
+* Add option bindings
+* Show progress when building
+
+### Changes
+
+* Rewrite interpreter for xmake.lua
+* More strict syntax detection mechanism
+* More strict api scope for xmake.lua 
+* Simplify template development
+* Extend platforms, tools, templates and actions fastly
+* Simplify api and support import modules
+* Remove dependence for gnu make/nmake, no longer need makefile
+* Optimize speed for building and faster x4 than v1.0.4
+* Optimize automatic detection 
+* Modify some api name, but be compatible with the old version
+* Optimize merging static library
+* Simplify cross compilation using argument `--sdk=xxx`
+* Simplify boolean option for command line, .e.g `xmake config --xxx=[y|n|yes|no|true|false]`
+* Merge iphoneos and iphonesimulator platforms
+* Merge watchos and watchsimulator platformss
+
+### Bugs fixed
+
+* [#3](https://github.com/waruqi/xmake/issues/3): ArchLinux compilation failed
+* [#4](https://github.com/waruqi/xmake/issues/4): Install failed for windows
+* Fix envirnoment variable bug for windows

+ 27 - 0
docs/posts/update-v2.0.2.md

@@ -0,0 +1,27 @@
+---
+title: xmake v2.0.2 update!
+tags: [xmake, update: xmake.io, windows]
+date: 2016-07-06
+author: Ruki
+---
+
+[Website](https://xmake.io)
+[Sources](https://github.com/waruqi/xmake)
+
+# Changelog
+
+### Changes
+
+* Change install and uninstall actions
+* Update templates
+* Improve to check function 
+
+### Bugs fixed
+
+* [#7](https://github.com/waruqi/xmake/issues/7): Fix create project bug with '[targetname]'
+* [#9](https://github.com/waruqi/xmake/issues/9): Support clang with c++11
+* Fix api scope leaks bug
+* Fix path bug for windows
+* Fix check function bug
+* Fix check toolchains failed
+* Fix compile failed for android on windows 

+ 30 - 0
docs/posts/update-v2.0.3.md

@@ -0,0 +1,30 @@
+---
+title: xmake v2.0.3 update!
+tags: [xmake, update: xmake.io, windows]
+date: 2016-07-17
+author: Ruki
+---
+
+[Website](http://www.xmake.io)
+[Sources](https://github.com/waruqi/xmake)
+
+# Changelog
+
+### New features 
+
+* Add check includes dependence automatically
+* Add print colors 
+* Add debugger support, .e.g `xmake run -d program ...`
+
+### Changes
+
+* Improve the interfaces of run shell
+* Upgrade luajit to v2.0.4
+* Improve to generate makefile plugin
+* Optimizate the multitasking compiling speed
+
+### Bugs fixed
+
+* Fix install directory bug
+* Fix the root directory error for `import` interface
+* Fix check visual stdio error on windows

+ 31 - 0
docs/posts/update-v2.0.4.md

@@ -0,0 +1,31 @@
+---
+title: xmake v2.0.4 released!
+tags: [xmake, version]
+date: 2016-08-29
+author: Ruki
+---
+
+title: xmake v2.0.4 released!
+tags: [xmake, version]
+date: 2016-08-29
+author: Ruki
+
+---
+### New features
+
+* Add native shell support for `xmake.lua`. .e.g `add_ldflags("$(shell pkg-config --libs sqlite3)")`
+* Enable pdb symbol files for windows
+* Add debugger support on windows (vsjitdebugger, ollydbg, windbg ... )
+* Add `getenv` interface for the global scope of `xmake.lua`
+* Add plugin for generating vstudio project file (vs2002 - vs2015)
+* Add `set_default` api for option
+
+### Changes
+
+* Improve builtin-variable format
+* Support option for string type
+
+### Bugs fixed
+
+* Fix check ld failed without g++ on linux 
+* Fix compile `*.cxx` files failed

+ 43 - 0
docs/posts/update-v2.0.5.md

@@ -0,0 +1,43 @@
+---
+title: xmake v2.0.5 released!
+tags: [xmake, version]
+date: 2016-10-30
+author: Ruki
+---
+
+title: xmake v2.0.5 released!
+tags: [xmake, version]
+date: 2016-10-30
+author: Ruki
+
+---
+### New features
+
+* Add some interpreter builtin-modules
+* Support ml64 assembler for windows x64
+
+### Changes
+
+* Improve ipairs and pairs interfaces and support filter
+* Add filters for generating vs201x project
+* Remove `core/tools` (msys toolchains) and uses xmake to compile core sources on windows
+* Remove `xmake/packages` for templates
+
+### Bugs fixed
+
+* Fix `-def:xxx.def` flags failed for msvc
+* Fix ml.exe assembler script
+* Fix options linking order bug
+
+
+
+
+
+
+### Source Code
+
+[Github](https://github.com/waruqi/xmake)
+
+### Documents
+
+[Wiki](https://github.com/waruqi/xmake/wiki)

+ 41 - 0
docs/posts/update-v2.1.1.md

@@ -0,0 +1,41 @@
+---
+title: xmake v2.1.1 released, support golang, dlang and rust languages
+tags: [xmake, lua, version, golang, rust, dlang]
+date: 2017-03-04
+author: Ruki
+---
+
+### New features
+
+* Add `--links`, `--linkdirs` and `--includedirs` configure arguments
+* Add app2ipa plugin
+* Add dictionary syntax style for `xmake.lua`
+* Provide smart scanning and building mode without `xmake.lua`
+* Add `set_xmakever` api for `xmake.lua`
+* Add `add_frameworks` api for `objc` and `swift`
+* Support multi-languages extension and add `golang`, `dlang` and `rust` language
+* Add optional `target_end`, `option_end`, `task_end` apis for scope
+* Add `golang`, `dlang` and `rust` project templates
+
+### Changes
+
+* Support vs2017 for the project plugin
+* Improve gcc error and warning tips
+* Improve lanuage module
+* Improve print interface, support lua print and format output
+* Automatically scan project files and generate it for building if xmake.lua not exists
+* Modify license to Apache License 2.0
+* Remove some binary tools
+* Remove install.bat script and provide nsis install package
+* Rewrite [documents](https://xmake.io/) using [docute](https://github.com/egoist/docute)
+* Improve `os.run`, `os.exec`, `os.cp`, `os.mv` and `os.rm` interfaces and support wildcard pattern
+* Optimize the output info and add `-q|--quiet` option
+* Improve makefile generator, uses $(XX) variables for tools and flags
+
+### Bugs fixed
+
+* [#41](https://github.com/waruqi/xmake/issues/41): Fix checker bug for windows 
+* [#43](https://github.com/waruqi/xmake/issues/43): Avoid to generate unnecessary .xmake directory  
+* Add c++ stl search directories for android
+* Fix compile error for rhel 5.10
+* Fix `os.iorun` bug

+ 106 - 0
docs/posts/update-v2.1.2.md

@@ -0,0 +1,106 @@
+---
+title: xmake v2.1.2 released, Improve vs201x project generator
+tags: [xmake, lua, version, golang, rust, dlang]
+date: 2017-03-23
+author: Ruki
+---
+
+## Links
+
+* [Homepage](http://www.xmake.io/)
+* [Documents](http://www.xmake.io/#home)
+
+### New features
+
+* Add aur package script and support to install xmake from yaourt
+* Add [set_basename](#https://xmake.io/#/manual#targetset_basename) api for target
+
+### Changes
+
+* Support vs2017
+* Support compile rust for android
+* Improve vs201x project plugin and support multi-modes compilation.
+
+### Bugs fixed
+
+* Fix cannot find android sdk header files
+* Fix checking option bug
+* [#57](https://github.com/xmake-io/xmake/issues/57): Fix code files mode to 0644
+
+### Demo
+
+[![build_demo](/assets/img/posts/xmake/build_demo.gif)](https://github.com/xmake-io/xmake)
+
+
+
+
+
+## Introduction 
+
+xmake is a make-like build utility based on lua. 
+
+The project focuses on making development and building easier and provides many features (.e.g package, install, plugin, macro, action, option, task ...), 
+so that any developer can quickly pick it up and enjoy the productivity boost when developing and building project.
+
+## Simple description
+
+```lua
+target("console")
+    set_kind("binary")
+    add_files("src/*.c") 
+```
+
+## Build project
+
+```bash
+$ xmake
+```
+
+## Run target
+
+```bash
+$ xmake run console
+```
+
+## Debug target
+
+```bash
+$ xmake run -d console
+```
+
+## Support features
+
+* Tasks
+* Macros
+* Actions
+* Options
+* Plugins
+* Templates
+
+## Support platforms
+
+* Windows (x86, x64, amd64, x86_amd64)
+* Macosx (i386, x86_64)
+* Linux (i386, x86_64, cross-toolchains ...)
+* Android (armv5te, armv6, armv7-a, armv8-a, arm64-v8a)
+* iPhoneOS (armv7, armv7s, arm64, i386, x86_64)
+* WatchOS (armv7k, i386)
+* Mingw (i386, x86_64)
+
+## Support Languages
+
+* C/C++
+* Objc/Objc++
+* Swift
+* Assembly
+* Golang
+* Rust
+* Dlang
+
+## Builtin Plugins
+
+* Macros script plugin
+* Run the custom lua script plugin
+* Generate IDE project file plugin(makefile, vs2002 - vs2017 .. )
+* Generate doxygen document plugin
+* Convert .app to .ipa plugin

+ 119 - 0
docs/posts/update-v2.1.3.md

@@ -0,0 +1,119 @@
+---
+title: xmake v2.1.3 released, improve security and stability
+tags: [xmake, lua, version]
+date: 2017-04-02
+author: Ruki
+---
+
+## Links
+
+* [Homepage](http://www.xmake.io/)
+* [Documents](http://www.xmake.io/#home)
+
+This version provide safer `xmake install` and `xmake uninstall`.
+
+![safer_installation](/assets/img/posts/xmake/safer_installation.png)
+
+### New features
+
+* [#65](https://github.com/xmake-io/xmake/pull/65): Add `set_default` api for target to modify default build and install behavior
+* Allows to run `xmake` command in project subdirectories, it will find the project root directory automatically
+* Add `add_rpathdirs` for target and option
+
+### Changes
+
+* [#61](https://github.com/xmake-io/xmake/pull/61): Provide safer `xmake install` and `xmake uninstall` task with administrator permission
+* Provide `rpm`, `deb` and `osxpkg` install package
+* [#63](https://github.com/xmake-io/xmake/pull/63): More safer build and install xmake
+* [#61](https://github.com/xmake-io/xmake/pull/61): Check run command as root
+* Improve check toolchains and implement delay checking
+* Add user tips when scanning and generating `xmake.lua` automatically
+
+## Bugs fixed
+
+* Fix error tips for checking xmake min version
+* [#60](https://github.com/xmake-io/xmake/issues/60): Fix self-build for macosx and windows
+* [#64](https://github.com/xmake-io/xmake/issues/64): Fix compile android `armv8-a` error
+* [#50](https://github.com/xmake-io/xmake/issues/50): Fix only position independent executables issue for android program
+
+
+
+
+
+
+
+
+## Introduction 
+
+xmake is a make-like build utility based on lua. 
+
+The project focuses on making development and building easier and provides many features (.e.g package, install, plugin, macro, action, option, task ...), 
+so that any developer can quickly pick it up and enjoy the productivity boost when developing and building project.
+
+## Simple description
+
+```lua
+target("console")
+    set_kind("binary")
+    add_files("src/*.c") 
+```
+
+## Build project
+
+```bash
+$ xmake
+```
+
+## Run target
+
+```bash
+$ xmake run console
+```
+
+## Debug target
+
+```bash
+$ xmake run -d console
+```
+
+## Support features
+
+* Tasks
+* Macros
+* Actions
+* Options
+* Plugins
+* Templates
+
+## Support platforms
+
+* Windows (x86, x64, amd64, x86_amd64)
+* Macosx (i386, x86_64)
+* Linux (i386, x86_64, cross-toolchains ...)
+* Android (armv5te, armv6, armv7-a, armv8-a, arm64-v8a)
+* iPhoneOS (armv7, armv7s, arm64, i386, x86_64)
+* WatchOS (armv7k, i386)
+* Mingw (i386, x86_64)
+
+## Support Languages
+
+* C/C++
+* Objc/Objc++
+* Swift
+* Assembly
+* Golang
+* Rust
+* Dlang
+
+## Builtin Plugins
+
+* Macros script plugin
+* Run the custom lua script plugin
+* Generate IDE project file plugin(makefile, vs2002 - vs2017 .. )
+* Generate doxygen document plugin
+* Convert .app to .ipa plugin
+
+## Demo
+
+[![build_demo](/assets/img/posts/xmake/build_demo.gif)](https://github.com/xmake-io/xmake)
+

+ 163 - 0
docs/posts/update-v2.1.4.md

@@ -0,0 +1,163 @@
+---
+title: xmake v2.1.4 released, support REPL
+tags: [xmake, lua, version]
+date: 2017-05-10
+author: Ruki
+---
+
+## Introduction
+
+`xmake lua` has supported REPL(read-eval-print), we can write and test script more easily now.
+
+Enter interactive mode:
+
+```bash
+$ xmake lua
+> 1 + 2
+3
+
+> a = 1
+> a
+1
+
+> for _, v in pairs({1, 2, 3}) do
+>> print(v)
+>> end
+1
+2
+3
+```
+
+
+
+
+
+
+And we can `import` modules:
+
+```bash
+> task = import("core.project.task")
+> task.run("hello")
+hello xmake!
+```
+
+If you want to cancel multiline input, please input character `q`, for example:
+
+```bash
+> for _, v in ipairs({1, 2}) do
+>> print(v)
+>> q             <--  cancel multiline and clear previous input
+> 1 + 2
+3
+```
+
+## Links
+
+* [Homepage](https://xmake.io/)
+* [Documents](https://xmake.io/)
+
+### New features
+
+* [#68](https://github.com/xmake-io/xmake/issues/68): Add `$(programdir)` and `$(xmake)` builtin variables
+* add `is_host` api to get current host operating system
+* [#79](https://github.com/xmake-io/xmake/issues/79): Improve `xmake lua` to run interactive commands, read-eval-print (REPL)
+
+### Changes
+
+* Modify option menu color.
+* [#71](https://github.com/xmake-io/xmake/issues/71): Improve to map optimization flags for cl.exe
+* [#73](https://github.com/xmake-io/xmake/issues/73): Attempt to get executable path as xmake's program directory
+* Improve the scope of `xmake.lua` in `add_subdirs` and use independent sub-scope to avoid dirty scope
+* [#78](https://github.com/xmake-io/xmake/pull/78): Get terminal size in runtime and soft-wrap the help printing
+* Avoid generate `.xmake` directory if be not in project
+
+### Bugs fixed
+
+* [#67](https://github.com/xmake-io/xmake/issues/67): Fix `sudo make install` permission problem
+* [#70](https://github.com/xmake-io/xmake/issues/70): Fix check android compiler error
+* Fix temporary file path conflict
+* Fix `os.host` and `os.arch` interfaces
+* Fix interpreter bug for loading root api
+* [#77](https://github.com/xmake-io/xmake/pull/77): fix `cprint` no color reset eol
+
+
+
+
+
+
+
+
+## Introduction 
+
+xmake is a make-like build utility based on lua. 
+
+The project focuses on making development and building easier and provides many features (.e.g package, install, plugin, macro, action, option, task ...), 
+so that any developer can quickly pick it up and enjoy the productivity boost when developing and building project.
+
+## Simple description
+
+```lua
+target("console")
+    set_kind("binary")
+    add_files("src/*.c") 
+```
+
+## Build project
+
+```bash
+$ xmake
+```
+
+## Run target
+
+```bash
+$ xmake run console
+```
+
+## Debug target
+
+```bash
+$ xmake run -d console
+```
+
+## Support features
+
+* Tasks
+* Macros
+* Actions
+* Options
+* Plugins
+* Templates
+
+## Support platforms
+
+* Windows (x86, x64, amd64, x86_amd64)
+* Macosx (i386, x86_64)
+* Linux (i386, x86_64, cross-toolchains ...)
+* Android (armv5te, armv6, armv7-a, armv8-a, arm64-v8a)
+* iPhoneOS (armv7, armv7s, arm64, i386, x86_64)
+* WatchOS (armv7k, i386)
+* Mingw (i386, x86_64)
+
+## Support Languages
+
+* C/C++
+* Objc/Objc++
+* Swift
+* Assembly
+* Golang
+* Rust
+* Dlang
+
+## Builtin Plugins
+
+* Macros script plugin
+* Run the custom lua script plugin
+* Generate IDE project file plugin(makefile, vs2002 - vs2017 .. )
+* Generate doxygen document plugin
+* Convert .app to .ipa plugin
+
+## Demo
+
+[![build_demo](/assets/img/posts/xmake/build_demo.gif)](https://github.com/xmake-io/xmake)
+

+ 60 - 0
docs/posts/update-v2.1.5.md

@@ -0,0 +1,60 @@
+---
+title: xmake v2.1.5 released, lots of new feature updates
+tags: [xmake, lua, version, precompiled_header, compiler, cmake]
+date: 2017-08-05
+author: Ruki
+---
+
+This release introduces a number of new feature updates, as detailed in [Some new features of xmake v2.1.5](http://tboox.org/2017/07/29/new-features-v2.1.5/).
+
+If you want to known more usage, please see [online documents](https://xmake.io)。
+
+Source code: [Github](https://github.com/xmake-io/xmake), [Gitee](https://gitee.com/tboox/xmake).
+
+### New features
+
+* [#83](https://github.com/xmake-io/xmake/issues/83): Add `add_csnippet` and `add_cxxsnippet` into `option` for detecting some compiler features.
+* [#83](https://github.com/xmake-io/xmake/issues/83): Add user extension modules to detect program, libraries and files.
+* Add `find_program`, `find_file`, `find_library`, `find_tool` and `find_package` module interfaces.
+* Add `net.*` and `devel.*` extension modules
+* Add `val()` api to get the value of builtin-variable, .e.g `val("host")`, `val("env PATH")`, `val("shell echo hello")` and `val("reg HKEY_LOCAL_MACHINE\\XX;Value")`
+* Support to compile the microsoft resource file (.rc)
+* Add `has_flags`, `features` and `has_features` for detect module interfaces.
+* Add `option.on_check`, `option.after_check` and `option.before_check` api
+* Add `target.on_load` api
+* [#132](https://github.com/xmake-io/xmake/issues/132): Add `add_frameworkdirs` api
+* Add `lib.detect.has_xxx` and `lib.detect.find_xxx` apis.
+* Add `add_moduledirs` api
+* Add `includes` api instead of `add_subdirs` and `add_subfiles`
+* [#133](https://github.com/xmake-io/xmake/issues/133): Improve the project plugin to generate `compile_commands.json` by run  `xmake project -k compile_commands`
+* Add `set_pcheader` and `set_pcxxheader` to support the precompiled header, support gcc, clang, msvc
+* Add `xmake f -p cross` platform and support the custom platform
+
+### Changes
+
+* [#87](https://github.com/xmake-io/xmake/issues/87): Add includes and links from target deps automatically 
+* Improve `import` to load user extension and global modules
+* [#93](https://github.com/xmake-io/xmake/pull/93): Improve `xmake lua` to run a single line command
+* Improve to print gcc error and warning info
+* Improve `print` interface to dump table
+* [#111](https://github.com/xmake-io/xmake/issues/111): Add `--root` common option to allow run xmake command as root
+* [#113](https://github.com/xmake-io/xmake/pull/113): Privilege manage when running as root, store the root privilege and degrade.
+* Improve `xxx_script` in `xmake.lua` to support pattern match, .e.g `on_build("iphoneos|arm*", function (target) end)`
+* improve builtin-variables to support to get the value envirnoment and registry
+* Improve to detect vstudio sdk and cross toolchains envirnoment
+* [#71](https://github.com/xmake-io/xmake/issues/71): Improve to detect compiler and linker from env vars
+* Improve the option detection (cache and multi-jobs) and increase 70% speed
+* [#129](https://github.com/xmake-io/xmake/issues/129): Check link deps and cache the target file
+* Support `*.asm` source files for vs201x project plugin
+* Mark `add_bindings` and `add_rbi€ndings` as deprecated
+* Optimize `xmake rebuild` speed on windows
+* Move `core.project.task` to `core.base.task`
+* Move `echo` and `app2ipa` plugins to [xmake-plugins](https://github.com/xmake-io/xmake-plugins) repo.
+* Add new api `set_config_header("config.h", {prefix = ""})` instead of `set_config_h` and `set_config_h_prefix`
+
+### Bugs fixed
+
+* Fix `try-catch-finally`
+* Fix interpreter bug when parsing multi-level subdirs
+* [#115](https://github.com/xmake-io/xmake/pull/115): Fix the path problem of the install script `get.sh`
+* Fix cache bug for import()

+ 30 - 0
docs/posts/update-v2.1.6.md

@@ -0,0 +1,30 @@
+---
+title: xmake v2.1.6 released, fix some bugs
+tags: [xmake, lua, released]
+date: 2017-08-16
+author: Ruki
+---
+
+This release fixed some bugs and improve some compilation problem.
+
+If you want to known more usage, please see [online documents](https://xmake.io)。
+
+Source code: [Github](https://github.com/xmake-io/xmake), [Gitee](https://gitee.com/tboox/xmake).
+
+### Changes
+
+* Improve `add_files` to configure the compile option of the given files
+* Inherit links and linkdirs from the dependent targets and options
+* Improve `target.add_deps` and add inherit config, .e.g `add_deps("test", {inherit = false})`
+* Remove the binary files of `tbox.pkg`
+* Use `/Zi` instead of `/ZI` for msvc
+
+### Bugs fixed
+
+* Fix target deps
+* Fix `target:add` and `option:add` bug
+* Fix compilation and installation bug on archlinux
+
+### Usage Video
+
+<script type="text/javascript" src="https://asciinema.org/a/133693.js" id="asciicast-133693" async></script>

+ 44 - 0
docs/posts/update-v2.1.7.md

@@ -0,0 +1,44 @@
+---
+title: xmake v2.1.7 released, fix some bugs and improve some details
+tags: [xmake, lua, update]
+date: 2017-10-13
+author: Ruki
+---
+
+This release fix some bugs and improve some details. And provide [xmake-vscode](https://marketplace.visualstudio.com/items?itemName=tboox.xmake-vscode#overview) plugins to integrate vscode editor and xmake.
+
+If you want to known more usage, please see [online documents](https://xmake.io)。
+
+Source code: [Github](https://github.com/xmake-io/xmake), [Gitee](https://gitee.com/tboox/xmake).
+
+### New features
+
+* Add `add_imports` to bulk import modules for the target, option and package script
+* Add `xmake -y/--yes` to confirm the user input by default
+* Add `xmake l package.manager.install xxx` to install software package
+* Add xmake plugin for vscode editor, [xmake-vscode](https://marketplace.visualstudio.com/items?itemName=tboox.xmake-vscode#overview)
+* Add `xmake macro ..` to run the last command
+
+### Changes
+
+* Support 24bits truecolors for `cprint()`
+* Support `@loader_path` and `$ORIGIN` for `add_rpathdirs()`
+* Improve `set_version("x.x.x", {build = "%Y%m%d%H%M"})` and add build version
+* Move docs directory to xmake-docs repo
+* Improve install and uninstall actions and support DESTDIR and PREFIX envirnoment variables
+* Optimize to detect flags
+* Add `COLORTERM=nocolor` to disable color output
+* Remove `and_bindings` and `add_rbindings` api
+* Disable to output colors code to file
+* Update project templates with tbox
+* Improve `lib.detect.find_program` interface
+* Enable colors output for windows cmd
+* Add `-w|--warning` arguments to enable the warnings output
+
+### Bugs fixed
+
+* Fix `set_pcxxheader` bug
+* [#140](https://github.com/xmake-io/xmake/issues/140): Fix `os.tmpdir()` in fakeroot
+* [#142](https://github.com/xmake-io/xmake/issues/142): Fix `os.getenv` charset bug on windows
+* Fix compile error with spaces path
+* Fix setenv empty value bug

+ 38 - 0
docs/posts/update-v2.1.8.md

@@ -0,0 +1,38 @@
+---
+title: xmake v2.1.8 released, improve IDE/Editor plugin integration
+tags: [xmake, lua, update]
+date: 2017-11-08
+author: Ruki
+---
+
+This release improve IDE/Editor plugin integration, we provide the following plugins now:
+
+- Vim Editor Plugin
+  - [xmake.vim](https://github.com/luzhlon/xmake.vim) (third-party, thanks [@luzhlon](https://github.com/luzhlon))
+- Visual Studio Code Editor Plugin ([xmake-vscode](https://github.com/xmake-io/xmake-vscode))
+- Sublime Text Editor Plugin ([xmake-sublime](https://github.com/xmake-io/xmake-sublime))
+- IntelliJ-based IDE Plugin ([xmake-idea](https://github.com/xmake-io/xmake-idea))
+  - IntelliJ-IDEA 
+  - CLion 
+  - Android Studio 
+
+If you want to known more usage, please see [online documents](https://xmake.io/)。
+
+Source code: [Github](https://github.com/xmake-io/xmake), [Gitee](https://gitee.com/tboox/xmake).
+
+### New features
+
+* Add `XMAKE_LOGFILE` environment variable to dump the output info to file
+* Support tinyc compiler
+
+### Changes
+
+* Improve support for IDE/editor plugins (.e.g vscode, sublime, intellij-idea)
+* Add `.gitignore` file when creating new projects
+* Improve to create template project
+* Improve to detect toolchains on macosx without xcode
+* Improve `set_config_header` to support `set_config_header("config", {version = "2.1.8", build = "%Y%m%d%H%M"})`
+
+### Bugs fixed
+
+* [#145](https://github.com/xmake-io/xmake/issues/145): Fix the current directory when running target

+ 100 - 0
docs/posts/update-v2.1.9.md

@@ -0,0 +1,100 @@
+---
+title: xmake v2.1.9 released, provide user custom menu config
+tags: [xmake, lua, update]
+date: 2018-02-03
+author: Ruki
+---
+
+This release provide user custom menu config, like `make menuconfig` for linux:
+
+<img src="/assets/img/posts/xmake/menuconf.gif">
+
+If you want to known more usage, please see [online documents](https://xmake.io/)。
+
+Source code: [Github](https://github.com/xmake-io/xmake), [Gitee](https://gitee.com/tboox/xmake).
+
+### New features
+
+* Add `del_files()` api to delete files in the files list
+* Add `rule()`, `add_rules()` api to implement the custom build rule and improve `add_files("src/*.md", {rule = "markdown"})`
+* Add `os.filesize()` api
+* Add `core.ui.xxx` cui components
+* Add `xmake f --menu` to configure project with a menu configuration interface
+* Add `set_values` api to `option()`
+* Support to generate a menu configuration interface from user custom project options
+* Add source file position to interpreter and search results in menu
+
+### Changes
+
+* Improve to configure cross-toolchains, add tool alias to support unknown tool name, .e.g `xmake f [email protected]`
+* [#151](https://github.com/xmake-io/xmake/issues/151): Improve to build the share library for the mingw platform
+* Improve to generate makefile plugin
+* Improve the checking errors tips
+* Improve `add_cxflags` .., force to set flags without auto checking: `add_cxflags("-DTEST", {force = true})`
+* Improve `add_files`, add force block to force to set flags without auto checking: `add_files("src/*.c", {force = {cxflags = "-DTEST"}})`
+* Improve to search the root project directory
+* Improve to detect vs environment
+* Upgrade luajit to 2.1.0-beta3
+* Support to run xmake on linux (arm, arm64)
+* Improve to generate vs201x project plugin
+
+### Bugs fixed
+
+* Fix complation dependence
+* [#151](https://github.com/xmake-io/xmake/issues/151): Fix `os.nuldev()` for gcc on mingw
+* [#150](https://github.com/xmake-io/xmake/issues/150): Fix the command line string limitation for `ar.exe`
+* Fix `xmake f --cross` error
+* Fix `os.cd` to the windows root path bug
+
+### New features introduction
+
+#### Add config options in menu 
+
+configuration menu:
+
+- root menu
+  - test1
+  - test2
+  - test3
+    - test3
+  - test4
+
+
+<img src="/assets/img/posts/xmake/option_set_category.gif">
+
+
+
+
+
+```lua
+-- 'boolean' option
+option("test1")
+    set_default(true)
+    set_showmenu(true)
+    set_category("root menu/test1")
+
+-- 'choice' option with values: "a", "b", "c"
+option("test2")
+    set_default("a")
+    set_values("a", "b", "c")
+    set_showmenu(true)
+    set_category("root menu/test2")
+
+-- 'string' option
+option("test3")
+    set_default("xx")
+    set_showmenu(true)
+    set_category("root menu/test3/test3")
+
+-- 'number' option
+option("test4")
+    set_default(6)
+    set_showmenu(true)
+    set_category("root menu/test4")
+```
+
+
+
+#### Search configuration
+
+<img src="/assets/img/posts/xmake/searchconf.gif">

+ 323 - 0
docs/posts/update-v2.2.1.md

@@ -0,0 +1,323 @@
+---
+title: xmake v2.2.1 released, Support Qt, WDK and Cuda Compilation Environments
+tags: [xmake, lua, update: Qt, WDK, Cuda]
+date: 2018-06-17
+author: Ruki
+---
+
+title: xmake v2.2.1 released, Support Qt, WDK and Cuda Compilation Environments
+tags: [xmake, lua, update: Qt, WDK, Cuda]
+date: 2018-06-17
+author: Ruki
+
+---
+To make [xmake](https://github.com/xmake-io/xmake) more convenient and flexible to support other compilation environments, I spent four months to upgrade [custom rule rules](https://xmake.io/#/manual#custom-rule).
+
+Users can now implement various compilation rules by customizing the rules, and xmake also has built-in common compilation rules that can be applied directly to the current project to support QT, WDK driver and Cuda compilation environments.
+
+* [Github Repo](https://github.com/xmake-io/xmake)
+* [Online documents](https://xmake.io)
+
+Relative articles:
+
+* [XMake: Support for the Qt SDK environment](http://tboox.org/2018/05/30/support-qt/)
+
+### New features
+
+* [#158](https://github.com/xmake-io/xmake/issues/158): Support CUDA Toolkit and Compiler
+* Add `set_tools` and `add_tools` apis to change the toolchains for special target
+* Add builtin rules: `mode.debug`, `mode.release`, `mode.profile` and `mode.check`
+* Add `is_mode`, `is_arch` and `is_plat` builtin apis in the custom scripts
+* Add color256 codes
+* [#160](https://github.com/xmake-io/xmake/issues/160): Support Qt compilation environment and add `qt.console`, `qt.application` rules
+* Add some Qt project templates
+* [#169](https://github.com/xmake-io/xmake/issues/169): Support yasm for linux, macosx and windows
+* [#159](https://github.com/xmake-io/xmake/issues/159): Support WDK driver compilation environment 
+
+### Changes
+
+* Add FAQ to the auto-generated xmake.lua
+* Support android NDK >= r14
+* Improve warning flags for swiftc
+* [#167](https://github.com/xmake-io/xmake/issues/167): Improve custom rules
+* Improve `os.files` and `os.dirs` api
+* [#171](https://github.com/xmake-io/xmake/issues/171): Improve build dependence for qt rule
+* Implement `make clean` for generating makefile plugin
+
+### Bugs fixed
+
+* Fix force to add flags bug
+* [#157](https://github.com/xmake-io/xmake/issues/157): Fix generate pdb file error if it's output directory does not exists
+* Fix strip all symbols bug for macho target file
+* [#168](https://github.com/xmake-io/xmake/issues/168): Fix generate vs201x project bug with x86/x64 architectures
+
+
+
+
+
+
+### Introduction to New features
+
+#### Qt Program
+
+Create an empty project:
+
+```console
+$ xmake create -l c++ -t console_qt test
+$ xmake create -l c++ -t static_qt test
+$ xmake create -l c++ -t shared_qt test
+$ xmake create -l c++ -t quickapp_qt test
+```
+
+xmake will detect Qt SDK automatically and we can also set the SDK directory manually.
+
+```console
+$ xmake f --qt=~/Qt/Qt5.9.1
+```
+
+If you want to known more information, you can see [#160](https://github.com/xmake-io/xmake/issues/160).
+
+##### Static Library
+
+```lua
+target("qt_static_library")
+    add_rules("qt.static")
+    add_files("src/*.cpp")
+    add_frameworks("QtNetwork", "QtGui")
+```
+
+##### Shared Library
+
+```lua
+target("qt_shared_library")
+    add_rules("qt.shared")
+    add_files("src/*.cpp")
+    add_frameworks("QtNetwork", "QtGui")
+```
+
+##### Console Program
+
+```lua
+target("qt_console")
+    add_rules("qt.console")
+    add_files("src/*.cpp")
+```
+
+##### Quick Application
+
+```lua
+target("qt_quickapp")
+    add_rules("qt.application")
+    add_files("src/*.cpp") 
+    add_files("src/qml.qrc")
+    add_frameworks("QtQuick")
+```
+
+##### Widgets Application
+
+```lua
+target("qt_widgetapp")
+    add_rules("qt.application")
+    add_files("src/*.cpp") 
+    add_files("src/mainwindow.ui")
+    add_files("src/mainwindow.h")  -- add files with Q_OBJECT meta (only for qt.moc)
+    add_frameworks("QtWidgets")
+```
+
+#### Cuda Program
+
+Create an empty project:
+
+```console
+$ xmake create -P test -l cuda
+$ cd test
+$ xmake
+```
+
+```lua
+target("cuda_console")
+    set_kind("binary")
+    add_files("src/*.cu")
+
+    -- generate SASS code for each SM architecture
+    for _, sm in ipairs({"30", "35", "37", "50", "52", "60", "61", "70"}) do
+        add_cuflags("-gencode arch=compute_" .. sm .. ",code=sm_" .. sm)
+        add_ldflags("-gencode arch=compute_" .. sm .. ",code=sm_" .. sm)
+    end
+
+    -- generate PTX code from the highest SM architecture to guarantee forward-compatibility
+    sm = "70"
+    add_cuflags("-gencode arch=compute_" .. sm .. ",code=compute_" .. sm)
+    add_ldflags("-gencode arch=compute_" .. sm .. ",code=compute_" .. sm)
+```
+
+xmake will detect Cuda SDK automatically and we can also set the SDK directory manually.
+
+```console
+$ xmake f --cuda=/usr/local/cuda-9.1/ 
+$ xmake
+```
+
+If you want to known more information, you can see [#158](https://github.com/xmake-io/xmake/issues/158).
+
+#### WDK Driver Program
+
+xmake will detect WDK automatically and we can also set the WDK directory manually.
+
+```console
+$ xmake f --wdk="G:\Program Files\Windows Kits\10" -c
+$ xmake
+```
+
+If you want to known more information, you can see [#159](https://github.com/xmake-io/xmake/issues/159).
+
+##### UMDF Driver Program
+
+```lua
+target("echo")
+    add_rules("wdk.driver", "wdk.env.umdf")
+    add_files("driver/*.c") 
+    add_files("driver/*.inx")
+    add_includedirs("exe")
+
+target("app")
+    add_rules("wdk.binary", "wdk.env.umdf")
+    add_files("exe/*.cpp") 
+```
+
+##### KMDF Driver Program
+
+```lua
+target("nonpnp")
+    add_rules("wdk.driver", "wdk.env.kmdf")
+    add_values("wdk.tracewpp.flags", "-func:TraceEvents(LEVEL,FLAGS,MSG,...)", "-func:Hexdump((LEVEL,FLAGS,MSG,...))")
+    add_files("driver/*.c", {rule = "wdk.tracewpp"}) 
+    add_files("driver/*.rc")
+
+target("app")
+    add_rules("wdk.binary", "wdk.env.kmdf")
+    add_files("exe/*.c") 
+    add_files("exe/*.inf")
+```
+
+##### WDM Driver Program
+
+```lua
+target("kcs")
+    add_rules("wdk.driver", "wdk.env.wdm")
+    add_values("wdk.man.flags", "-prefix Kcs")
+    add_values("wdk.man.resource", "kcsCounters.rc")
+    add_values("wdk.man.header", "kcsCounters.h")
+    add_values("wdk.man.counter_header", "kcsCounters_counters.h")
+    add_files("*.c", "*.rc", "*.man") 
+```
+
+```lua
+target("msdsm")
+    add_rules("wdk.driver", "wdk.env.wdm")
+    add_values("wdk.tracewpp.flags", "-func:TracePrint((LEVEL,FLAGS,MSG,...))")
+    add_files("*.c", {rule = "wdk.tracewpp"}) 
+    add_files("*.rc", "*.inf")
+    add_files("*.mof|msdsm.mof")
+    add_files("msdsm.mof", {values = {wdk_mof_header = "msdsmwmi.h"}}) 
+```
+
+##### Package Driver 
+
+We can run the following command to generate a .cab driver package.
+
+```console
+$ xmake [p|package]
+$ xmake [p|package] -o outputdir
+```
+
+The output files like:
+
+```
+  - drivers
+    - sampledsm
+       - debug/x86/sampledsm.cab
+       - release/x64/sampledsm.cab
+       - debug/x86/sampledsm.cab
+       - release/x64/sampledsm.cab
+```
+
+##### Driver Signing
+
+The driver signing is disabled when we compile driver in default case, 
+but we can add `set_values("wdk.sign.mode")` to enable test/release sign.
+
+###### TestSign
+
+We can use test certificate of xmake to do testsign, but please run `$xmake l utils.wdk.testcert` install as admin to install a test certificate first (only once)!
+
+```lua
+target("msdsm")
+    add_rules("wdk.driver", "wdk.env.wdm")
+    set_values("wdk.sign.mode", "test")
+```
+
+Or we set a valid certificate thumbprint to do it in local machine.
+
+```lua
+target("msdsm")
+    add_rules("wdk.driver", "wdk.env.wdm")
+    set_values("wdk.sign.mode", "test")
+    set_values("wdk.sign.thumbprint", "032122545DCAA6167B1ADBE5F7FDF07AE2234AAA")
+```
+
+We can also do testsign via setting store/company info.
+
+```lua
+target("msdsm")
+    add_rules("wdk.driver", "wdk.env.wdm")
+    set_values("wdk.sign.mode", "test")
+    set_values("wdk.sign.store", "PrivateCertStore")
+    set_values("wdk.sign.company", "tboox.org(test)")
+```
+
+###### ReleaseSign
+
+We can set a certificate file for release signing.
+
+```lua
+target("msdsm")
+    add_rules("wdk.driver", "wdk.env.wdm")
+    set_values("wdk.sign.mode", "release")
+    set_values("wdk.sign.company", "xxxx")
+    set_values("wdk.sign.certfile", path.join(os.projectdir(), "xxxx.cer"))
+```
+
+##### Support Low-version System
+
+We can set `wdk.env.winver` to generate a driver package that is compatible with a low version system.
+
+```lua
+set_values("wdk.env.winver", "win10")
+set_values("wdk.env.winver", "win10_rs3")
+set_values("wdk.env.winver", "win81")
+set_values("wdk.env.winver", "win8")
+set_values("wdk.env.winver", "win7")
+set_values("wdk.env.winver", "win7_sp1")
+set_values("wdk.env.winver", "win7_sp2")
+set_values("wdk.env.winver", "win7_sp3")
+```
+
+We can also set windows version for WDK driver program:
+
+```console
+$ xmake f --wdk_winver=[win10_rs3|win8|win7|win7_sp1]
+$ xmake
+```
+
+#### WinSDK Application Program
+
+```lua
+target("usbview")
+    add_rules("win.sdk.application")
+
+    add_files("*.c", "*.rc")
+    add_files("xmlhelper.cpp", {rule = "win.sdk.dotnet"})
+```
+
+If you want to known more information, you can see [#173](https://github.com/xmake-io/xmake/issues/173).

+ 8 - 0
docs/posts/usage-demo.md

@@ -0,0 +1,8 @@
+---
+title: An usage demo of xmake
+tags: [xmake, lua, usage, demo]
+date: 2017-01-18
+author: Ruki
+---
+
+[![usage_demo](/assets/img/posts/xmake/usage_demo.gif)](/project)

+ 3 - 2
docs/posts/xmake-3-0-release.md

@@ -1,8 +1,9 @@
 ---
+---
 title: Announcing Xmake 3.0
-date: 2024-01-15
-author: waruqi
 tags: [release, xmake, build-system]
+date: 2024-01-15
+author: Ruki
 ---
 
 We are excited to announce the release of Xmake 3.0! This major release brings significant improvements in performance, usability, and feature completeness.

+ 685 - 0
docs/posts/xmake-and-package-management.md

@@ -0,0 +1,685 @@
+---
+title: Xmake and C/C++ Package Management
+tags: [xmake, lua, C/C++, Package, Manager]
+date: 2022-03-12
+author: Ruki
+---
+
+[Xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build tool based on Lua.
+We have done a detailed introduction to Xmake and build system in previous articles. Introduction: [C/C++ build system, I use xmake](https://github.com/xmake-io/xmake/wiki/C-and-Cplusplus-build-system,-I-use-xmake).
+
+If you already have a general understanding of Xmake, you will know that it is not only a build tool,
+but also has built-in support for C/C++ package management. We can also understand Xmake as:
+
+```
+Xmake = Build backend + Project Generator + Package Manager
+```
+
+After several years of continuous iteration, Xmake's support for C/C++ package management has been continuously improved,
+and many useful package management features have been added. Therefore, in this article, we will make some summaries on it, hoping to help everyone.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+### Build system and package management
+
+The ecology of C++ is very complex, and there are certain historical reasons for this.
+In any case, the official does not provide native package management support.
+For our developers, it is somewhat inconvenient to use third-party C++ dependent libraries.
+
+In fact, there are already many powerful C/C++ package managers, the most well-known and most used are: vcpkg, conan, conda, etc.
+Although they are very powerful, they have a common problem: The build system doesn't have built-in support for them.
+
+Since CMake does not provide built-in support for them, it is very cumbersome to use them in CMake to integrate dependencies,
+and the way of integration and use is inconsistent.
+
+#### Using Conan with CMake
+
+To use conan to integrate C/C++ packages in CMake, we need to provide additional CMake Wrapper scripts and
+inject them into our own projects in a similar way as plug-ins.
+
+
+
+
+
+
+```cmake
+cmake_minimum_required(VERSION 3.5)
+project(FormatOutput CXX)
+
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
+list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
+
+add_definitions("-std=c++11")
+
+if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
+  message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
+  file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/v0.16.1/conan.cmake"
+                "${CMAKE_BINARY_DIR}/conan.cmake"
+                EXPECTED_HASH SHA256=396e16d0f5eabdc6a14afddbcfff62a54a7ee75c6da23f32f7a31bc85db23484
+                TLS_VERIFY ON)
+endif()
+
+include(${CMAKE_BINARY_DIR}/conan.cmake)
+
+conan_cmake_configure(REQUIRES fmt/6.1.2
+                      GENERATORS cmake_find_package)
+
+conan_cmake_autodetect(settings)
+
+conan_cmake_install(PATH_OR_REFERENCE .
+                    BUILD missing
+                    REMOTE conancenter
+                    SETTINGS ${settings})
+
+find_package(fmt)
+
+add_executable(main main.cpp)
+target_link_libraries(main fmt::fmt)
+```
+
+In order to integrate a package, a lot of additional scripts need to be configured.
+
+#### Using Vcpkg with CMake
+
+To use the vcpkg integration package in CMake, we also need to inject an additional toolchain script file.
+
+```bash
+cmake -B [build directory] -S . -DCMAKE_TOOLCHAIN_FILE=[path to vcpkg]/scripts/buildsystems/vcpkg.cmake
+cmake --build [build directory]
+```
+
+In addition, there is another problem, that is, we need to additionally call the `vcpkg install [packages]` command to install this package.
+
+Each of these links requires an additional exploration process for users, and it is impossible to achieve real one-click compilation.
+
+When we download a cmake project that integrates the vcpkg package, and if we want to compile it,
+what additional things need to be done in addition to the project configuration:
+
+1. Install vcpkg
+2. Execute `vcpkg install xxx` to install the required packages
+3. Execute cmake to pass the vcpkg.cmake script to cmake for project configuration
+
+#### Using FetchContent in CMake
+
+CMake can also provide `FetchContent` to manage dependencies, but it seems to need download source code,
+and all dependencies must be maintained and built based on CMake.
+
+In addition, we need to configure various package information such as url, version, etc. for each dependency.
+
+```cmake
+cmake_minimum_required(VERSION 3.14)
+project(fetchContent_example CXX)
+
+include(FetchContent)
+
+FetchContent_Declare(
+        DocTest
+        GIT_REPOSITORY "https://github.com/onqtam/doctest"
+        GIT_TAG "932a2ca50666138256dae56fbb16db3b1cae133a"
+)
+FetchContent_Declare(
+        Range-v3
+        GIT_REPOSITORY "https://github.com/ericniebler/range-v3"
+        GIT_TAG "4d6a463bca51bc316f9b565edd94e82388206093"
+)
+
+FetchContent_MakeAvailable(DocTest Range-v3)
+
+add_executable(${PROJECT_NAME} src/main.cpp)
+target_link_libraries(${PROJECT_NAME} doctest range-v3)
+```
+
+#### Using dependencies in Meson
+
+Meson is very powerful and also provides its own package management support,
+but it is also cumbersome to use other package managers in Meson, such as vcpkg/conan, etc., and does not provide builtin support.
+
+#### Using dependencies in Xmake
+
+Xmake not only provides a built-in [xmake-repo](https://github.com/xmake-io/xmake-repo) package management repository,
+which can be directly integrated and used, but also supports the same integration method to quickly integrate third-party dependencies such as vcpkg/conan.
+
+we need only a few lines of configuration to integrate a built-in dependency package:
+
+```lua
+add_requires("zlib 1.2.11")
+target("test")
+    add_files("src/*.c")
+    add_packages("zlib")
+```
+
+To integrate a vcpkg package, we only need to add the corresponding package manager namespace. like this:
+
+```lua
+add_requires("vcpkg::zlib 1.2.11")
+target("test")
+    add_files("src/*.c")
+    add_packages("vcpkg::zlib")
+```
+
+To integrate a conan package, or a third-party package such as conda, homebrew, pacman, apt, clib, etc., we only need to change it to `conan::zlib`, and users can switch package sources at will.
+
+In addition, Xmake will automatically call the `vcpkg/conan install` installation command for you to install the dependent packages, and then integrate them, without requiring the user to do anything else, just execute `xmake` one-click compilation.
+
+<img src="/assets/img/index/package_manage.png" width="650px" />
+
+### Too few C/C++ packages?
+
+Do you think there are too few packages in the built-in package repository of Xmake?
+It doesn't matter at all. In theory, you can use 90% of the common dependencies in the entire C/C++ ecosystem through Xmake,
+because Xmake can quickly integrate packages from various other package managers to use.
+
+The package sources currently supported by Xmake are as follows:
+
+* Official package repository [xmake-repo](https://github.com/xmake-io/xmake-repo) (tbox >1.6.1)
+* Official package manager [Xrepo](https://github.com/xmake-io/xrepo)
+* [User-built repositories](/zh/guide/package-management/package-distribution)
+* Conan (conan::openssl/1.1.1g)
+* Conda (conda::libpng 1.3.67)
+* Vcpkg (vcpkg:ffmpeg)
+* Homebrew/Linuxbrew (brew::pcre2/libpcre2-8)
+* Pacman on archlinux/msys2 (pacman::libcurl)
+* Apt on ubuntu/debian (apt::zlib1g-dev)
+* Clib (clib::clibs/[email protected])
+* Dub (dub::log 0.4.3)
+* Portage on Gentoo/Linux (portage::libhandy)
+* Nimble for nimlang (nimble::zip >1.3)
+* Cargo for rust (cargo::base64 0.13.0)
+
+Basically, these repositories have basically covered all the packages that C/C++ users need on a daily basis.
+
+We counted the number of packages in the vcpkg/conan/xmake-repo repositories:
+
+* vcpkg: 1859
+* conan: 1218
+* xmake-repo: 651
+
+It can be seen that the current number of packages in Xmake's built-in repository is approaching vcpkg/conan, and there are quite a few, and we are constantly including new packages.
+
+But that doesn't matter at all because we can use packages from any package repository.
+
+If we use vcpkg in CMake, we can only use 1859 packages.
+If we use conan in CMake, we can only use 1218 packages.
+
+And if using packages in Xmake, we can use packages in 651 (xmake-repo) + vcpkg/conan (1k+) + more (conda, homebrew, pacman, apt, clib ...).
+
+Even if C/C++ packages are not enough, packages from other languages can also be used. For example, Xmake also supports pulling packages from Dlang/Rust package managers such as dub/cargo for use in C/C++ projects.
+
+### Xmake built-in package management integration
+
+In addition to accessing third-party package management, we also recommend using the packages provided in the integrated xmake-repo built-in repository first, and Xmake will provide more feature support.
+
+Therefore, if the package you need has not been included, you can try to submit it to [xmake-repo](https://github.com/xmake-io/xmake-repo) first.
+
+Next, we systematically introduce some features of the integrated built-in package.
+
+#### Semantic Versioning Settings
+
+Xmake's dependency package management fully supports semantic version selection, for example: "~1.6.1", for the specific description of semantic version, see: [https://semver.org/](https://semver.org/)
+
+For example, some semantic versions are written as follows:
+
+```lua
+add_requires("tbox 1.6.*", "pcre 1.3.x", "libpng ^1.18")
+add_requires("libpng ~1.16", "zlib 1.1.2 || >=1.2.11 <1.3.0")
+```
+
+Of course, if we have no special requirements for the version of the current dependency package, we can write it directly like this:
+
+```lua
+add_requires("tbox", "libpng", "zlib")
+```
+
+This will use the latest known version of the package, or a package compiled from the source code of the master branch. If the current package has a git repo address, we can also specify a specific branch version:
+
+```lua
+add_requires("tbox master")
+add_requires("tbox dev")
+```
+
+Xmake's semantic versioning support has been well supported for a few years, and vcpkg has barely supported it through manifest mode in the last year.
+
+Even now, vcpkg's support for version semantics is very limited, it can only support several version modes such as `>=1.0`, `1.0`, and you want to select any version of the package, such as `>=1.0 <1.5` and other complex Version-conditional packages, vcpkg still cannot support.
+
+#### Optional package settings
+
+If the specified dependency package is not supported by the current platform, or the compilation and installation fails, Xmake will compile and report an error, which is reasonable for some projects that must depend on certain packages to work.
+But if some packages are optional dependencies, they can be compiled and used normally even if they are not available, they can be set as optional packages:
+
+```lua
+add_requires("tbox", {optional = true})
+```
+
+#### Using system libraries
+
+By default, Xmake will firstly detect whether the system library exists (if no version requirement is set). If the user does not want to use the system library and the library provided by the third-party package management, you can set:
+
+```lua
+add_requires("tbox", {system = false})
+```
+
+And if configured as:
+
+```lua
+add_requires("tbox", {system = true})
+```
+
+It just finds and uses the system library, and does not download and install it remotely.
+This is similar to CMake's find_package, but the integration method is simpler and more consistent.
+
+
+#### Use debug builds of packages
+
+If we want to debug the dependency package at the same time, we can set it to use the debug version of the package (of course, the premise is that this package supports debug compilation):
+
+```lua
+add_requires("tbox", {debug = true})
+```
+
+#### Enable optional features of the package
+
+We can also install packages with specific features, such as installing the ffmpeg package with zlib and libx265 enabled.
+
+```lua
+add_requires("ffmpeg", {configs = {zlib = true, libx265 = true}})
+```
+
+#### Pass additional compile options
+
+We can also pass additional compile options to the package:
+
+
+```lua
+add_requires("spdlog", {configs = {cxflags = "-Dxxx"}})
+```
+
+### Standalone package management commands Xrepo
+
+Xrepo is a cross-platform C/C++ package manager based on [Xmake](https://github.com/xmake-io/xmake).
+
+It is a command program independent of Xmake, which is used to assist users to manage dependency packages, similar to vcpkg/conan, but compared with them, it has some additional practical features, we will briefly introduce some.
+
+![](https://xrepo.xmake.io/assets/img/xrepo.gif)
+
+#### Multiple repository management
+
+In addition to retrieving the installation package directly from the official repository: [xmake-repo](https://github.com/xmake-io/xmake-repo),
+We can also add any number of self-built repositories, and even completely isolate the external network, and only maintain the installation and integration of private packages on the company's internal network.
+
+Just add your own repository url with the following command:
+
+```bash
+$ xrepo add-repo myrepo https://github.com/mygroup/myrepo
+```
+
+#### Basic usage
+
+```bash
+$ xrepo install zlib tbox
+```
+
+#### Install the specified version package
+
+Full support for Semantic Versioning.
+
+```bash
+$ xrepo install "zlib 1.2.x"
+$ xrepo install "zlib >=1.2.0"
+```
+
+#### Install the specified platform package
+
+```bash
+$ xrepo install -p iphoneos -a arm64 zlib
+$ xrepo install -p android [--ndk=/xxx] zlib
+$ xrepo install -p mingw [--mingw=/xxx] zlib
+$ xrepo install -p cross --sdk=/xxx/arm-linux-musleabi-cross zlib
+```
+
+#### Install debug version package
+
+```bash
+$ xrepo install -m debug zlib
+```
+
+#### Install dynamic library version package
+
+```bash
+$ xrepo install -k shared zlib
+```
+
+#### Install the specified configuration package
+
+```bash
+$ xrepo install -f "vs_runtime=MD" zlib
+$ xrepo install -f "regex=true,thread=true" boost
+```
+
+#### Install packages from third-party package managers
+
+```bash
+$ xrepo install brew::zlib
+$ xrepo install vcpkg::zlib
+$ xrepo install conan::zlib/1.2.11
+```
+
+#### View the library usage information of the package
+
+```bash
+$ xrepo fetch pcre2
+{
+  {
+    linkdirs = {
+      "/usr/local/Cellar/pcre2/10.33/lib"
+    },
+    links = {
+      "pcre2-8"
+    },
+    defines = {
+      "PCRE2_CODE_UNIT_WIDTH=8"
+    },
+    includedirs = "/usr/local/Cellar/pcre2/10.33/include"
+  }
+}
+```
+
+```bash
+$ xrepo fetch --ldflags openssl
+-L/Users/ruki/.xmake/packages/o/openssl/1.1.1/d639b7d6e3244216b403b39df5101abf/lib -lcrypto -lssl
+```
+
+```bash
+$ xrepo fetch --cflags openssl
+-I/Users/ruki/.xmake/packages/o/openssl/1.1.1/d639b7d6e3244216b403b39df5101abf/include
+```
+
+```bash
+$ xrepo fetch -p [iphoneos|android] --cflags "zlib 1.2.x"
+-I/Users/ruki/.xmake/packages/z/zlib/1.2.11/df72d410e7e14391b1a4375d868a240c/include
+```
+
+```bash
+$ xrepo fetch --cflags --ldflags conan::zlib/1.2.11
+-I/Users/ruki/.conan/data/zlib/1.2.11/_/_/package/f74366f76f700cc6e991285892ad7a23c30e6d47/include -L/Users/ruki/.conan/data/zlib/1.2.11/_/_/package /f74366f76f700cc6e991285892ad7a23c30e6d47/lib -lz
+```
+
+#### Import and export installed packages
+
+xrepo can quickly export installed packages, including corresponding library files, header files, etc.
+
+```bash
+$ xrepo export -o /tmp/output zlib
+```
+
+You can also import the previously exported installation package on other machines to implement package migration.
+
+```bash
+$ xrepo import -i /xxx/packagedir zlib
+```
+
+#### Search for supported packages
+
+```bash
+$ xrepo search zlib "pcr*"
+    zlib:
+      -> zlib: A Massively Spiffy Yet Delicately Unobtrusive Compression Library (in xmake-repo)
+    pcr*:
+      -> pcre2: A Perl Compatible Regular Expressions Library (in xmake-repo)
+      -> pcre: A Perl Compatible Regular Expressions Library (in xmake-repo)
+```
+
+In addition, you can now search for their packages from third-party package managers such as vcpkg, conan, conda and apt, just add the corresponding package namespace, for example:
+
+```bash
+$ xrepo search vcpkg::pcre
+The package names:
+    vcpkg::pcre:
+      -> vcpkg::pcre-8.44#8: Perl Compatible Regular Expressions
+      -> vcpkg::pcre2-10.35#2: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library
+```
+
+```bash
+$ xrepo search conan::openssl
+The package names:
+    conan::openssl:
+      -> conan::openssl/1.1.1g:
+      -> conan::openssl/1.1.1h:
+```
+
+#### Package virtual environment management
+
+We can customize some package configurations by adding the xmake.lua file in the current directory, and then enter a specific package shell environment.
+
+```lua
+add_requires("zlib 1.2.11")
+add_requires("python 3.x", "luajit")
+```
+
+```bash
+$ xrepo env shell
+> python --version
+> luajit --version
+```
+
+### Integrate third-party build systems in Xmake
+
+#### Integrate Cmake projects in Xmake
+
+Xmake does not intend to split the C/C++ ecosystem. It can be well and compatible with existing projects maintained by cmake/autoconf/meson. For example, some other code libraries maintained by CMake can be directly integrated locally and participate in mixed compilation.
+
+In other words, Xmake will not force users to re-port all projects to xmake.lua, and existing CMake projects can be quickly integrated into Xmake projects.
+
+For example, we have the following project structure:
+
+```
+├── foo
+│ ├── CMakeLists.txt
+│ └── src
+│ ├── foo.c
+│ └── foo.h
+├── src
+│ └── main.c
+├── test.lua
+└── xmake.lua
+```
+
+The foo directory is a static library maintained by CMake, and the root directory is maintained by Xmake. We can describe how to build the foo code base by defining the `package("foo")` package in xmake.lua.
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+package("foo")
+    add_deps("cmake")
+    set_sourcedir(path.join(os.scriptdir(), "foo"))
+    on_install(function (package)
+        local configs = {}
+        table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
+        table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
+        import("package.tools.cmake").install(package, configs)
+    end)
+    on_test(function (package)
+        assert(package:has_cfuncs("add", {includes = "foo.h"}))
+    end)
+package_end()
+
+add_requires("foo")
+
+target("demo")
+    set_kind("binary")
+    add_files("src/main.c")
+    add_packages("foo")
+```
+
+Among them, we use `set_sourcedir()` to set the code directory location of the foo package, and then import the `package.tools.cmake` auxiliary module to call cmake to build the code, xmake will automatically obtain the generated libfoo.a and the corresponding header document.
+
+!> For local source integration only, we don't need to set additional `add_urls` and `add_versions`.
+
+Once the package is defined, we can use it through `add_requires("foo")` and `add_packages("foo")`, just like integrating a remote package.
+
+Also, `on_test` is optional, if you want strictTo check whether the compilation and installation of the package is successful, you can do some tests in it.
+
+For a complete example, see: [Library with CMakeLists](https://github.com/xmake-io/xmake/tree/master/tests/projects/c/library_with_cmakelists)
+
+#### Integrate the Meson project in Xmake
+
+Xmake supports the integration of more third-party source code libraries maintained by other build systems, such as Meson, just need to import and use the `package.tools.meson` auxiliary building module to call meson to build them.
+
+For example, let's pick a package built with meson from the xmake-repo repository as an example:
+
+```lua
+package("harfbuzz")
+    set_sourcedir(path.join(os.scriptdir(), "3rd/harfbuzz"))
+    add_deps("meson")
+    on_install(function (package)
+        local configs = {"-Dtests=disabled", "-Ddocs=disabled", "-Dbenchmark=disabled", "-Dcairo=disabled", "-Dfontconfig=disabled", "-Dglib=disabled", "-Dgobject= disabled"}
+        table.insert(configs, "-Ddefault_library=" .. (package:config("shared") and "shared" or "static"))
+        import("package.tools.meson").install(package, configs)
+    end)
+```
+
+#### Integrate Autoconf project in Xmake
+
+We can also use `package.tools.autoconf` to natively integrate third-party codebases with autoconf maintenance.
+
+```lua
+package("libev")
+    set_sourcedir(path.join(os.scriptdir(), "3rd/libev"))
+    on_install(function (package)
+        import("package.tools.autoconf").install(package)
+    end)
+```
+
+Both `package.tools.autoconf` and `package.tools.cmake` modules can support cross-compilation platforms and toolchains such as mingw/cross/iphoneos/android, xmake will automatically pass the corresponding toolchain into it, users do not need to do any other thing.
+
+#### Integrate Gn project in Xmake
+
+We can also use `package.tools.gn` to natively integrate third-party codebases maintained by GN.
+
+```lua
+package("skia")
+    set_sourcedir(path.join(os.scriptdir(), "3rd/skia"))
+    add_deps("gn", "ninja")
+    on_install(function (package)
+        import("package.tools.gn").install(package)
+    end)
+```
+
+Here is the complete script example: [Skia with GN](https://github.com/xmake-io/xmake-repo/blob/master/packages/s/skia/xmake.lua)
+
+### Find packages using CMake/C++ in Xmake
+
+Now CMake is the de facto standard, so the find_package provided by CMake can already find a large number of system libraries and modules. We can also fully reuse this part of the ecology of CMake to expand xmake's integration of packages.
+
+Just change the package namespace to `cmake::` like integrating the vcpkg/conan package.
+
+```lua
+add_requires("cmake::ZLIB", {alias = "zlib", system = true})
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("zlib")
+```
+
+We specify `system = true` to tell xmake to force cmake to find the package from the system. If it can't find it, it will not follow the installation logic, because cmake does not provide the installation function of package managers such as vcpkg/conan, but only provides package search. characteristic.
+
+#### Specify the version
+
+```lua
+add_requires("cmake::OpenCV 4.1.1", {system = true})
+```
+
+#### Specify components
+
+```lua
+add_requires("cmake::Boost", {system = true, configs = {components = {"regex", "system"}})}
+```
+
+#### Preset switch
+
+```lua
+add_requires("cmake::Boost", {system = true, configs = {components = {"regex", "system"},
+                                             presets={Boost_USE_STATIC_LIB=true}}})
+```
+
+It is equivalent to pre-define some configurations in CMakeLists.txt before calling find_package to find packages internally to control the search strategy and status of find_package.
+
+```
+set(Boost_USE_STATIC_LIB ON) -- will be used in FindBoost.cmake
+find_package(Boost REQUIRED COMPONENTS regex system)
+```
+
+#### Setting environment variables
+
+```lua
+add_requires("cmake::OpenCV", {system = true, configs = {envs = {CMAKE_PREFIX_PATH = "xxx"}}})
+```
+
+#### Specify custom FindFoo.cmake module script directory
+
+mydir/cmake_modules/FindFoo.cmake
+
+```lua
+add_requires("cmake::Foo", {system = true, configs = {moduledirs = "mydir/cmake_modules"}})
+```
+
+
+### Integrate Xrepo dependencies in Cmake
+
+In addition to integrating CMake projects in Xmake, we can also directly integrate the packages provided by Xmake/Xrepo in CMake, just use [xrepo-cmake](https://github.com/xmake-io/xrepo-cmake) to provide CMake Wrapper.
+
+E.g:
+
+```cmake
+cmake_minimum_required(VERSION 3.13.0)
+project(foo)
+
+# Download xrepo.cmake if not exists in build directory.
+if(NOT EXISTS "${CMAKE_BINARY_DIR}/xrepo.cmake")
+    message(STATUS "Downloading xrepo.cmake from https://github.com/xmake-io/xrepo-cmake/")
+    # mirror https://cdn.jsdelivr.net/gh/xmake-io/xrepo-cmake@main/xrepo.cmake
+    file(DOWNLOAD "https://raw.githubusercontent.com/xmake-io/xrepo-cmake/main/xrepo.cmake"
+                  "${CMAKE_BINARY_DIR}/xrepo.cmake"
+                  TLS_VERIFY ON)
+endif()
+
+# Include xrepo.cmake so we can use xrepo_package function.
+include(${CMAKE_BINARY_DIR}/xrepo.cmake)
+
+xrepo_package("zlib")
+
+add_executable(example-bin "")
+target_sources(example-bin PRIVATE
+    src/main.cpp
+)
+xrepo_target_packages(example-bin zlib)
+```
+
+#### Add package with configuration
+
+We, too, can customize the optional features of packages, as in Xmake.
+
+```cmake
+xrepo_package("gflags 2.2.2" CONFIGS "shared=true,mt=true")
+
+add_executable(example-bin "")
+target_sources(example-bin PRIVATE
+    src/main.cpp
+)
+xrepo_target_packages(example-bin gflags)
+```
+
+#### Using packages from third repository
+
+In addition to installing packages from repositories officially maintained by Xmake, we can also use it directly in CMake to install packages from third-party repositories, just by adding the repository name as a namespace.
+
+For example: `vcpkg::zlib`, `conan::pcre2`.
+
+```cmake
+xrepo_package("conan::gflags/2.2.2")
+xrepo_package("conda::gflags 2.2.2")
+xrepo_package("vcpkg::gflags")
+xrepo_package("brew::gflags")
+```
+
+In this way, we unify the way we integrate and use vcpkg/conan packages in CMake, and additionally provide automatic package installation features, as well as support for other package repositories such as homebrew/conda.

+ 131 - 0
docs/posts/xmake-c++20-modules.md

@@ -0,0 +1,131 @@
+---
+title: Uses xmake to build c++20 modules
+tags: [xmake, lua, c++20, modules-ts]
+date: 2019-09-22
+author: Ruki
+---
+
+c++ modules have been officially included in the c++20 draft, and msvc and clang have been basically implemented on [modules-ts](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019 /p1103r3.pdf) Support, as c++20's footsteps are getting closer and closer to us, xmake has also begun to support c++modules in advance.
+
+At present xmake has fully supported the implementation of the modules-ts of msvc/clang. For gcc, since its cxx-modules branch is still under development, it has not officially entered the master. I have read the changelog inside, and the related flags are still in the process. Constantly changing, I feel that it has not stabilized, so I have not supported it yet.
+
+For more information about xmake's progress on c++modules: [https://github.com/xmake-io/xmake/pull/569](https://github.com/xmake-io/xmake/pull/569)
+
+* [Github Source](https://github.com/xmake-io/xmake)
+* [Official Document](https://xmake.io/)
+
+### Hello Module
+
+I will not talk about the introduction of c++modules. This is mainly about how to build a c++modules project under xmake. Let's look at a simple example:
+
+```lua
+target("hello")
+    set_kind("binary")
+    add_files("src/*.cpp", "src/*.mpp")
+```
+
+The above is a description of the xmake.lua that supports building c++modules files, where `hello.mpp` is the module file:
+
+```c
+#include <cstdio>
+export module hello;
+using namespace std;
+
+export namespace hello {
+    void say(const char* str) {
+        printf("%s\n", str);
+    }
+}
+```
+
+Main.cpp is the main program that uses the hello module:
+
+```c
+import hello;
+
+int main() {
+    hello::say("hello module!");
+    return 0;
+}
+```
+
+Next we execute xmake to build this program:
+
+```console
+ruki:hello ruki$ xmake
+[0%]: ccache compiling.release src/hello.mpp
+[50%]: ccache compiling.release src/main.cpp
+[100%]: linking.release hello
+build ok!
+```
+
+
+
+
+
+
+
+
+xmake will handle all the details logic internally, for developers, just add the module file `*.mpp` as the source file.
+
+### Module Interface File
+
+The above mentioned `*.mpp` is the module interface file name recommended by xmake. In fact, the default suffix names of the compiler files are not uniform. clang is `*.cppm`, while msvc is `*.ixx`, which is very unfriendly for writing a unified module project across compilers.
+Therefore, reference is made to the recommendation method in [build2](https://build2.org/doc/modules-cppcon2017.pdf), and the unified `*.mpp` suffix is used to standardize the command of the module project interface under xmake.
+
+Of course, this also supports xmake's recommended naming scheme. For suffixes such as `*.ixx` and `*.cppm`, xmake is also fully compatible and can be added directly to `add_files`.
+
+### Compile parameter processing
+
+#### clang
+
+Let's first look at how to handle module construction under clang. We only need to add -v to execute xmake build, we can see all the details parameters:
+
+```console
+ruki:hello ruki$ xmake -v
+[0%]: ccache compiling.release src/hello.mpp
+/usr/local/bin/ccache /usr/bin/xcrun -sdk macosx clang -c -fmodules-ts --precompile -x c++-module -Qunused-arguments -arch x86_64 -fpascal-strings -fmessage-length=0 - Mmacosx-version-min=10.14 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -o build/.objs/hello/macosx/x86_64/release/ Src/hello.mpp.o.pcm src/hello.mpp
+/usr/local/bin/ccache /usr/bin/xcrun -sdk macosx clang -c -fmodules-ts -Qunused-arguments -arch x86_64 -fpascal-strings -fmessage-length=0 -mmacosx-version-min=10.14 - Isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -o build/.objs/hello/macosx/x86_64/release/src/hello.mpp.o build /.objs/hello/macosx/x86_64/release/src/hello.mpp.o.pcm
+[ 50%]: ccache compiling.release src/main.cpp
+/usr/local/bin/ccache /usr/bin/xcrun -sdk macosx clang -c -fmodules-ts -fmodule-file=build/.objs/hello/macosx/x86_64/release/src/hello.mpp.o. Pcm -Qunused-arguments -arch x86_64 -fpascal-strings -fmessage-length=0 -mmacosx-version-min=10.14 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10 .14.sdk -o build/.objs/hello/macosx/x86_64/release/src/main.cpp.o src/main.cpp
+[100%]: linking.release hello
+"/usr/bin/xcrun -sdk macosx clang++" -o build/macosx/x86_64/release/hello build/.objs/hello/macosx/x86_64/release/src/hello.mpp.o build/.objs/hello/ Macosx/x86_64/release/src/main.cpp.o -arch x86_64 -mmacosx-version-min=10.14 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14 .sdk -stdlib=libc++ -lz
+build ok!
+```
+
+We simplify it as follows:
+
+```console
+clang -c -fmodules-ts --precompile -x c++-module -o hello.mpp.o.pcm src/hello.mpp
+clang -c -fmodules-ts -o hello.mpp.o hello.mpp.o.pcm
+clang -c -fmodules-ts -fmodule-file=hello.mpp.o.pcm -o main.cpp.o src/main.cpp
+clang++ -o hello hello.mpp.o main.cpp.o
+```
+
+`-fmodules-ts` is used to enable the c++-modules module standard, `--precompile` is used to precompile the module interface file. Since `*.mpp` is not the default module interface file name of the compiler, xmake is added. `-x c++-module` to force compilation as a module interface file.
+
+Compile the `*.mpp` module interface file, and finally generate the `*.pcm` module file and finally tell the clang compiler by `-fmodule-file`. We define the hello module in main.cpp where we compile, avoid compiling main. A compiler error undefined by the hello module occurs at .cpp.
+
+Finally, clang++ links all object files, including the object files generated by hello.mpp, into the target program.
+
+#### msvc
+
+For the processing under msvc, I will not elaborate, in fact, the whole logic is similar, I will directly paste the execution of the command process:
+
+```console
+Cl.exe -c /experimental:module /module:interface /module:output hello.mpp.obj.pcm /TP -nologo -Fohello.mpp.obj src\\hello.mpp
+Cl.exe -c /experimental:module /module:reference hello.mpp.obj.pcm -nologo -Fomain.cpp.obj src\\main.cpp
+Link.exe -nologo -dynamicbase -nxcompat -machine:x64 -out:hello.exe hello.mpp.obj main.cpp.obj
+```
+
+#### gcc
+
+Originally, I wanted to add gcc to it. Later, I found that gcc support for c++modules is still maintained in an independent branch. I have not yet entered the master. If I want to use it, I have to check the cxx-modules branch code separately. To compile a gcc toolchains that supports c++modules.
+
+And the use of flags inside is often changing, I feel that it has not been completely stabilized, so I am lazy to toss here, when to support the official version of gcc.
+
+For more information on the implementation of gcc's modules-ts implementation, please refer to: https://gcc.gnu.org/wiki/cxx-modules
+
+### Other examples
+
+There are also a lot of engineering examples related to c++modules built into the xmake project. Interested students can refer to the following: [c++module examples](https://github.com/xmake-io/xmake/tree/dev/tests/projects/c%2B%2B/modules)

+ 193 - 0
docs/posts/xmake-gradle-v1.0.7.md

@@ -0,0 +1,193 @@
+---
+title: xmake-gradle v1.0.7 released, Integrate xmake to quickly build Android JNI program
+tags: [xmake, lua, C/C++, android, jni]
+date: 2020-04-17
+author: Ruki
+---
+
+[xmake-gradle](https://github.com/xmake-io/xmake-gradle) is a gradle plugin that integrates xmake seamlessly. 
+
+At present, there are two ways to do integrated development of android jni in gradle. It is supported by ndkBuild or CMake. Gradle also has built-in integration of these two tools.
+
+However, maintaining Android.mk is still very tedious, especially for large projects, and the dsl syntax of cmake is not simple and intuitive, and I personally don't like it very much. Therefore, I have used xmake to implement cross-platform development. It's simple, fast, friendly to novices, and it's also very powerful. You can go to the xmake project homepage to see the introduction.
+
+In the past, if you want to use xmake to compile the android so library, you can only use the command line, such as:
+
+```bash
+xmake f -p android --ndk=xxxx
+xmake
+```
+
+Although it is very simple, but if you want to package and integrate with android apk/aar, still need a lot of extra work. In order to improve the efficiency of developers, I recently reorganized this gradle plugin to seamlessly integrate into the entire gradle build System.
+
+In this way, users can easily use xmake to compile the jni library in android studio, and automatic integration.
+
+In addition, the relevant gradle configuration is basically the same as cmake and ndkbuild, most of them are compatible, and the switching cost will also be reduced a lot.
+
+Everyone is welcome to try it, the newly released plugin, if you want to know more, please refer to:
+
+* [项目源码](https://github.com/xmake-io/xmake-gradle)
+* [官方文档](/zh/guide/extensions/builtin-plugins#gradle)
+
+## Prerequisites
+
+XMake installed on the system. Available [here](https://github.com/xmake-io/xmake).
+
+## Apply the plugin
+
+### plugins DSL
+
+```
+plugins {
+  id 'org.tboox.gradle-xmake-plugin' version '1.0.7'
+}
+```
+
+### Legacy plugin application
+
+```
+buildscript {
+  repositories {
+    maven {
+      url "https://plugins.gradle.org/m2/"
+    }
+  }
+  dependencies {
+    classpath 'org.tboox:gradle-xmake-plugin:1.0.7'
+  }
+  repositories {
+    mavenCentral()
+  }
+}
+
+apply plugin: "org.tboox.gradle-xmake-plugin"
+```
+
+## Configuation
+
+### Simplest Example
+
+We add `xmake.lua` to `projectdir/jni/xmake.lua` and enable xmake in build.gradle.
+
+#### build.gradle
+
+```
+android {
+    externalNativeBuild {
+        xmake {
+            path "jni/xmake.lua"
+        }
+    }
+}
+```
+
+
+
+
+
+
+#### JNI
+
+The JNI project structure:
+
+```
+projectdir
+  - src
+    - main
+      - java
+  - jni
+    - xmake.lua
+    - *.cpp
+```
+
+xmake.lua:
+
+```lua
+add_rules("mode.debug", "mode.release")
+target("nativelib")
+    set_kind("shared")
+    add_files("nativelib.cc")
+```
+
+### More Gradle Configuations
+
+```
+android {
+    defaultConfig {
+        externalNativeBuild {
+            xmake {
+                // append the global cflags (optional)
+                cFlags "-DTEST"
+
+                // append the global cppflags (optional)
+                cppFlags "-DTEST", "-DTEST2"
+
+                // switch the build mode to `debug` for `xmake f -m debug` (optional)
+                buildMode "debug"
+
+                // set abi filters (optional), e.g. armeabi, armeabi-v7a, arm64-v8a, x86, x86_64
+                // we can also get abiFilters from defaultConfig.ndk.abiFilters
+                abiFilters "armeabi-v7a", "arm64-v8a"
+            }
+        }
+    }
+
+    externalNativeBuild {
+        xmake {
+            // enable xmake and set xmake.lua project file path
+            path "jni/xmake.lua"
+
+            // enable verbose output (optional), e.g. verbose, warning, normal
+            logLevel "verbose"
+
+            // set c++stl (optional), e.g. c++_static/c++_shared, gnustl_static/gnustl_shared, stlport_static/stlport_shared
+            stl "c++_shared"
+
+            // set the given xmake program path (optional)
+            // program /usr/local/bin/xmake
+
+            // disable stdc++ library (optional)
+            // stdcxx false
+
+            // set the given ndk directory path (optional)
+            // ndk "/Users/ruki/files/android-ndk-r20b/"
+
+            // set sdk version of ndk (optional)
+            // sdkver 21
+        }
+    }
+}
+```
+
+## Build
+
+### Build JNI and generate apk
+
+The `xmakeBuild` will be injected to `assemble` task automatically if the gradle-xmake-plugin has been applied.
+
+```console
+$ ./gradlew app:assembleDebug
+> Task :nativelib:xmakeConfigureForArm64
+> Task :nativelib:xmakeBuildForArm64
+>> xmake build
+[ 50%]: ccache compiling.debug nativelib.cc
+[ 75%]: linking.debug libnativelib.so
+[100%]: build ok!
+>> install artifacts to /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/arm64-v8a
+> Task :nativelib:xmakeConfigureForArmv7
+> Task :nativelib:xmakeBuildForArmv7
+>> xmake build
+[ 50%]: ccache compiling.debug nativelib.cc
+[ 75%]: linking.debug libnativelib.so
+[100%]: build ok!
+>> install artifacts to /Users/ruki/projects/personal/xmake-gradle/nativelib/libs/armeabi-v7a
+> Task :nativelib:preBuild
+> Task :nativelib:assemble
+> Task :app:assembleDebug
+```
+
+### Force to rebuild JNI
+
+```console
+$ ./gradlew nativelib:xmakeRebuild
+```

+ 72 - 0
docs/posts/xmake-idea-v1.0.3.md

@@ -0,0 +1,72 @@
+---
+title: xmake-idea v1.0.3 released, a xmake integration in Intellij-IDEA
+tags: [xmake, lua, IntelliJ, IDEA, plugin]
+date: 2017-11-07
+author: Ruki
+---
+
+[xmake-idea](https://github.com/xmake-io/xmake-idea) plugin is a xmake integration in Intellij-IDEA.
+
+It is deeply integrated with [xmake](https://github.com/xmake-io/xmake) and Intellij-IDEA to provide a convenient and fast cross-platform c/c++ development and building.
+
+And It also support other Intellij-based platform, like Clion, Android Studio and etc.
+
+You need install [xmake](https://github.com/xmake-io/xmake) first and a project with `xmake.lua`.
+ 
+## Features
+
+* Quickstart
+* Create project
+* Project configuration
+* Run configuration
+* Menu tools
+* Tool windows
+* Build and run
+* Parse errors and goto file
+ 
+## Quickstart
+
+<div align="center">
+<img src="/assets/img/posts/xmake/xmake-idea-quickstart.gif">
+</div>
+
+
+
+
+
+
+
+
+
+## Parse errors and goto file
+ 
+<div align="center">
+<img src="/assets/img/posts/xmake/xmake-idea-problem.gif">
+</div>
+
+## Tool windows
+
+#### Output panel
+
+<img src="/assets/img/posts/xmake/xmake-idea-output_panel.png">
+ 
+## Create project
+
+<img src="/assets/img/posts/xmake/xmake-idea-create_project.png">
+
+## Project configuration
+
+<img src="/assets/img/posts/xmake/xmake-idea-project_configuration.png">
+
+## Run configuration
+
+<img src="/assets/img/posts/xmake/xmake-idea-run_configuration.png">
+
+## Menu tools
+
+<div align="center">
+<img src="/assets/img/posts/xmake/xmake-idea-menu.png">
+</div>
+ 
+
+ 

+ 10 - 0
docs/posts/xmake-io.md

@@ -0,0 +1,10 @@
+---
+title: publish xmake.io
+tags: [xmake, website, xmake.io]
+date: 2016-07-02
+author: Ruki
+---
+
+We new a site for the open source project: xmake
+
+[https://xmake.io](https://xmake.io)

+ 61 - 0
docs/posts/xmake-sublime-v1.0.3.md

@@ -0,0 +1,61 @@
+---
+title: xmake-sublime v1.0.3 released, a xmake integration in sublime text
+tags: [xmake, lua, sublime, plugin]
+date: 2017-10-25
+author: Ruki
+---
+
+[xmake-sublime](https://github.com/xmake-io/xmake-sublime) plugin is a xmake integration in Sublime Text.
+
+It is deeply integrated with [xmake](https://github.com/xmake-io/xmake) and sublime text to provide a convenient and fast cross-platform c/c++ development and building.
+
+You need install [xmake](https://github.com/xmake-io/xmake) first and a project with `xmake.lua`.
+
+## Features
+
+* Quickstart
+* Colorization
+* Completion Lists
+* StatusBar
+* Commands
+* Configuration
+* Build and Run
+* Problem
+
+## Quickstart
+
+<img src="/assets/img/posts/xmake/xmake-sublime-quickstart.gif">
+
+
+
+
+
+
+
+
+
+ 
+## Problem
+
+<img src="/assets/img/posts/xmake/xmake-sublime-problem.gif">
+
+## Colorization and Completion Lists
+
+<img src="/assets/img/posts/xmake/xmake-sublime-completion.gif">
+
+## StatusBar
+
+![statusbar](/assets/img/posts/xmake/xmake-sublime-statusbar.png)
+ 
+## Commands
+
+<img src="/assets/img/posts/xmake/xmake-sublime-commands.png">
+ 
+## Configuration
+
+<img src="/assets/img/posts/xmake/xmake-sublime-configuration.gif">
+ 
+## Build and Run
+
+<img src="/assets/img/posts/xmake/xmake-sublime-build_run.gif">
+  

+ 395 - 0
docs/posts/xmake-update-v2.2.2-package-deps.md

@@ -0,0 +1,395 @@
+---
+title: xmake v2.2.2, We can also manage package dependencies for C/C++
+tags: [xmake, lua, C/C++, Package]
+date: 2018-10-13
+author: Ruki
+---
+
+### Introduction
+
+Since my English is not very good, the article uses google translation, if you can't understand, please understand.
+
+After more than four months, [xmake](https://github.com/xmake-io/xmake) finally updated the new version v2.2.2 and launched the heavyweight feature: Natively Supported Remote Dependency Package Management.
+
+This feature, in fact, I have been writing for almost a year, before the initial completion, for the development of this feature and history, interested students can look at the relevant issues: [#69](https://github.com/xmake-io/xmake/issues/69).
+
+The current implementation is as follows, a fully consistent semantic version dependency description:
+
+<img src="/assets/img/index/add_require.png" width="70%" />
+
+Fully consistent cross-platform build behavior, one-click xmake compilation:
+
+<img src="/assets/img/index/package_manage.png" width="80%" />
+
+Complete project description:
+
+```lua
+add_requires("tbox 1.6.*", "libpng ~1.16", "zlib")
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("tbox", "libpng", "zlib")
+```
+
+Let me briefly introduce the background of my function:
+
+When we write C/C++ programs, the use of third-party dependencies has always been a big problem. Because each build library has different build systems and different code platform support, it can't be like other high-level languages. Convenient and easy to use package management support.
+
+Although there are package management tools such as homebrew, vcpkg and so on to solve this problem, there are some limitations, such as:
+
+1. homebrew does not support iphoneos, android, windows platform
+2. vcpkg does not support semantic version selection, multi-version management
+3. Does not support project management and build
+
+For the existing cross-platform build tools, there is no built-in package management support. For example, cmake only provides `find_package` to find system packages. Although it can be used with third-party package management such as vcpkg, I personally feel that it is not very Convenience.
+This will make other users of the project need to install vcpkg or install the dependent library to the system when compiling. For the pc platform, it is better to use it. For the iphoneos, android and other platforms, the user will toss on the library. It will be a while.
+
+And xmake's philosophy is: `Consistent maintenance, One-click compilation`
+
+* Consistency of build behavior: Regardless of whether your project has library dependencies or tool dependencies, you only need to execute a `xmake` command to compile.
+* Consistency of project maintenance: Regardless of whether your project is used on Windows or for Linux, iPhone, or Android, you only need a xmake.lua maintenance project.
+
+Cmake also needs to generate additional third-party IDE project files, even if cmakelist.txt is the same, but the build and maintenance experience is not guaranteed to be completely consistent for the user. After all, it is limited to such tools as vc/make.
+
+
+
+
+
+### Currently supported features
+
+* Semantic version support, for example: ">= 1.1.0 < 1.2", "~1.6", "1.2.x", "1.*"
+* Provide multi-warehouse management support such as official package warehouse, self-built private warehouse, project built-in warehouse, etc.
+* Cross-platform package compilation integration support (packages of different platforms and different architectures can be installed at the same time, fast switching use)
+* Debug dependency package support, source code debugging
+
+### Dependency package processing mechanism
+
+Here we briefly introduce the processing mechanism of the entire dependency package:
+
+<div align="center">
+<img src="/assets/img/index/package_arch.png" width="80%" />
+</div>
+
+1. Priority check for the current system directory, whether there is a specified package under the third-party package management, if there is a matching package, then you do not need to download and install (of course you can also set the system package)
+2. Retrieve the package matching the corresponding version, then download, compile, and install (Note: installed in a specific xmake directory, will not interfere with the system library environment)
+3. Compile the project, and finally automatically link the enabled dependencies
+
+### Quickly get started
+
+Create a new empty project that depends on the tbox library:
+
+```console
+$ xmake create -t console_tbox test
+$ cd test
+```
+
+Execute the compilation. If the tbox library is not currently installed, it will be downloaded and installed automatically:
+
+```console
+$ xmake
+```
+
+Switching to the iphoneos platform for compilation will reinstall the iphoneos version of the tbox library for linking:
+
+```console
+$ xmake f -p iphoneos
+$ xmake
+```
+
+Switch to the android platform arm64-v8a architecture compilation:
+
+```console
+$ xmake f -p android [--ndk=~/android-ndk-r16b]
+$ xmake
+```
+
+### Semantic version settings
+
+Xmake's dependency package management fully supports semantic version selection, for example: "~1.6.1". For a detailed description of the semantic version, see: [http://semver.org/] (http://semver.org/)
+
+Some semantic versions are written:
+
+```lua
+add_requires("tbox 1.6.*", "pcre 1.3.x", "libpng ^1.18")
+add_requires("libpng ~1.16", "zlib 1.1.2 || >=1.2.11 <1.3.0")
+```
+
+The semantic version parser currently used by xmake is the [sv](https://github.com/uael/sv) library contributed by [uael](https://github.com/uael), which also has a description of the version. For detailed instructions, please refer to the following: [Version Description] (https://github.com/uael/sv#versions)
+
+Of course, if we have no special requirements for the current version of the dependency package, then we can write directly:
+
+```lua
+add_requires("tbox", "libpng", "zlib")
+```
+
+This will use the latest version of the package known, or the source code compiled by the master branch. If the current package has a git repo address, we can also specify a specific branch version:
+
+```lua
+add_requires("tbox master")
+add_requires("tbox dev")
+```
+
+### Additional package information settings
+
+#### Optional package settings
+
+If the specified dependency package is not supported by the current platform, or if the compilation and installation fails, then xmake will compile the error, which is reasonable for some projects that must rely on certain packages to work.
+However, if some packages are optional dependencies, they can be set to optional packages even if they are not compiled properly.
+
+```lua
+add_requires("tbox", {optional = true})
+```
+
+#### Disable system library
+
+With the default settings, xmake will first check to see if the system library exists (if no version is required). If the user does not want to use the system library and the library provided by the third-party package management, then you can set:
+
+```lua
+add_requires("tbox", {system = false})
+```
+
+#### Using the debug version of the package
+
+If we want to debug the dependencies at the same time, we can set them to use the debug version of the package (provided that this package supports debug compilation):
+
+```lua
+add_requires("tbox", {debug = true})
+```
+
+If the current package does not support debug compilation, you can submit the modified compilation rules in the repository to support the debug, for example:
+
+```lua
+package("openssl")
+    on_install("linux", "macosx", function (package)
+        os.vrun("./config %s --prefix=\"%s\"", package:debug() and "--debug" or "", package:installdir())
+        os.vrun("make -j4")
+        os.vrun("make install")
+    end)
+```
+
+#### Passing additional compilation information to the package
+
+Some packages have various compile options at compile time, and we can pass them in. Of course, the package itself supports:
+
+```lua
+add_requires("tbox", {config = {small=true}})
+```
+
+Pass `--small=true` to the tbox package so that compiling the installed tbox package is enabled.
+
+### Using a self-built private package repository
+
+If the required package is not in the official repository [xmake-repo](https://github.com/xmake-io/xmake-repo), we can submit the contribution code to the repository for support.
+But if some packages are only for personal or private projects, we can create a private repository repo. The repository organization structure can be found at: [xmake-repo](https://github.com/xmake-io/xmake-repo)
+
+For example, now we have a private repository repo:`[email protected]:myrepo/xmake-repo.git`
+
+We can add the repository with the following command:
+
+```console
+$ xmake repo --add myrepo [email protected]:myrepo/xmake-repo.git
+```
+
+Or we write directly in xmake.lua:
+
+```lua
+add_repositories("my-repo [email protected]:myrepo/xmake-repo.git")
+```
+
+If we just want to add one or two private packages, this time to build a git repo is too big, we can directly put the package repository into the project, for example:
+
+```
+projectdir
+  - myrepo
+    - packages
+      - t/tbox/xmake.lua
+      - z/zlib/xmake.lua
+  - src
+    - main.c
+  - xmake.lua
+```
+
+The above myrepo directory is your own private package repository, built into your own project, and then add this repository location in xmake.lua:
+
+```lua
+add_repositories("my-repo myrepo")
+```
+
+This can be referred to [benchbox](https://github.com/tboox/benchbox) project, which has a built-in private repository.
+
+We can even build a package without directly building a package description into the project xmake.lua, which is useful for relying on one or two packages, for example:
+
+```lua
+package("libjpeg")
+
+    set_urls("http://www.ijg.org/files/jpegsrc.$(version).tar.gz")
+
+    add_versions("v9c", "650250979303a649e21f87b5ccd02672af1ea6954b911342ea491f351ceb7122")
+
+    on_install("windows", function (package)
+        os.mv("jconfig.vc", "jconfig.h")
+        os.vrun("nmake -f makefile.vc")
+        os.cp("*.h", package:installdir("include"))
+        os.cp("libjpeg.lib", package:installdir("lib"))
+    end)
+
+    on_install("macosx", "linux", function (package)
+        import("package.tools.autoconf").install(package)
+    end)
+
+package_end()
+
+add_requires("libjpeg")
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.c") 
+    add_packages("libjpeg")
+```
+
+### Package Management Command Use
+
+The package management command `$ xmake require` can be used to manually display the download, install, uninstall, retrieve, and view package information.
+
+#### Install the specified package
+
+```console
+$ xmake require tbox
+```
+
+Install the specified version package:
+
+```console
+$ xmake require tbox "~1.6"
+```
+
+Force a re-download of the installation and display detailed installation information:
+
+```console
+$ xmake require -f -v tbox "1.5.x"
+```
+
+Pass additional setup information:
+
+```console
+$ xmake require --extra="debug=true,config={small=true}" tbox
+```
+
+Install the debug package and pass the compilation configuration information of `small=true` to the package.
+
+#### Uninstalling the specified package
+
+```console
+$ xmake require --uninstall tbox
+```
+
+This will completely uninstall the removal package file.
+
+#### Remove the specified package
+
+Only unlink specifies the package, it is not detected by the current project, but the package still exists locally. If it is reinstalled, it will be completed very quickly.
+
+```console
+$ xmake require --unlink tbox
+```
+
+#### View package details
+
+```console
+$ xmake require --info tbox
+```
+
+#### Search for packages in the current warehouse
+
+```console
+$ xmake require --search tbox
+```
+
+This is to support fuzzy search and lua pattern matching search:
+
+```console
+$ xmake require --search pcr
+```
+
+Will also search for pcre, pcre2 and other packages.
+
+#### List the currently installed packages
+
+```console
+$ xmake require --list
+```
+
+### Warehouse Management Command Use
+
+As mentioned above, adding a private repository is available (supporting local path addition):
+
+```console
+$ xmake repo --add myrepo [email protected]:myrepo/xmake-repo.git
+```
+
+We can also remove a repository that has already been installed:
+
+```console
+$ xmake repo --remove myrepo
+```
+
+Or view all the added warehouses:
+
+```console
+$ xmake repo --list
+```
+
+If the remote repository has updates, you can manually perform a warehouse update to get more and the latest packages:
+
+```console
+$ xmake repo -u
+```
+
+### Submit the package to the official warehouse
+
+At present, this feature has just been completed. At present, there are not many packages in the official warehouse. Some packages may not support some platforms, but this is not a big problem. After several iterations, I will continue to expand and improve the package warehouse.
+
+If you need a package, the current official repository is not yet included, you can submit an issue or you can submit it to the official repository after you have localized it: [xmake-repo](https://github.com/xmake-io/xmake-repo)
+
+For detailed contribution descriptions, see: [CONTRIBUTING.md](https://github.com/xmake-io/xmake-repo/blob/master/CONTRIBUTING.md)
+
+For more instructions on remote dependencies, see the official documentation: [Remote Dependency Mode](/#remote-dependency-mode)
+
+In fact, xmake package management has gone through three generations, the first two versions of v1.0, v2.0 are local package management mode, system library search mode, these two are still very useful in some cases.
+For the introduction of the two, here is not much to say, you can see the documentation: [Dependency Package Management](/#dependency-package-management)
+
+### Conclusion
+
+Having said that, let's finally look at some of the other new features and updates provided by the new version:
+
+#### New features
+
+* Support fasm assembler
+* Add `has_config`, `get_config`, and `is_config` apis
+* Add `set_config` to set the default configuration
+* Add `$xmake --try` to try building project using third-party buildsystem
+* Add `set_enabled(false)` to disable target 
+* [#69](https://github.com/xmake-io/xmake/issues/69): Add remote package management, `add_requires("tbox ~1.6.1")`
+* [#216](https://github.com/xmake-io/xmake/pull/216): Add windows mfc rules
+
+#### Changes
+
+* Improve to detect Qt envirnoment and support mingw
+* Add debug and release rules to the auto-generated xmake.lua
+* [#178](https://github.com/xmake-io/xmake/issues/178): Modify the shared library name for mingw.
+* Support case-insensitive path pattern-matching for `add_files()` on windows
+* Improve to detect Qt sdk directory for `detect.sdks.find_qt`
+* [#184](https://github.com/xmake-io/xmake/issues/184): Improve `lib.detect.find_package` to support vcpkg
+* [#208](https://github.com/xmake-io/xmake/issues/208): Improve rpath for shared library
+* [#225](https://github.com/xmake-io/xmake/issues/225): Improve to detect vs envirnoment
+
+#### Bug fixed
+
+* [#177](https://github.com/xmake-io/xmake/issues/177): Fix the dependent target link bug
+* Fix high cpu usage bug and Exit issues for `$ xmake f --menu`
+* [#197](https://github.com/xmake-io/xmake/issues/197): Fix Chinese path for generating vs201x project
+* Fix wdk rules bug
+* [#205](https://github.com/xmake-io/xmake/pull/205): Fix targetdir,objectdir not used in vsproject 
+
+

+ 39 - 0
docs/posts/xmake-update-v2.2.3.md

@@ -0,0 +1,39 @@
+---
+title: xmake v2.2.3, A lot of new features support
+tags: [xmake, lua, C/C++, Package]
+date: 2018-11-30
+author: Ruki
+---
+
+This version is mainly to improve the remote dependency package management, fix a lot of details, and this version can already support the upgrade from my upgrade through `xmake update`, it will be more convenient to upgrade xmake later.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Documents](https://xmake.io)
+
+### New features
+
+* [#233](https://github.com/xmake-io/xmake/issues/233): Support windres for mingw platform
+* [#239](https://github.com/xmake-io/xmake/issues/239): Add cparser compiler support
+* Add plugin manager `xmake plugin --help`
+* Add `add_syslinks` api to add system libraries dependence
+* Add `xmake l time xmake [--rebuild]` to record compilation time
+* [#250](https://github.com/xmake-io/xmake/issues/250): Add `xmake f --vs_sdkver=10.0.15063.0` to change windows sdk version
+* Add `lib.luajit.ffi` and `lib.luajit.jit` extension modules
+* [#263](https://github.com/xmake-io/xmake/issues/263): Add new target kind: object to only compile object files
+
+### Changes
+
+* [#229](https://github.com/xmake-io/xmake/issues/229): Improve to select toolset for vcproj plugin
+* Improve compilation dependences
+* Support *.xz for extractor
+* [#249](https://github.com/xmake-io/xmake/pull/249): revise progress formatting to space-leading three digit percentages 
+* [#247](https://github.com/xmake-io/xmake/pull/247): Add `-D` and `--diagnosis` instead of `--backtrace`
+* [#259](https://github.com/xmake-io/xmake/issues/259): Improve on_build, on_build_file and on_xxx for target and rule
+* [#269](https://github.com/xmake-io/xmake/issues/269): Clean up the temporary files at last 30 days
+* Improve remote package manager
+* Support to add packages with only header file
+* Support to modify builtin package links, e.g. `add_packages("xxx", {links = {}})`
+
+### Bugs fixed
+
+* Fix state inconsistency after failed outage of installation dependency package

+ 54 - 0
docs/posts/xmake-update-v2.2.5.md

@@ -0,0 +1,54 @@
+---
+title: xmake v2.2.5, More complete package dependency management
+tags: [xmake, lua, C/C++, Package]
+date: 2019-03-29
+author: Ruki
+---
+
+This version took more than four months to refactor and improve the package dependency management. 
+The official repository added common packages such as mysql and ffmpeg, and added a lot of features.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Documents](https://xmake.io)
+
+### New features
+
+* Add `string.serialize` and `string.deserialize` to serialize and deserialize object, function and others.
+* Add `xmake g --menu`
+* [#283](https://github.com/xmake-io/xmake/issues/283): Add `target:installdir()` and `set_installdir()` api for target
+* [#260](https://github.com/xmake-io/xmake/issues/260): Add `add_platformdirs` api, we can define custom platforms
+* [#310](https://github.com/xmake-io/xmake/issues/310): Add theme feature
+* [#318](https://github.com/xmake-io/xmake/issues/318): Add `add_installfiles` api to target
+* [#339](https://github.com/xmake-io/xmake/issues/339): Improve `add_requires` and `find_package` to integrate the 3rd package manager
+* [#327](https://github.com/xmake-io/xmake/issues/327): Integrate with Conan package manager 
+* Add the builtin api `find_packages("pcre2", "zlib")` to find multiple packages
+* [#320](https://github.com/xmake-io/xmake/issues/320): Add template configuration files and replace all variables before building
+* [#179](https://github.com/xmake-io/xmake/issues/179): Generate CMakelist.txt file for `xmake project` plugin
+* [#361](https://github.com/xmake-io/xmake/issues/361): Support vs2019 preview
+* [#368](https://github.com/xmake-io/xmake/issues/368): Support `private, public, interface` to improve dependency inheritance like cmake
+* [#284](https://github.com/xmake-io/xmake/issues/284): Add passing user configs description for `package()`
+* [#319](https://github.com/xmake-io/xmake/issues/319): Add `add_headerfiles` to improve to set header files and directories
+* [#342](https://github.com/xmake-io/xmake/issues/342): Add some builtin help functions for `includes()`, e.g. `check_cfuncs`
+
+### Changes
+
+* Improve to switch version and debug mode for the dependent packages
+* [#264](https://github.com/xmake-io/xmake/issues/264): Support `xmake update dev` on windows
+* [#293](https://github.com/xmake-io/xmake/issues/293): Add `xmake f/g --mingw=xxx` configuration option and improve to find_mingw
+* [#301](https://github.com/xmake-io/xmake/issues/301): Improve precompiled header file
+* [#322](https://github.com/xmake-io/xmake/issues/322): Add `option.add_features`, `option.add_cxxsnippets` and `option.add_csnippets`
+* Remove some deprecated interfaces of xmake 1.x, e.g. `add_option_xxx`
+* [#327](https://github.com/xmake-io/xmake/issues/327): Support conan package manager for `lib.detect.find_package` 
+* Improve `lib.detect.find_package` and add builtin `find_packages("zlib 1.x", "openssl", {xxx = ...})` api
+* Mark `set_modes()` as deprecated, we use `add_rules("mode.debug", "mode.release")` instead of it
+* [#353](https://github.com/xmake-io/xmake/issues/353): Improve `target:set`, `target:add` and add `target:del` to modify target configuration
+* [#356](https://github.com/xmake-io/xmake/issues/356): Add `qt_add_static_plugins()` api to support static Qt sdk
+* [#351](https://github.com/xmake-io/xmake/issues/351): Support yasm for generating vs201x project
+* Improve the remote package manager.
+
+### Bugs fixed
+
+* Fix cannot call `set_optimize()` to set optimization flags when exists `add_rules("mode.release")`
+* [#289](https://github.com/xmake-io/xmake/issues/289): Fix unarchive gzip file failed on windows
+* [#296](https://github.com/xmake-io/xmake/issues/296): Fix `option.add_includedirs` for cuda
+* [#321](https://github.com/xmake-io/xmake/issues/321): Fix find program bug with $PATH envirnoment

+ 138 - 0
docs/posts/xmake-update-v2.2.6.md

@@ -0,0 +1,138 @@
+---
+title: xmake v2.2.6 released, Support Qt/Adnroid application
+tags: [xmake, lua, C/C++, Package]
+date: 2019-05-26
+author: Ruki
+---
+
+This version mainly improves the support of remote dependencies, and adds support for clib package dependencies. 
+In addition, xmake has been able to directly compile Qt/Android projects, and can directly generate apk packages and install them to device support.
+
+* [project source](https://github.com/xmake-io/xmake)
+* [Official Document](https://xmake.io)
+
+## Introduction of new features
+
+### Qt/Android Compilation Support
+
+We can create a Qt empty project first, and try to compile and generate apk, for example:
+
+```console
+xmake create -t quickapp_qt -l c ++ appdemo
+cd appdemo
+xmake f -p android --ndk=~/Downloads/android-ndk-r19c/ --android_sdk=~/Library/Android/sdk/ -c
+xmake
+[0%]: compiling.qt.qrc src/qml.qrc
+[ 50%]: ccache compiling.release src/main.cpp
+[100%]: linking.release libappdemo.so
+[100%]: generating.qt.app appdemo.apk
+```
+
+Then install to the device:
+
+```console
+xmake install
+installing appdemo ...
+installing build/android/armv7-a/release/appdemo.apk ..
+success
+install ok!👌
+```
+
+Very simple, we can look at its xmake.lua description, in fact, there is no difference between compiling and maintaining the Qt project on the pc. The exact same description file is just switched to the android platform when compiling.
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("appdemo")
+    add_rules("qt.application")
+    add_headerfiles("src/*.h")
+
+    add_files("src/*.cpp")
+    add_files("src/qml.qrc")
+
+    add_frameworks("QtQuick")
+```
+
+
+
+
+
+
+### clib package dependency integration
+
+Clib is a source-based dependency package manager. The dependent package is downloaded directly to the corresponding library source code, integrated into the project to compile, rather than binary library dependencies.
+
+It is also very convenient to integrate in xmake. The only thing to note is that you need to add the source code of the corresponding library to xmake.lua, for example:
+
+```lua
+add_requires("clib::clibs/[email protected]", {alias = "bytes"})
+
+target("xmake-test")
+    set_kind("binary")
+    add_files("clib/bytes/*.c")
+    add_files("src/*.c")
+    add_packages("bytes")
+```
+
+### Syntax simplification
+
+The configuration field syntax of xmake.lua is very flexible and can be used in a variety of complex and flexible configurations in the relevant domain, but for many streamlined small block configurations, this time is slightly redundant:
+
+```lua
+option("test1")
+    set_default(true)
+    set_showmenu(true)
+    set_description("test1 option")
+
+option("test2")
+    set_default(true)
+    set_showmeu(true)
+
+option("test3")
+    set_default("hello")
+```
+
+For the above small block option domain settings, we can simplify the description into a single line:
+
+```lua
+option("test1", {default = true, showmenu = true, description = "test1 option"})
+option("test2", {default = true, showmenu = true})
+option("test3", {default = "hello"})
+```
+
+In addition to the option field, this simplified writing is also supported for other domains, such as:
+
+```lua
+target("demo")
+    set_kind("binary")
+    add_files("src/*.c")
+```
+
+Simplified to:
+
+```lua
+target("demo", {kind = "binary", files = "src/*.c"})
+```
+
+Of course, if the configuration requirements are more complicated, or the original multi-line setting method is more convenient, this depends on your own needs to evaluate which method is used.
+
+### New features
+
+* [#380](https://github.com/xmake-io/xmake/pull/380): Add support to export compile_flags.txt 
+* [#382](https://github.com/xmake-io/xmake/issues/382): Simplify simple scope settings
+* [#397](https://github.com/xmake-io/xmake/issues/397): Add clib package manager support
+* [#404](https://github.com/xmake-io/xmake/issues/404): Support Qt for android and deploy android apk
+* Add some qt empty project templates, e.g. `widgetapp_qt`, `quickapp_qt_static` and `widgetapp_qt_static`
+* [#415](https://github.com/xmake-io/xmake/issues/415): Add `--cu-cxx` config arguments to `nvcc/-ccbin`
+* Add `--ndk_stdcxx=y` and `--ndk_cxxstl=gnustl_static` argument options for android NDK
+
+### Changes
+
+* Improve remote package manager
+* Improve `target:on_xxx` scripts to support to match `android|armv7-a@macosx,linux|x86_64` pattern
+* Improve loadfile to optimize startup speed, decrease 98% time
+
+### Bugs fixed
+
+* [#400](https://github.com/xmake-io/xmake/issues/400): fix c++ languages bug for qt rules
+

+ 227 - 0
docs/posts/xmake-update-v2.2.7.md

@@ -0,0 +1,227 @@
+---
+title: xmake v2.2.7 released, Improve to build Cuda project
+tags: [xmake, lua, C/C++, Cuda]
+date: 2019-06-17
+author: Ruki
+---
+
+This version mainly makes a lot of improvements to the Cuda project, and adds support for lex/yacc compilation. 
+It also adds custom support for link phases such as `on_link`, `before_link` and `after_link` to the target. 
+
+Here, I would also like to thank @[OpportunityLiu](https://github.com/OpportunityLiu) for support for xmake. In this version [OpportunityLiu](https://github.com/OpportunityLiu) contributed a lot of code to Improve Cuda support.
+In addition, he helped improve xmake's entire unit testing framework, self-updating programs, command line tab completions, and ci scripts to make xmake's update iterations more efficient and stable.
+
+* [project source](https://github.com/xmake-io/xmake)
+* [Official Document](https://xmake.io)
+
+## Introduction of new features
+
+### Improve to build Cuda project 
+
+#### Header file dependency detection and incremental compilation
+
+Prior to 2.2.6, the compiler support for cuda was not perfect. At least the header file dependency detection was not provided. Therefore, if there is more cuda code, every change will compile all, not like c/c++ code. Do it to detect changes and perform incremental compilation.
+
+In the new version, xmake has supported it, and now it is very good to handle dependencies on different platforms, which will improve the efficiency of daily compilation and development.
+
+#### Add gencodes api
+
+In the previous version, adding gencodes configuration was very cumbersome and not concise. You can look at the previous configuration:
+
+```lua
+target("cuda_console")
+    set_kind("binary")
+    add_files("src/*.cu")
+
+    add_cuflags("-gencode arch=compute_30,code=sm_30", "-gencode arch=compute_35,code=sm_35")
+    add_cuflags("-gencode arch=compute_37,code=sm_37", "-gencode arch=compute_50,code=sm_50")
+    add_cuflags("-gencode arch=compute_52,code=sm_52", "-gencode arch=compute_60,code=sm_60")
+    add_cuflags("-gencode arch=compute_61,code=sm_61", "-gencode arch=compute_70,code=sm_70")
+    add_cuflags("-gencode arch=compute_70,code=compute_70")
+
+    add_ldflags("-gencode arch=compute_30,code=sm_30", "-gencode arch=compute_35,code=sm_35")
+    add_ldflags("-gencode arch=compute_37,code=sm_37", "-gencode arch=compute_50,code=sm_50")
+    add_ldflags("-gencode arch=compute_52,code=sm_52", "-gencode arch=compute_60,code=sm_60")
+    add_ldflags("-gencode arch=compute_61,code=sm_61", "-gencode arch=compute_70,code=sm_70")
+    add_ldflags("-gencode arch=compute_70,code=compute_70")
+```
+
+Therefore, in order to streamline the configuration of xmake.lua, the `add_cugencodes`api added to the cuda project is used to simplify the configuration. The improvements are as follows:
+
+```lua
+target("cuda_console")
+    set_kind("binary")
+    add_files("src/*.cu")
+
+    -- generate SASS code for each SM architecture
+    add_cugencodes("sm_30", "sm_35", "sm_37", "sm_50", "sm_52", "sm_60", "sm_61", "sm_70")
+
+    -- generate PTX code from the highest SM architecture to guarantee forward-compatibility
+    add_cugencodes("compute_70")
+```
+
+In addition, when configured as `add_cugencodes("native")`, xmake will automatically detect the gencodes supported by the current device, which will be added automatically, which is more convenient and efficient.
+
+This, thanks to the probe code provided by [OpportunityLiu] (https://github.com/OpportunityLiu) and the implementation of `add_cugencodes`.
+
+
+
+
+
+
+
+
+
+
+
+
+
+#### Support device link for cuda
+
+In the new version, xmake basically refactors the entire cuda build process, extracting the cuda-related builds to a separate cuda build rule for maintenance, and by default uses the device-link link.
+
+For the description and benefits of device-link, please refer to the relevant official introduction: https://devblogs.nvidia.com/separate-compilation-linking-cuda-device-code/
+
+We also need devlink when compiling calls that contain `__global__` or `__device__` functions that cross compiler units, so in xmake, devlink is currently enabled by default.
+
+For the user, there is no need to make any changes to xmake.lua. Of course, if the user wants to disable devlink manually, it is also possible:
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("src/*.cu")
+    add_values("cuda.devlink", false) -- explicitly disable the default device-link behavior
+```
+
+#### Support for compiling cuda projects with clang
+
+Clang currently supports compilation of *.cu files, but clan versions supported by different versions of clang have certain limitations. Clang7 can only support cuda7-9.2, 8 supports up to 10, and clan9 is required to support 10.1.
+
+In addition to supporting nvcc to compile cuda projects, xmake can also be compiled directly into clang, for example:
+
+```console
+xmake f --cu=clang
+xmake
+```
+
+However, regarding devlink, it seems that you still need to rely on nvcc, clang does not support it.
+
+#### Switch c++ compiler for nvcc
+
+xmake added the `--cu-ccbin=` parameter to configure the switch. The nvcc defaults to the c++ compiler and linker. The usage is as follows:
+
+```console
+xmake f --cu-ccbin=clang++
+xmake
+```
+
+Let nvcc call the clang++ compiler internally when compiling cuda code.
+
+### Custom the linking process
+
+In the new version, we have added customization processing related to the link link phase. Users can extend their own link process by implementing `on_link`, `before_link` and `after_link` in target/rule.
+
+For example, we want to pre-process some other things before the link phase of normal c/c++ code, such as doing something about *.o files, then we can write our own lua script in the before_link stage:
+
+```lua
+target("test")
+    before_link(function (target)
+        print("process objects", target:objectfiles())
+    end)
+```
+
+Or we want to rewrite the built-in link process, you can use `on_link`:
+
+```lua
+target("test")
+    on_link(function (target)
+        print("link objects", target:objectfiles())
+    end)
+```
+
+And `after_link` is to do some customization tasks after the link is completed.
+
+### support Lex/Yacc Compilation 
+
+Currently xmake can natively support lex/flex, yacc/bison, etc. to compile and process *.l/*.y files to quickly develop some compiler-related projects.
+
+We only need to add lex, yacc two rules to the target, so that it can handle *.l/*.y files normally, of course *.ll/*.yy is also supported.
+
+```lua
+target("calc")
+    set_kind("binary")
+    add_rules("lex", "yacc")
+    add_files("src/*.l", "src/*.y")
+```
+
+Here is an example code for reference: [lex_yacc_example](https://github.com/xmake-io/xmake/tree/dev/tests/projects/lex_yacc)
+
+### Improve to set run environments
+
+#### Setting the running directory
+
+We can use the `set_rundir` interface to set the current running directory of the default running target program. If not set, by default, the target is loaded and run in the directory where the executable file is located.
+
+If the user wants to modify the load directory, one is to customize the run logic by `on_run()`, and to do the switch inside, but just to cut the directory, this is too cumbersome.
+
+Therefore, you can quickly switch settings to the default directory environment through this interface.
+
+```lua
+target("test")
+     set_kind("binary")
+     add_files("src/*.c")
+     set_rundir("$(projectdir)/xxx")
+```
+
+#### Adding the environment variables
+
+Another new interface, `add_runenvs`, can be used to add environment variables that set the default run target program.
+
+```lua
+target("test")
+     set_kind("binary")
+     add_files("src/*.c")
+     add_runenvs("PATH", "/tmp/bin", "xxx/bin")
+     add_runenvs("NAME", "value")
+```
+
+### Support Command line tab completion 
+
+In order to improve the user experience, the new version also supports the xmake command parameter tab completion under the command line. The user can conveniently and quickly tab out all the command parameters of xmake.
+
+Currently supports zsh/bash/sh and powershell.
+
+
+### More convenient self-updating commands
+
+In previous versions, xmake had provided a convenient self-updating command `xmake update` to update xmake's own version, or even to update the specified branch version, for example: `xmake update dev/master`
+
+However, there are still some shortcomings:
+
+1. Every time you update: you need to recompile the core, so the update is very slow. However, in many cases, the new version only has script changes, and the core does not change.
+2. Update the specified dev/master branch, which is not perfect on Windows, a little lagging, and can't be instantly synced to the online dev/master version.
+
+Therefore, this [OpportunityLiu](https://github.com/OpportunityLiu) has helped a lot of improvements:
+
+1. Provide the `xmake update -s/--scriptonly` parameter, just update the lua script, do not compile the core extra, and implement a fast iterative update.
+2. Improve ci script, implement ci automation build on windows, `xmake update dev` automatically pulls pre-built installation package to download update on ci
+3. You can specify to update xmake from other github repos, so that contributors can update their fork version, and also switch users to repo, `xmake update gitee:tboox/xmake`
+
+## Changelogs
+
+### New features
+
+* [#440](https://github.com/xmake-io/xmake/issues/440): Add `set_rundir()` and `add_runenvs()` api for target/run
+* [#443](https://github.com/xmake-io/xmake/pull/443): Add tab completion support
+* Add `on_link`, `before_link` and `after_link` for rule and target
+* [#190](https://github.com/xmake-io/xmake/issues/190): Add `add_rules("lex", "yacc")` rules to support lex/yacc projects
+
+### Changes
+
+* [#430](https://github.com/xmake-io/xmake/pull/430): Add `add_cucodegens()` api to improve set codegen for cuda
+* [#432](https://github.com/xmake-io/xmake/pull/432): support deps analyze for cu file 
+* [#437](https://github.com/xmake-io/xmake/issues/437): Support explict git source for xmake update: `xmake update github:xmake-io/xmake#dev`
+* [#438](https://github.com/xmake-io/xmake/pull/438): Support to only update scripts, `xmake update --scriptonly dev`
+* [#433](https://github.com/xmake-io/xmake/issues/433): Improve cuda to support device-link
+* [#442](https://github.com/xmake-io/xmake/issues/442): Improve test library
+

+ 134 - 0
docs/posts/xmake-update-v2.2.8.md

@@ -0,0 +1,134 @@
+---
+title: xmake v2.2.8 released, New vs project generator
+tags: [xmake, lua, C/C++, VisualStudio]
+date: 2019-08-22
+author: Ruki
+---
+
+This version provides a new vs project generation plugin (thanks to @[OpportunityLiu](https://github.com/OpportunityLiu) for its contribution), which is quite different from the previous plugin processing mode for generating vs. The vs project is to open all the source files and hand them over to vs to handle the compilation.
+
+In addition, we rewrote the entire luajit io runtime to better support the unicode character set, especially the support for Chinese characters on Windows.
+
+Finally, the new version began to try to install the lua bitcode script directly, to reduce the size of the installation package (controlled within 2.4M), improve the efficiency of xmake boot load.
+
+* [Project Source](https://github.com/xmake-io/xmake)
+* [Official Document](https://xmake.io/)
+
+## Introduction of new features
+
+### Integrating with the new vsxmake generator
+
+The original vs build plugin does not support xmake's rules. Because xmake's rules use a lot of custom scripts like `on_build`, they can't be expanded, so projects like qt, wdk can't support exporting to vs. compile.
+
+Therefore, in order to solve this problem, the new version of the vs. build plugin performs the compile operation by directly calling the xmake command under vs, and also supports intellsence and definition jumps, as well as breakpoint debugging.
+
+The specific use is similar to the old version:
+
+```bash
+$ xmake project -k [vsxmake2010|vsxmake2013|vsxmake2015|..] -m "debug;release"
+```
+
+If no version is specified, xmake will automatically detect the current version of vs to generate:
+
+```bash
+$ xmake project -k vsxmake -m "debug;release"
+```
+
+![](/assets/img/manual/qt_vs.png)
+
+
+
+
+
+
+
+
+
+In addition, the vsxmake plugin will additionally generate a custom configuration property page for easy and flexible modification and appending some xmake compilation configuration in the vs., and even switch to other cross toolchains in the configuration to achieve the vs. vs. Cross-compilation of other platforms such as android, linux.
+
+![](/assets/img/manual/property_page_vsxmake.png)
+
+By the way, the project generated by this vsxmake plugin also supports the selection of a specified batch of source files for quick compilation.
+
+### Unicode encoding support
+
+The original version in some windows environment, and can not handle unicode encoding very well, the Chinese compilation error message displayed may also be garbled. In the new version, xamake built-in luajit/io is completely rewritten in win. Under the unicode encoding provides better support, even in the xmake.lua or source file path, there are characters such as emoji can be handled very well.
+
+```lua
+target("program")
+    set_kind("binary")
+
+    add_files("source file 🎆/*.c")
+    add_includedirs("header file")
+
+    before_build(function()
+        print("start compile 😊")
+    end)
+
+    after_build(function()
+        print("end Compile")
+    end)
+```
+
+### Protobuf c/c++Building support
+
+[xmake-repo](https://github.com/xmake-io/xmake-repo) The official repository has added the protobuf-c/cpp dependency package. Users can easily use protobuf in xmake.lua. With the built-in `protobuf.c`/`protobuf.cpp` build rules,
+We can add a `*.proto` file directly to the project to develop a protocol based on protobuf, for example:
+
+#### Using c library
+
+```lua
+add_requires("protobuf-c")
+
+target("console_c")
+    set_kind("binary")
+    add_packages("protobuf-c")
+
+    add_files("src/*.c")
+    add_files("src/*.proto", {rules = "protobuf.c"})
+```
+
+#### Using the C++ library
+
+```lua
+add_requires("protobuf-cpp")
+
+target("console_c++")
+    set_kind("binary")
+    set_languages("c++11")
+
+    add_packages("protobuf-cpp")
+
+    add_files("src/*.cpp")
+    add_files("src/*.proto", {rules = "protobuf.cpp"})
+```
+
+### Termux/Android Support
+
+The new version of xmake has a good support for android/termux, so that users can encode and compile on android phones anytime and anywhere, with vim effect is very good.
+
+![](https://user-images.githubusercontent.com/151335/62007118-5fa1a180-b17c-11e9-821c-9a6d8d00a23b.jpeg)
+
+## Changelog
+
+### New features
+
+* Add protobuf c/c++ rules
+* [#468](https://github.com/xmake-io/xmake/pull/468): Add utf-8 support for io module on windows
+* [#472](https://github.com/xmake-io/xmake/pull/472): Add `xmake project -k vsxmake` plugin to support call xmake from vs/msbuild
+* [#487](https://github.com/xmake-io/xmake/issues/487): Support to build the selected files for the given target
+* Add filelock for io
+* [#513](https://github.com/xmake-io/xmake/issues/513): Support for android/termux
+* [#517](https://github.com/xmake-io/xmake/issues/517): Add `add_cleanfiles` api for target
+* [#537](https://github.com/xmake-io/xmake/pull/537): Add `set_runenv` api to override os/envs 
+
+### Changes
+
+* [#257](https://github.com/xmake-io/xmake/issues/257): Lock the whole project to avoid other process to access.
+* Attempt to enable /dev/shm for the os.tmpdir
+* [#542](https://github.com/xmake-io/xmake/pull/542): Improve vs unicode output for link/cl
+* Improve binary bitcode lua scripts in the program directory
+
+### Bugs fixed
+
+* [#549](https://github.com/xmake-io/xmake/issues/549): Fix error caused by the new vsDevCmd.bat of vs2019

+ 150 - 0
docs/posts/xmake-update-v2.2.9.md

@@ -0,0 +1,150 @@
+---
+title: xmake v2.2.9 released, Add experimental support for c++ 20 modules
+tags: [xmake, lua, C/C++, c++20, ts-modules]
+date: 2019-12-21
+author: Ruki
+---
+
+There are not many new features in this version. It mainly supports c++ 20 modules experimentally. Currently it supports the clang/msvc compiler. In addition, it improves a lot of user experience and improves some stability.
+
+In addition, this version adds socket.io support and scheduling support for coroutine io to prepare for remote compilation of the next version and subsequent distributed compilation.
+
+* [Project Source](https://github.com/xmake-io/xmake)
+* [Official Document](https://xmake.io/)
+
+## Introduction of new features
+
+### c++20 modules
+
+c++ modules have been officially included in the c++20 draft, and msvc and clang have been basically implemented on [modules-ts](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019 /p1103r3.pdf) Support, as c++20's footsteps are getting closer and closer to us, xmake has also begun to support c++modules in advance.
+
+At present xmake has fully supported the implementation of the modules-ts of msvc/clang. For gcc, since its cxx-modules branch is still under development, it has not officially entered the master. I have read the changelog inside, and the related flags are still in the process. Constantly changing, I feel that it has not stabilized, so I have not supported it yet.
+
+For more information about xmake's progress on c++modules: [https://github.com/xmake-io/xmake/pull/569](https://github.com/xmake-io/xmake/pull/569)
+
+#### Hello Module
+
+I will not talk about the introduction of c++modules. This is mainly about how to build a c++modules project under xmake. Let's look at a simple example:
+
+```lua
+target("hello")
+    set_kind("binary")
+    add_files("src/*.cpp", "src/*.mpp")
+```
+
+The above is a description of the xmake.lua that supports building c++modules files, where `hello.mpp` is the module file:
+
+```c
+#include <cstdio>
+export module hello;
+using namespace std;
+
+export namespace hello {
+    void say(const char* str) {
+        printf("%s\n", str);
+    }
+}
+```
+
+Main.cpp is the main program that uses the hello module:
+
+```c
+import hello;
+
+int main() {
+    hello::say("hello module!");
+    return 0;
+}
+```
+
+Next we execute xmake to build this program:
+
+```console
+ruki:hello ruki$ xmake
+[0%]: ccache compiling.release src/hello.mpp
+[50%]: ccache compiling.release src/main.cpp
+[100%]: linking.release hello
+build ok!
+```
+
+
+
+
+
+
+
+
+xmake will handle all the details logic internally, for developers, just add the module file `*.mpp` as the source file.
+
+#### Module Interface File
+
+The above mentioned `*.mpp` is the module interface file name recommended by xmake. In fact, the default suffix names of the compiler files are not uniform. clang is `*.cppm`, while msvc is `*.ixx`, which is very unfriendly for writing a unified module project across compilers.
+Therefore, reference is made to the recommendation method in [build2](https://build2.org/doc/modules-cppcon2017.pdf), and the unified `*.mpp` suffix is used to standardize the command of the module project interface under xmake.
+
+Of course, this also supports xmake's recommended naming scheme. For suffixes such as `*.ixx` and `*.cppm`, xmake is also fully compatible and can be added directly to `add_files`.
+
+#### Other examples
+
+There are also a lot of engineering examples related to c++modules built into the xmake project. Interested students can refer to the following: [c++module examples](https://github.com/xmake-io/xmake/tree/dev/tests/projects/c%2B%2B/modules)
+
+### set_toolchain interface changes
+
+The set_toolchain interface is mainly used to set different compilation toolchains for the target. Versions before 2.2.9 actually have two interfaces: add_tools and set_tools to handle the same thing, but the two interfaces are named and used in accordance with the specifications. It is very consistent, so some adjustments and changes have been made, and the new set_toolchain interface is used to better set up the toolchain.
+
+For source files added by `add_files("*.c")`, by default, they will call the system's most suitable compilation tool to compile, or modify them manually by using the `xmake f --cc=clang` command, but these are all Globally affects all target targets.
+
+If there are special requirements, you need to specify different compilers, linkers, or compilers of a specific version for a specific target under the current project. At this time, this interface can be used, for example:
+
+```lua
+target("test1")
+    add_files("*.c")
+
+target("test2")
+    add_files("*.c")
+    set_toolchain("cc", "$(projectdir)/tools/bin/clang-5.0")
+```
+
+The above description only makes special settings for the compiler of the test2 target, using a specific clang-5.0 compiler to compile test2, and test1 still uses the default settings.
+
+For some compiler file names that are irregular and cause xmake to fail to recognize and process them as known compiler names, we can also add a tool name hint, for example:
+
+`` `lua
+set_toolchain("cc", "gcc@$(projectdir)/tools/bin/mipscc.exe")
+`` `
+
+The above description sets mipscc.exe as the C compiler, and prompts xmake to compile as a parameter passing method for gcc.
+
+### socket io
+
+This interface has been initially implemented, supports lua coroutine io scheduling, and achieves high concurrent io reading and writing (it will also support process and pipe scheduling support at the same time). It is currently mainly used for xmake itself and is used for subsequent To prepare for remote compilation and distributed compilation, users are not allowed to use it for the time being, but it will be released after subsequent improvements. Users can also make some service programs through socket io in their plugins.
+
+However, there are not many scenarios that users may use. After all, xmake is only a build tool, and rarely allows users to do io communication by themselves.
+
+## Changelog
+
+### New features
+
+* [#569](https://github.com/xmake-io/xmake/pull/569): Add c++ modules build rules
+* Add `xmake project -k xmakefile` generator
+* [620](https://github.com/xmake-io/xmake/issues/620): Add global `~/.xmakerc.lua` for all projects.
+* [593](https://github.com/xmake-io/xmake/pull/593): Add `core.base.socket` module.
+
+### Change
+
+* [#563](https://github.com/xmake-io/xmake/pull/563): Separate build rules for specific language files from action/build 
+* [#570](https://github.com/xmake-io/xmake/issues/570): Add `qt.widgetapp` and `qt.quickapp` rules
+* [#576](https://github.com/xmake-io/xmake/issues/576): Uses `set_toolchain` instead of `add_tools` and `set_tools`
+* Improve `xmake create` action
+* [#589](https://github.com/xmake-io/xmake/issues/589): Improve the default build jobs number to optimize build speed
+* [#598](https://github.com/xmake-io/xmake/issues/598): Improve find_package to support .tbd libraries on macOS
+* [#615](https://github.com/xmake-io/xmake/issues/615): Support to install and use other archs and ios conan packages
+* [#629](https://github.com/xmake-io/xmake/issues/629): Improve hash.uuid and implement uuid v4
+* [#639](https://github.com/xmake-io/xmake/issues/639): Improve to parse argument options to support -jN
+
+### Bugs fixed
+
+* [#567](https://github.com/xmake-io/xmake/issues/567): Fix out of memory for serialize 
+* [#566](https://github.com/xmake-io/xmake/issues/566): Fix link order problem with remote packages 
+* [#565](https://github.com/xmake-io/xmake/issues/565): Fix run path for vcpkg packages
+* [#597](https://github.com/xmake-io/xmake/issues/597): Fix run `xmake require` command too slowly
+* [#634](https://github.com/xmake-io/xmake/issues/634): Fix mode.coverage rule and check flags

+ 290 - 0
docs/posts/xmake-update-v2.3.1.md

@@ -0,0 +1,290 @@
+---
+title: xmake v2.3.1 released, Seamless integration with other build systems
+tags: [xmake, lua, C/C++, autotools, cmake, ninja, mingw, msys]
+date: 2020-02-23
+author: Ruki
+---
+
+author: Ruki}
+---
+
+In the past two months, I have made a lot of refactorings to improve xmake and added a lot of useful new features. Welcome to try it.
+
+* [Project Source](https://github.com/xmake-io/xmake)
+* [Official Document](https://xmake.io/)
+
+Some new features:
+
+1. Compile other projects maintained by the build system with one click to achieve seamless docking and support cross compilation (such as fast cross compilation of autotools, see details below)
+2. Added `xmake project -k ninja` project generation plugin to support generation of build.ninja build system files
+
+Some improvements:
+
+1. Improve command line parameter input, support *nix style parameter input, thanks [@OpportunityLiu](https://github.com/OpportunityLiu) for contribution
+2. Improve tab command completion, add command completion support for parameter values
+3. Optimize get.sh installation and xmake update update scripts, add domestic mirror source, speed up download and install updates
+4. gcc/clang compilation error output support native color highlighting support
+5. Added msys/cygwin platform, and xmake source code also supports msys/mingw platform compilation
+
+Some invisible improvements:
+
+1. Add socket and pipe modules and improve the process module
+2. Refactor the whole process scheduler, better scheduling and parallel construction
+3. Refactoring and improving the entire coroutine coroutine module, supporting simultaneous scheduling support for socket/pipe/process (preparing for subsequent remote compilation and distributed compilation)
+
+There are also some scattered bug fixes, see updates below.
+
+## Introduction of new features
+
+### Generate build.ninja build file
+
+xmake now supports the generation of ninja build files, allowing users to use ninja to quickly build projects maintained by xmake. I have to admit that in terms of build speed, ninja is indeed much faster than xmake. I will try to optimize the build speed of xmake in subsequent versions.
+
+```bash
+$ xmake project -k ninja
+```
+
+Then call ninja to build:
+
+```bash
+$ ninja
+```
+
+Or use the xmake command directly to call the ninja build, see below.
+
+### Try building with another build system
+
+xmake v2.3.1 and above directly interface with other third-party build systems. Even if other projects do not use xmake.lua for maintenance, xmake can directly call other build tools to complete the compilation.
+
+Then the user can directly use a third-party build tool to compile, so why use xmake to call it? The main benefits are:
+
+1. Completely consistent behavior, simplifying the compilation process. No matter which other build system is used, you only need to execute the xmake command to compile. Users no longer need to study the different compilation processes of other tools
+2. Docking the configuration environment of `xmake config`, reuse the platform detection and SDK environment detection of xmake, simplify the platform configuration
+3. Docking cross-compilation environment, even for projects maintained with autotools, you can quickly cross-compile through xmake
+
+Build systems currently supported:
+
+* autotools (cross-compiling environment for xmake)
+* xcodebuild
+* cmake
+* make
+* msbuild
+* scons
+* meson
+* bazel
+* ndkbuild
+* ninja
+
+#### Automatically detect build system and compile
+
+For example, for a project maintained using cmake, executing xmake directly in the project root directory will automatically trigger a detection mechanism, detect CMakeLists.txt, and then prompt the user if cmake is needed to continue compiling.
+
+```bash
+$ xmake 
+note: CMakeLists.txt found, try building it (pass -y or --confirm=y/n/d to skip confirm)?
+please input: y (y/n)
+-- Symbol prefix:
+-- Configuring done
+-- Generating done
+-- Build files have been written to:/Users/ruki/Downloads/libpng-1.6.35/build
+[  7%] Built target png-fix-itxt
+[ 21%] Built target genfiles
+[ 81%] Built target png
+[ 83%] Built target png_static
+...
+output to/Users/ruki/Downloads/libpng-1.6.35/build/artifacts
+build ok!
+```
+
+
+
+
+
+
+
+#### Seamless using xmake command
+
+Currently supports common commands such as `xmake clean`,` xmake --rebuild` and `xmake config` to seamlessly interface with third-party systems.
+
+We can directly clean the compiled output files of the cmake maintenance project
+
+```bash
+$ xmake clean
+$ xmake clean --all
+```
+
+If you bring `--all` to perform the cleanup, all files generated by autotools/cmake will be cleared, not only the object files.
+
+The default `xmake` is docked with incremental build behavior, but we can also force a quick rebuild:
+
+```bash
+$ xmake --rebuild
+```
+
+#### Manually switch the specified build system
+
+If there are multiple build systems under maintenance in a project, such as the libpng project, which comes with autotools/cmake/makefile and other build system maintenance, xmake defaults to using autotools by default. If you want to force switch to other build systems, you can execute:
+
+```bash
+$ xmake f --trybuild=[autotools|cmake|make|msbuild|..]
+$ xmake
+```
+
+In addition, the `--trybuild=` parameter is configured to manually specify the default build system, and the subsequent build process will not prompt the user for selection.
+
+#### Fastly cross compile
+
+As we all know, although many projects maintained by autotools support cross-compilation, the configuration process of cross-compilation is very complicated. There are still many differences in different toolchain processing methods, and many pits will be stepped in the middle.
+
+Even if you run through a toolchain's cross-compilation, if you switch to another toolchain environment, it may take a long time, and if you use xmake, you usually only need two simple commands:
+
+!> At present autotools supports cross-compilation of xmake, and other build systems such as cmake will be added later.
+
+##### Cross compile android platform
+
+```bash
+$ xmake f -p android --trybuild=autotools [--ndk=xxx]
+$ xmake
+```
+
+!> Among them, the --ndk parameter configuration is optional. If the user sets the ANDROID_NDK_HOME environment variable, or if the ndk is placed in ~/Library/Android/sdk/ndk-bundle, xmake can automatically detect it.
+
+Is not it simple? If you think this is not much, then you can directly operate `./configure` to configure cross-compilation. You can see this document for comparison: [Using NDK with other compilation systems] (https://developer.android .com/ndk/guides/other_build_systems # autoconf)
+
+To put it bluntly, you probably have to do this, you may not be able to do it once:
+
+```bash
+$ export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$HOST_TAG
+$ export AR=$TOOLCHAIN/bin/aarch64-linux-android-ar
+$ export AS=$TOOLCHAIN/bin/aarch64-linux-android-as
+$ export CC=$TOOLCHAIN/bin/aarch64-linux-android21-clang
+$ export CXX=$TOOLCHAIN/bin/aarch64-linux-android21-clang++
+$ export LD=$TOOLCHAIN/bin/aarch64-linux-android-ld
+$ export RANLIB=$TOOLCHAIN/bin/aarch64-linux-android-ranlib
+$ export STRIP=$TOOLCHAIN/bin/aarch64-linux-android-strip
+$ ./configure --host aarch64-linux-android
+$ make
+```
+
+##### Cross compile iphoneos platform
+
+```bash
+$ xmake f -p iphoneos --trybuild=autotools
+$ xmake
+```
+
+##### Cross-compile mingw platform
+
+```bash
+$ xmake f -p mingw --trybuild=autotools [--mingw=xxx]
+$ xmake
+```
+
+##### Using other cross-compilation toolchains
+
+```bash
+$ xmake f -p cross --trybuild=autotools --sdk=/xxxx
+$ xmake
+```
+
+For more cross compilation configuration details, please refer to the document: [Cross Compilation](https://xmake.io/#/guide/configuration#cross-compilation), except for an additional `--trybuild=` parameter, all other cross-compilation configuration parameters are completely universal.
+
+#### Passing user configuration parameters
+
+We can use `--tryconfigs=` to pass additional configuration parameters of the user to the corresponding third-party build system. For example: autotools will be passed to `. / Configure`, cmake will be passed to the` cmake` command.
+
+```bash
+$ xmake f --trybuild=autotools --tryconfigs="-enable-shared=no"
+$ xmake
+```
+
+For example, the above command, pass `--enable-shared=no` to`./configure` to disable dynamic library compilation.
+
+In addition, for `--cflags`,` --includedirs` and `--ldflags`, you don't need to pass` --tryconfigs`, you can pass the built-in parameters like `xmake config --cflags=` to pass through.
+
+#### Examples of compiling other build system 
+
+##### General Compilation
+
+In most cases, the compilation method after each docking system is consistent, except for the `--trybuild=` configuration parameter.
+
+```bash
+$ xmake f --trybuild=[autotools|cmake|meson|ninja|bazel|make|msbuild|xcodebuild]
+$ xmake
+```
+
+!> We also need to make sure that the build tool specified by --trybuild is installed and working properly.
+
+##### Building Android jni programs
+
+If `jni/Android.mk` exists in the current project, then xmake can directly call ndk-build to build the jni library.
+
+```bash
+$ xmake f -p android --trybuild=ndkbuild [--ndk =]
+$ xmake
+```
+
+### *nix style command parameter input
+
+The current input specification is referenced from: [https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html)
+
+Thank you very much [@OpportunityLiu](https://github.com/OpportunityLiu) for your contribution. The current input method can support the following writing:
+
+```bash
+$ xmake -j8 -rvD
+```
+
+Before, I could only write:
+
+```bash
+$ xmake -j 8 -r -v -D
+```
+
+### Tab command completion
+
+In previous versions, only parameter names could be completed. You can now complete the parameter values and prompt the value list. For example, after typing the following command:
+
+```bash
+$ xmake f --plat = and
+```
+
+Press the tab key to complete the platform parameters and become
+
+```bash
+$ xmake f --plat = android
+```
+
+### Force C code to be compiled as C ++
+
+xmake adds a configuration parameter that specifies the type of source file and forces it to compile as a corresponding source file, such as compiling c code as c ++.
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("src/*.c", {sourcekind = "cxx"})
+```
+
+## Changelog
+
+### New features
+
+* [#675](https://github.com/xmake-io/xmake/issues/675): Support to compile `*.c` as c++, `add_files("*.c", {sourcekind = "cxx"})`.
+* [#681](https://github.com/xmake-io/xmake/issues/681): Support compile xmake on msys/cygwin and add msys/cygwin platform
+* Add socket/pipe io modules and support to schedule socket/process/pipe in coroutine
+* [#192](https://github.com/xmake-io/xmake/issues/192): Try building project with the third-party buildsystem
+* Enable color diagnostics output for gcc/clang
+* [#588](https://github.com/xmake-io/xmake/issues/588): Improve project generator, `xmake project -k ninja`, support for build.ninja
+
+### Change
+
+* [#665](https://github.com/xmake-io/xmake/issues/665): Support to parse *nix style command options, thanks [@OpportunityLiu](https://github.com/OpportunityLiu)
+* [#673](https://github.com/xmake-io/xmake/pull/673): Improve tab complete to support argument values
+* [#680](https://github.com/xmake-io/xmake/issues/680): Improve get.sh scripts and add download mirrors
+* Improve process scheduler
+* [#651](https://github.com/xmake-io/xmake/issues/651): Improve os/io module syserrors tips
+
+### Bugs fixed
+
+* Fix incremental compilation for checking the dependent file 
+* Fix log output for parsing xmake-vscode/problem info
+* [#684](https://github.com/xmake-io/xmake/issues/684): Fix linker errors for android ndk on windows

+ 76 - 0
docs/posts/xmake-update-v2.3.2.md

@@ -0,0 +1,76 @@
+---
+title: xmake v2.3.2, Build as fast as ninja
+tags: [xmake, lua, C/C++, ninja]
+date: 2020-03-28
+author: Ruki
+---
+
+This version focuses on refactoring and optimization of the internal parallel build mechanism, enabling parallel compilation of source files between multiple targets, and support for parallel links. It also optimizes some internal losses of xmake and fixes some bugs that affect compilation speed.
+Through testing and comparison, the current overall build speed is basically the same as ninja. Compared to cmake/make, meson/ninja is much faster, because they have an extra step to generate makefile / build.ninja.
+
+In addition, xmake also adds support for the sdcc compilation toolchain for compiling embedded programs such as 51/stm8.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Documents](https://xmake.io)
+
+## Some optimizations
+
+1. All source files between multiple targets are built in parallel at the same time (previously, they cannot cross targets, and will be blocked by links in the middle of serialization)
+2. Multiple independent target links can be executed in parallel (previously only one link could be executed)
+3. Fix previous task scheduling bug, more fine-grained scheduling, make full use of CPU core resources
+4. Optimize some losses on xmake's internal api, this effect is also obvious
+
+For more optimization details, please see: [issue #589](https://github.com/xmake-io/xmake/issues/589)
+
+## Build speed comparison
+
+We did some comparison tests on termux and macOS. The test project is at: [xmake-core](https://github.com/xmake-io/xmake/tree/master/core)
+
+For a relatively large number of target projects, the new version of xmake improves its build speed even more.
+
+### Multi-task parallel compilation
+
+| buildsystem     | Termux (8core/-j12) | buildsystem      | MacOS (8core/-j12) |
+|-----            | ----                | ---              | ---                |
+|xmake            | 24.890s             | xmake            | 12.264s            |
+|ninja            | 25.682s             | ninja            | 11.327s            |
+|cmake(gen+make)  | 5.416s+28.473s      | cmake(gen+make)  | 1.203s+14.030s     |
+|cmake(gen+ninja) | 4.458s+24.842s      | cmake(gen+ninja) | 0.988s+11.644s     |
+
+### Single task compilation
+
+| buildsystem     | Termux (-j1)     | buildsystem      | MacOS (-j1)    |
+|-----            | ----             | ---              | ---            |
+|xmake            | 1m57.707s        | xmake            | 39.937s        |
+|ninja            | 1m52.845s        | ninja            | 38.995s        |
+|cmake(gen+make)  | 5.416s+2m10.539s | cmake(gen+make)  | 1.203s+41.737s |
+|cmake(gen+ninja) | 4.458s+1m54.868s | cmake(gen+ninja) | 0.988s+38.022s |
+
+
+
+
+
+
+
+
+### New features
+
+* Add powershell theme for powershell terminal
+* Add `xmake --dry-run -v` to dry run building target and only show verbose build command.
+* [#712](https://github.com/xmake-io/xmake/issues/712): Add sdcc platform and support sdcc compiler
+
+### Change
+
+* [#589](https://github.com/xmake-io/xmake/issues/589): Improve and optimize build speed, supports parallel compilation and linking across targets
+* Improve the ninja/cmake generator
+* [#728](https://github.com/xmake-io/xmake/issues/728): Improve os.cp to support reserve source directory structure
+* [#732](https://github.com/xmake-io/xmake/issues/732): Improve find_package to support `homebrew/cmake` pacakges
+* [#695](https://github.com/xmake-io/xmake/issues/695): Improve android abi
+
+### Bugs fixed
+
+* Fix the link errors output issues for msvc
+* [#718](https://github.com/xmake-io/xmake/issues/718): Fix download cache bug for package
+* [#722](https://github.com/xmake-io/xmake/issues/722): Fix invalid package deps
+* [#719](https://github.com/xmake-io/xmake/issues/719): Fix process exit bug
+* [#720](https://github.com/xmake-io/xmake/issues/720): Fix compile_commands generator

+ 217 - 0
docs/posts/xmake-update-v2.3.3.md

@@ -0,0 +1,217 @@
+---
+title: xmake v2.3.3 released, Support for building iOS/MacOS Framework and App
+tags: [xmake, lua, C/C++, framework, bundle, app, codesign]
+date: 2020-04-27
+author: Ruki
+---
+
+tags: [xmake, lua, C/C++, framework, bundle, app, codesign], date: '2020-04-27',]
+---
+
+This version mainly expands the built-in build rules, and adds relevant rules to support the construction of iOS / MacOS related App application projects, Framework and Bundle programs.
+
+It also supports App signing, and provides related engineering templates to quickly create applications. In addition, this version has also made many improvements to Qt development and construction, adding support for Qt5.14.0 new version SDK and packaging and deployment support for Android It has also improved a lot.
+
+In addition to processing, xmake also provides a special `xmake.cli` build rule, through the integration of libxmake engine library to expand the development of xmake engine-based programs, such as: make a customized version of xmake, you can also write some lua based on this Script program.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Documents](https://xmake.io)
+
+
+
+## iOS/MacOS Program
+
+### Application
+
+Generate *.app/*.ipa application and supports iOS/MacOS.
+
+```lua
+target("test")
+    add_rules("xcode.application")
+    add_files("src/*.m", "src/**.storyboard", "src/*.xcassets")
+    add_files("src/Info.plist")
+```
+
+#### Create Project
+
+We can also quickly create project through template:
+
+```console
+$ xmake create -t xcode.macapp -l objc test
+$ xmake create -t xcode.iosapp -l objc test
+```
+
+#### Build Program
+
+```console
+$ xmake f -p [iphoneos|macosx]
+$ xmake
+[ 18%]: compiling.xcode.release src/Assets.xcassets
+[ 27%]: processing.xcode.release src/Info.plist
+[ 72%]: compiling.xcode.release src/Base.lproj/Main.storyboard
+[ 81%]: compiling.xcode.release src/Base.lproj/LaunchScreen.storyboard
+[ 45%]: ccache compiling.release src/ViewController.m
+[ 63%]: ccache compiling.release src/AppDelegate.m
+[ 54%]: ccache compiling.release src/SceneDelegate.m
+[ 36%]: ccache compiling.release src/main.m
+[ 90%]: linking.release test
+[100%]: generating.xcode.release test.app
+[100%]: build ok!
+```
+
+
+
+
+
+#### Codesign
+
+For iOS programs, it will detect that the system first signs the app with available signatures. Of course, we can also manually specify other signature certificates:
+
+```console
+$ xmake f -p iphoneos --xcode_codesign_identity='Apple Development: [email protected] (T3NA4MRVPU)' --xcode_mobile_provision='iOS Team Provisioning Profile: org.tboox.test --xcode_bundle_identifier=org.tboox.test'
+$ xmake
+```
+
+If it is cumbersome to configure the signature every time, you can set it to the `xmake global` global configuration, or you can set it separately for each target in xmake.lua:
+
+```lua
+target("test")
+    add_rules("xcode.application")
+    add_files("src/*.m", "src/**.storyboard", "src/*.xcassets")
+    add_files("src/Info.plist")
+    add_values("xcode.bundle_identifier", "org.tboox.test")
+    add_values("xcode.codesign_identity", "Apple Development: [email protected] (T3NA4MRVPU)")
+    add_values("xcode.mobile_provision", "iOS Team Provisioning Profile: org.tboox.test")
+```
+
+How do we know the signature configuration we need? One is to view it in xcode. In addition, xmake also provides some auxiliary tools to dump all currently available signature configurations:
+
+```console
+$ xmake l private.tools.codesign.dump
+==================================== codesign identities ====================================
+{ 
+  "Apple Development: [email protected] (T3NA4MRVPU)" = "AF73C231A0C35335B72761BD3759694739D34EB1" 
+}
+
+===================================== mobile provisions =====================================
+{ 
+  "iOS Team Provisioning Profile: org.tboox.test" = "<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>AppIDName</key>
+	<string>XC org tboox test</string>
+	<key>ApplicationIdentifierPrefix</key>
+	<array>
+	<string>43AAQM58X3</string>
+...
+```
+
+We also provide other auxiliary tools to re-sign existing ipa / app programs, for example:
+
+```console
+$ xmake l utils.ipa.resign test.ipa | test.app [codesign_identity] [mobile_provision] [bundle_identifier]
+```
+
+Among them, the following signature parameters are optional, if not set, then a valid signature will be detected by default:
+
+```console
+$ xmake l utils.ipa.resign test.ipa
+$ xmake l utils.ipa.resign test.app "Apple Development: [email protected] (T3NA4MRVPU)"
+$ xmake l utils.ipa.resign test.ipa "Apple Development: [email protected] (T3NA4MRVPU)" iOS Team Provisioning Profile: org.tboox.test" org.tboox.test
+```
+
+#### Run the application
+
+Currently only supports running macos program:
+
+`` `console
+$ xmake run
+`` `
+
+The effect is as follows:
+
+![](/assets/img/guide/macapp.png)
+
+#### Package program
+
+If it is an iOS program, it will generate an ipa installation package, if it is macos, it will generate a dmg package (dmg package generation is still under development for the time being).
+
+```console
+$ xmake package
+output: build/iphoneos/release/arm64/test.ipa
+package ok!
+```
+
+We also provide auxiliary tools to package the specified app program:
+
+```console
+$ xmake l utils.ipa.package test.app output.ipa [iconfile.png]
+```
+
+#### Install
+
+If it is an iOS program, it will install ipa to the device, if it is macos, it will install the app to the `/Applications` directory.
+
+```console
+$ xmake install
+```
+
+We also provide auxiliary tools to install the specified ipa/app program to the device:
+
+```console
+$ xmake l utils.ipa.install test.app
+$ xmake l utils.ipa.install test.ipa
+```
+
+#### Uninstall
+
+!> Currently only the macos program is supported
+
+```console
+$ xmake uninstall
+```
+
+### Framework Program
+
+```lua
+target("test")
+    add_rules("xcode.framework")
+    add_files("src/*.m")
+    add_files("src/Info.plist")
+```
+
+We can also quickly create project through template:
+
+```console
+$ xmake create -t xcode.framework -l objc test
+```
+
+### Bundle Program
+
+```lua
+target("test")
+    add_rules("xcode.bundle")
+    add_files("src/*.m")
+    add_files("src/Info.plist")
+```
+
+We can also quickly create project through template:
+
+```console
+$ xmake create -t xcode.bundle -l objc test
+```
+
+### New features
+
+* [#727](https://github.com/xmake-io/xmake/issues/727): Strip and generate debug symbols file (.so/.dSYM) for android/ios program
+* [#687](https://github.com/xmake-io/xmake/issues/687): Support to generate objc/bundle program.
+* [#743](https://github.com/xmake-io/xmake/issues/743): Support to generate objc/framework program.
+* Support to compile bundle, framework, mac application and ios application, and all some project templates
+* Support generate ios *.ipa file and codesign
+* Add xmake.cli rule to develop lua program with xmake core engine
+
+### Change
+
+* [#750](https://github.com/xmake-io/xmake/issues/750): Improve qt.widgetapp rule to support private slot
+* Improve Qt/deploy for android and support Qt 5.14.0

+ 449 - 0
docs/posts/xmake-update-v2.3.4.md

@@ -0,0 +1,449 @@
+---
+title: xmake v2.3.4 released, better toolchain support
+tags: [xmake, lua, C/C++, toolchains, cross-compilation]
+date: 2020-06-05
+author: Ruki
+---
+
+In order to make xmake better support cross-compilation, this version I refactored the entire tool chain, making the tool chain switching more convenient and fast, and now users can easily extend their tool chain in xmake.lua.
+
+With regard to platform support, we have added support for *BSD systems. In addition, this version also adds a ninja theme style to achieve ninja-like compilation progress display, for example:
+
+<img src="/assets/img/theme/ninja.png" width="60%" />
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Documents](https://xmake.io)
+
+
+
+
+## Introduction of New Features
+
+### Toolchain improvements
+
+#### Toolchain and platform are completely separated
+
+In previous versions, the platform and tool chain were too tightly bound. For example, the `xmake f -p windows` platform can only use msvc compilation by default. If you want to switch to clang or other compilers, you can only cross the compilation platform: `xmake f -p cross`.
+
+But in this case, some settings specific to the windows platform are lost, and users cannot use `if is_plat("windows") then` to judge the windows platform to make specific settings.
+
+In fact, the platform and the tool chain can be opened independently. After the new version has been refactored, even the windows platform and any other platforms can easily and quickly switch to other tool chains such as clang, llvm and so on.
+
+```bash
+$ xmake f -p windows --toolchain=clang
+```
+
+#### Built-in toolchain
+
+Although xmake's cross-compilation configuration supports all toolchains, and also provides a certain degree of intelligent analysis and toolchain detection, the general solution needs to add various additional configurations for specific toolchain support, such as passing some `--ldflags=` , `--cxflags=` parameter or something.
+
+The new version of xmake has some common tool chains built in, which can save the complicated configuration process of cross-compiling tool chains, and only need to pass the tool chain name to `--toolchain=xxx`.
+
+Switch to the llvm tool chain:
+
+```bash
+$ xmake f -p cross --toolchain=llvm --sdk="C:\Program Files\LLVM"
+$ xmake
+```
+
+切换到GNU-RM工具链:
+
+```bash
+$ xmake f -p cross --toolchain=gnu-rm --sdk=/xxx/cc-arm-none-eabi-9-2019-q4-major
+$ xmake
+```
+
+You can quickly switch the designated cross-compilation toolchain. For the built-in toolchain, you can save most of the configuration. Usually only need to be `--toolchain=` and `--sdk=`, other configurations will be automatically set Ok, make sure it compiles normally.
+
+What other built-in tool chains does xmake support? We can view through the following command:
+
+```bash
+$ xmake show -l toolchains
+xcode         Xcode IDE
+vs            VisualStudio IDE
+yasm          The Yasm Modular Assembler
+clang         A C language family frontend for LLVM
+go            Go Programming Language Compiler
+dlang         D Programming Language Compiler
+sdcc          Small Device C Compiler
+cuda          CUDA Toolkit
+ndk           Android NDK
+rust          Rust Programming Language Compiler
+llvm          A collection of modular and reusable compiler and toolchain technologies
+cross         Common cross compilation toolchain
+nasm          NASM Assembler
+gcc           GNU Compiler Collection
+mingw         Minimalist GNU for Windows
+gnu-rm        GNU Arm Embedded Toolchain
+envs          Environment variables toolchain
+fasm          Flat Assembler
+```
+
+#### Synchronous switching of toolchain
+
+The new version of xmake also supports full synchronous switching of the toolchain. What does this mean?
+
+For example, if we want to switch from the default gcc to clang compilation, we may need to cut some toolset, `xmake f --cc=clang --cxx=clang --ld=clang++ --sh=clang++`, because the compiler cut , Corresponding linker, static library archiver must cut everything at the same time.
+
+It's really painful to cut one side by one, and the author himself can't stand it, so when refactoring the tool chain, this piece has also been focused on improvement. Now only need:
+
+```bash
+$ xmake f --toolchain=clang
+$ xmake
+```
+
+You can completely cut through all the clang tool set as a whole, so how to switch back to gcc, it is also very convenient:
+
+or
+
+```bash
+$ xmake f --toolchain=gcc
+$ xmake
+```
+
+
+#### Custom toolchain
+
+In addition, we can also customize the toolchain in xmake.lua, and then specify the switch through `xmake f --toolchain=myclang`, for example:
+
+```lua
+toolchain("myclang")
+    set_kind("standalone")
+    set_toolset("cc", "clang")
+    set_toolset("cxx", "clang", "clang++")
+    set_toolset("ld", "clang++", "clang")
+    set_toolset("sh", "clang++", "clang")
+    set_toolset("ar", "ar")
+    set_toolset("ex", "ar")
+    set_toolset("strip", "strip")
+    set_toolset("mm", "clang")
+    set_toolset("mxx", "clang", "clang++")
+    set_toolset("as", "clang")
+
+    -- ...
+```
+
+Among them `set_toolset` is used to set different tool sets one by one, such as compiler, linker, assembler, etc.
+
+By default, xmake will detect tools from the sdk parameters of `xmake f --sdk=xx`. Of course, we can also call `set_sdk("/xxx/llvm")` for each custom tool chain in xmake.lua Write the toolchain SDK address.
+
+For more details about this piece, you can go to the [Custom Tool Chain] (https://xmake.io/zh-cn/manual/custom_toolchain) chapter to view
+
+For more details, please see: [#780](https://github.com/xmake-io/xmake/issues/780)
+
+#### Set up a toolchain for a specific target
+
+In addition to custom toolchains, we can also switch different toolchains individually for a specific target. Unlike set_toolset, this interface is an overall switchover of the complete toolchain, such as cc/ld/sh and a series of tools. set.
+
+This is also a recommended practice, because most compiler tool chains like gcc/clang, the compiler and the linker are used together. To cut it, you have to cut it as a whole. Separate and scattered switch settings will be cumbersome.
+
+For example, we switch the test target to two tool chains of clang+yasm:
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    set_toolchains("clang", "yasm")
+```
+
+Or you can set specific tools in each target's tool chain through `set_toolset`.
+
+```lua
+target("test")
+    set_kind("binary")
+    set_toolset("cxx", "clang")
+    set_toolset("ld", "clang++")
+```
+
+### ninja build theme
+
+The construction progress style is similar to ninja, using a single-line progress bar, no longer rolling back the progress, users can set according to their own preferences.
+
+The configuration of the default theme is the same except that the progress is displayed differently.
+
+```bash
+$ xmake g --theme=ninja
+```
+
+<img src="/assets/img/theme/ninja.png" width="60%" />
+
+### Set Build Behavior Strategy
+
+Xmake has many default behaviors, such as: automatic detection and mapping of flags, cross-target parallel construction, etc. Although it provides a certain amount of intelligent processing, it is difficult to adjust and may not meet all users' habits and needs.
+
+Therefore, starting with v2.3.4, xmake provides modified settings for the default build strategy, which is open to users to a certain degree of configurability.
+
+The usage is as follows:
+
+```lua
+set_policy("check.auto_ignore_flags", false)
+```
+
+You only need to set this configuration in the project root domain to disable the automatic detection and ignore mechanism of flags. In addition, set_policy can also take effect locally for a specific target.
+
+```lua
+target("test")
+    set_policy("check.auto_ignore_flags", false)
+```
+
+!> In addition, if the set policy name is invalid, xmake will also have a warning prompt.
+
+If you want to get a list and description of all the policy configurations supported by the current xmake, you can execute the following command:
+
+```bash
+$ xmake l core.project.policy.policies
+{
+  "check.auto_map_flags" = {
+    type = "boolean",
+    description = "Enable map gcc flags to the current compiler and linker automatically.",
+    default = true
+  },
+  "build.across_targets_in_parallel" = {
+    type = "boolean",
+    description = "Enable compile the source files for each target in parallel.",
+    default = true
+  },
+  "check.auto_ignore_flags" = {
+    type = "boolean",
+    description = "Enable check and ignore unsupported flags automatically.",
+    default = true
+  }
+}
+```
+
+#### check.auto_ignore_flags
+
+By default, xmake will automatically detect all the original flags set by the `add_cxflags` and `add_ldflags` interfaces. If the current compiler and linker do not support them, they will be automatically ignored.
+
+This is usually very useful. Like some optional compilation flags, it can be compiled normally even if it is not supported, but it is forced to be set up. When compiling, other users may have a certain degree of support due to the different strength of the compiler. The compilation failed.
+
+However, because automatic detection does not guarantee 100% reliability, sometimes there will be a certain degree of misjudgment, so some users do not like this setting (especially for cross-compilation tool chains, which are more likely to fail).
+
+At present, if the detection fails in v2.3.4, there will be a warning prompt to prevent users from lying inexplicably, for example:
+
+```bash
+warning: add_ldflags("-static") is ignored, please pass `{force = true}` or call `set_policy("check.auto_ignore_flags", false)` if you want to set it.
+```
+
+According to the prompt, we can analyze and judge ourselves whether it is necessary to set this flags. One way is to pass:
+
+```lua
+add_ldflags("-static", {force = true})
+```
+
+To display the mandatory settings, skip automatic detection, which is an effective and fast way to deal with occasional flags failure, but for cross-compilation, if a bunch of flags settings cannot be detected, each set force Too tedious.
+
+At this time, we can use `set_policy` to directly disable the default automatic detection behavior for a target or the entire project:
+
+```lua
+set_policy("check.auto_ignore_flags", false)
+target("test")
+    add_ldflags("-static")
+```
+
+Then we can set various original flags at will, xmake will not automatically detect and ignore them.
+
+#### check.auto_map_flags
+
+This is another intelligent analysis processing of flags by xmake. Usually, the configuration of xmake built-in api like `add_links`, `add_defines` has cross-platform characteristics, and different compiler platforms will automatically process them into corresponding ones. Original flags.
+
+However, in some cases, users still need to set the original compilation link flags by add_cxflags, add_ldflags, these flags are not good cross compiler
+
+Take `-O0` compiler optimization flags. Although `set_optimize` is used to implement cross-compiler configuration, what if the user directly sets `add_cxflags("-O0")`? It can be processed normally under gcc/clang, but it is not supported under msvc
+
+Maybe we can use `if is_plat() then` to process by platform, but it is very cumbersome, so xmake has built-in automatic mapping function of flags.
+
+Based on the popularity of gcc flags, xmake uses gcc's flags naming convention to automatically map it according to different compilations, for example:
+
+```lua
+add_cxflags("-O0")
+```
+
+This line setting is still `-O0` under gcc/clang, but if it is currently msvc compiler, it will be automatically mapped to msvc corresponding to `-Od` compilation option to disable optimization.
+
+Throughout the process, users are completely unaware, and can execute xmake directly to compile across compilers.
+
+!> Of course, the current implementation of automatic mapping is not very mature. There is no 100% coverage of all gcc flags, so there are still many flags that are not mapped.
+
+Some users do not like this automatic mapping behavior, so we can completely disable this default behavior through the following settings:
+
+```bash
+set_policy("check.auto_map_flags", false)
+```
+
+#### build.across_targets_in_parallel
+
+This strategy is also enabled by default and is mainly used to perform parallel builds between targets. In versions prior to v2.3.3, parallel builds can only target all source files within a single target.
+For cross-target compilation, you must wait until the previous target is fully linked before you can execute the compilation of the next target, which will affect the compilation speed to a certain extent.
+
+However, the source files of each target can be completely parallelized, and finally the link process is executed together. Versions after v2.3.3 through this optimization, the construction speed is increased by 30%.
+
+Of course, if the build source files in some special targets depend on previous targets (especially in the case of some custom rules, although rarely encountered), we can also disable this optimization behavior through the following settings:
+
+```bash
+set_policy("build.across_targets_in_parallel", false)
+```
+
+### Add compilation mode
+
+#### mode.releasedbg
+
+Add releasedbg compilation mode configuration rules for the current project xmake.lua, for example:
+
+```lua
+add_rules("mode.releasedbg")
+```
+
+!> Compared with the release mode, this mode will also enable additional debugging symbols, which is usually very useful.
+
+Equivalent to:
+
+```lua
+if is_mode("releasedbg") then
+    set_symbols("debug")
+    set_optimize("fastest")
+    set_strip("all")
+end
+```
+
+We can switch to this compilation mode by: `xmake f -m releasedbg`.
+
+#### mode.minsizerel
+
+Add minsizerel configuration mode configuration rules for the current project xmake.lua, for example:
+
+```lua
+add_rules("mode.minsizerel")
+```
+
+!> Compared with the release mode, this mode is more inclined to the minimum code compilation optimization, rather than speed priority.
+
+Equivalent to:
+
+```lua
+if is_mode("minsizerel") then
+    set_symbols("hidden")
+    set_optimize("smallest")
+    set_strip("all")
+end
+```
+
+We can switch to this compilation mode by: `xmake f -m minsizerel`.
+
+### Show specified information and list
+
+#### Show basic information about xmake itself and the current project
+
+```bash
+$ xmake show
+The information of xmake:
+    version: 2.3.3+202006011009
+    host: macosx/x86_64
+    programdir: /Users/ruki/.local/share/xmake
+    programfile: /Users/ruki/.local/bin/xmake
+    globaldir: /Users/ruki/.xmake
+    tmpdir: /var/folders/32/w9cz0y_14hs19lkbs6v6_fm80000gn/T/.xmake501/200603
+    workingdir: /Users/ruki/projects/personal/tbox
+    packagedir: /Users/ruki/.xmake/packages
+    packagedir(cache): /Users/ruki/.xmake/cache/packages/2006
+
+The information of project: tbox
+    version: 1.6.5
+    plat: macosx
+    arch: x86_64
+    mode: release
+    buildir: build
+    configdir: /Users/ruki/projects/personal/tbox/.xmake/macosx/x86_64
+    projectdir: /Users/ruki/projects/personal/tbox
+    projectfile: /Users/ruki/projects/personal/tbox/xmake.lua
+```
+
+#### Show toolchains list
+
+```bash
+$ xmake show -l toolchains
+xcode         Xcode IDE
+vs            VisualStudio IDE
+yasm          The Yasm Modular Assembler
+clang         A C language family frontend for LLVM
+...
+```
+
+#### Show the specified target configuration information
+
+```bash
+$ xmake show --target=tbox
+The information of target(tbox):
+    kind: static
+    targetfile: build/macosx/x86_64/release/libtbox.a
+    rules: mode.release, mode.debug, mode.profile, mode.coverage
+    options: info, float, wchar, exception, force-utf8, deprecated, xml, zip, hash, regex, coroutine, object, charset, database
+    packages: mbedtls, polarssl, openssl, pcre2, pcre, zlib, mysql, sqlite3
+    links: pthread
+    syslinks: pthread, dl, m, c
+    cxflags: -Wno-error=deprecated-declarations, -fno-strict-aliasing, -Wno-error=expansion-to-defined, -fno-stack-protector
+    defines: __tb_small__, __tb_prefix__="tbox"
+    mxflags: -Wno-error=deprecated-declarations, -fno-strict-aliasing, -Wno-error=expansion-to-defined
+    headerfiles: src/(tbox/**.h)|**/impl/**.h, src/(tbox/prefix/**/prefix.S), src/(tbox/math/impl/*.h), src/(tbox/utils/impl/*.h), build/macosx/x86_64/release/tbox.config.h
+    includedirs: src, build/macosx/x86_64/release
+    at: /Users/ruki/projects/personal/tbox/src/tbox/xmake.lua
+    sourcebatch(cc): with rule(c.build)
+      -> src/tbox/string/static_string.c
+         -> build/.objs/tbox/macosx/x86_64/release/src/tbox/string/static_string.c.o
+         -> build/.deps/tbox/macosx/x86_64/release/src/tbox/string/static_string.c.o.d
+      -> src/tbox/platform/sched.c
+         -> build/.objs/tbox/macosx/x86_64/release/src/tbox/platform/sched.c.o
+         -> build/.deps/tbox/macosx/x86_64/release/src/tbox/platform/sched.c.o.d
+      -> src/tbox/stream/stream.c
+         -> build/.objs/tbox/macosx/x86_64/release/src/tbox/stream/stream.c.o
+         -> build/.deps/tbox/macosx/x86_64/release/src/tbox/stream/stream.c.o.d
+      -> src/tbox/utils/base32.c
+         -> build/.objs/tbox/macosx/x86_64/release/src/tbox/utils/base32.c.o
+         -> build/.deps/tbox/macosx/x86_64/release/src/tbox/utils/base32.c.o.d
+```
+
+#### Show a list of built-in compilation modes
+
+```bash
+$ xmake show -l modes
+```
+
+#### Show the list of built-in compilation rules
+
+```bash
+$ xmake show -l rules
+```
+
+#### Show additional information
+
+It is still being perfected, see: https://github.com/xmake-io/xmake/issues/798
+
+Or run:
+
+```bash
+$ xmake show --help
+```
+
+### New features
+
+* [#630](https://github.com/xmake-io/xmake/issues/630): Support *BSD system, e.g. FreeBSD, ..
+* Add wprint builtin api to show warnings
+* [#784](https://github.com/xmake-io/xmake/issues/784): Add `set_policy()` to set and modify some builtin policies
+* [#780](https://github.com/xmake-io/xmake/issues/780): Add set_toolchains/set_toolsets for target and improve to detect cross-compilation toolchains
+* [#798](https://github.com/xmake-io/xmake/issues/798): Add `xmake show` plugin to show some builtin configuration values and infos
+* [#797](https://github.com/xmake-io/xmake/issues/797): Add ninja theme style, e.g. `xmake g --theme=ninja`
+* [#816](https://github.com/xmake-io/xmake/issues/816): Add mode.releasedbg and mode.minsizerel rules
+* [#819](https://github.com/xmake-io/xmake/issues/819): Support ansi/vt100 terminal control
+
+### Change
+
+* [#771](https://github.com/xmake-io/xmake/issues/771): Check includedirs, linkdirs and frameworkdirs
+* [#774](https://github.com/xmake-io/xmake/issues/774): Support ltui windows resize for `xmake f --menu`
+* [#782](https://github.com/xmake-io/xmake/issues/782): Add check flags failed tips for add_cxflags, ..
+* [#808](https://github.com/xmake-io/xmake/issues/808): Support add_frameworks for cmakelists
+* [#820](https://github.com/xmake-io/xmake/issues/820): Support independent working/build directory
+
+### Bug fixed
+
+* [#786](https://github.com/xmake-io/xmake/issues/786): Fix check header file deps
+* [#810](https://github.com/xmake-io/xmake/issues/810): Fix strip debug bug for linux

+ 238 - 0
docs/posts/xmake-update-v2.3.5.md

@@ -0,0 +1,238 @@
+---
+title: xmake v2.3.5 released, Multi-toolchain flexible switching support
+tags: [xmake, lua, C/C++, toolchains, cross-compilation]
+date: 2020-06-28
+author: Ruki
+---
+
+The main work of this version is to continue to improve the support of the tool chain. Although the previous version achieved modular tool chain extension through refactoring, for one compilation, I want to flexibly switch the compilation on the cross tool chain/Host tool chain. Not very good support, so this version focuses on improving the support of this piece.
+
+In addition, this version also improves the problem of slow downloading of remote dependent packages integrated using `add_requires`, adding proxy settings and local package retrieval multiplexing support to improve this problem. Of course, the best way is to get a domestic CDN to speed up the download, but this cost is too high, for the time being not toss.
+
+There are some minor changes and bug fixes, you can see the updated content at the bottom of the article.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Documents](https://xmake.io)
+
+## Introduction of New Features
+
+### Multi-toolchain flexible switching
+
+For an example of this, please refer to the luajit project. The compilation process needs to first compile the two targets minilua/buildvm under the host platform, and then generate the jit code corresponding to the target platform through minilua/buildvm to participate in the compilation of the overall luajit library.
+
+Therefore, the entire compilation process needs to use the host tool chain for a specific target, and then use the cross tool chain to complete the compilation for other targets.
+
+So how should we configure xmake.lua to achieve this way, one is to set the specified host toolchain for a specific target through the `set_toolchains` interface, for example:
+
+
+```lua
+target("buildvm")
+    set_kind("binary")
+    add_files("src/*.c")
+    set_toolchains("xcode", {plat = os.host(), arch = os.arch()})
+
+target("luajit")
+    set_kind("static")
+    add_deps("buildvm")
+    add_files("src/*.c")
+```
+
+If you are currently in cross-compilation mode, even if you execute the following command to configure the android compilation platform, its buildvm is still using xcode to compile the macOS target program, only the luajit library is compiled using the ndk toolchain:
+
+```console
+$ xmake f -p android --ndk=/xxxx
+```
+
+
+However, this is not particularly convenient, especially when cross-platform compilation, pc tool chains of different platforms are different, there are msvc, xcode, clang, etc., you need to judge the platform to specify.
+
+We can also continue to generalize and let xmake automatically select the currently available Host toolchain for different platforms, instead of explicitly specifying a specific toolchain, and improve it to the following version:
+
+```lua
+target("buildvm")
+    set_kind("binary")
+    add_files("src/*.c")
+    set_plat(os.host())
+    set_host(os.arch())
+
+target("luajit")
+    set_kind("static")
+    add_deps("buildvm")
+    add_files("src/*.c")
+```
+
+By using [set_plat](https://xmake.io/#/manual/project_target#targetset_plat) and [set_arch](https://xmake.io/#/manual/project_target#targetset_arch) interface, directly set a specific target to the host platform, you can automatically select the host tool chain internally.
+
+For a complete configuration example of this piece, you can refer to: https://github.com/xmake-io/xmake-repo/blob/master/packages/l/luajit/port/xmake.lua
+
+
+
+
+
+
+
+
+
+
+## Remote package download optimization
+
+If the download package is slow or fails due to an unstable network, we can use the following methods to resolve it.
+
+### Manual download
+
+By default, xmake will call curl, wget and other tools to download, users can also manually download with their own downloader (you can also use an agent), and put the downloaded package in their own directory, for example: `/download/packages/zlib -v1.0.tar.gz`
+
+Then use the following command to set the search directory for package download:
+
+```console
+$ xmake g --pkg_searchdirs="/download/packages"
+```
+
+Then re-execute xmake to compile, xmake will first look for the source package from `/download/packages`, and then use it directly, no longer download it yourself.
+
+As for the package name you are looking for, you can check it by the following command:
+
+```console
+$ xmake require --info zlib
+-> searchdirs: /download/packages
+-> searchnames: zlib-1.2.11.tar.gz
+```
+
+We can see the corresponding search directory and the searched package name.
+
+### Proxy download
+
+If manual downloading is still troublesome, we can also let xmake go directly to the agent.
+
+```console
+$ xmake g --proxy="socks5://127.0.0.1:1086"
+$ xmake g --help
+    -x PROXY, --proxy=PROXY Use proxy on given port. [PROTOCOL://]HOST[:PORT]
+                                 e.g.
+                                 -xmake g --proxy='http://host:port'
+                                 -xmake g --proxy='https://host:port'
+                                 -xmake g --proxy='socks5://host:port'
+```
+
+The `--proxy` parameter specifies the proxy protocol and address. The specific syntax can refer to curl. Usually, it can support http, https, socks5 and other protocols, but the actual support depends on curl, wget and git. For example, wget does not support the socks5 protocol.
+
+We can use the following parameters to specify which hosts go to the proxy. If not set, the default is to go global.
+
+```console
+--proxy_hosts=PROXY_HOSTS Only enable proxy for the given hosts list, it will enable all if be unset,
+                             and we can pass match pattern to list:
+                                 e.g.
+                                 -xmake g --proxy_hosts='github.com,gitlab.*,*.xmake.io'
+```
+
+If the hosts list is set, then the matching hosts in this list will go to the proxy. .
+
+`--proxy_host` supports multiple hosts settings, separated by commas, and supports basic pattern matching *.github.com, and other lua pattern matching rules are also supported
+
+If we feel that the above hosts mode configuration is not flexible enough, we can also follow pac's automatic proxy configuration rules:
+
+```console
+--proxy_pac=PROXY_PAC Set the auto proxy configuration file. (default: pac.lua)
+                                     e.g.
+                                     -xmake g --proxy_pac=pac.lua (in /Users/ruki/.xmake or absolute path)
+                                     -function main(url, host)
+                                           if host =='github.com' then
+                                                return true
+                                           end
+                                       end
+```
+
+!> If there are proxy_hosts, host configuration is preferred, otherwise, pac configuration is used.
+
+The default path of pac: ~/.xmake/pac.lua, if --proxy is set, and this file exists, it will automatically go to pac. If it does not exist, and there are no hosts, then the proxy will take effect globally.
+
+You can also manually specify the pac full path
+
+```console
+$ xmake g --proxy_pac=/xxxx/xxxxx_pac.lua
+```
+
+Configuration rule description:
+
+```lua
+function main(url, host)
+    if host:find("bintray.com") then
+        return true
+    end
+end
+```
+
+If it returns true, then the url and host are the proxy to go, not to return or return false, it is not to proxy.
+
+For specific details of this section, please see: [https://github.com/xmake-io/xmake/issues/854](https://github.com/xmake-io/xmake/issues/854)
+
+!> In addition, in addition to relying on package downloads, other commands related to network downloads also support proxies, such as: `xmake update`
+
+## Other small changes
+
+### rc header file depends on compilation support
+
+Although the rc compiler in msvc does not natively support the export of the `#include <xxx.h>` header file list in the .rc file, xmake still directly extracts the .rc source file by parsing it in a disguised way. The list is also extracted to achieve header file dependent compilation support.
+
+Although it may not be accurate enough (the macro cannot be processed yet), it is basically usable.
+
+### Improve mode.minsizerel compilation mode
+
+The new version has the minimum compilation under msvc, and the `/GL` compilation option is turned on by default. The size of the target file is further optimized, and the optimization effect is relatively obvious.
+
+For details about this, please refer to: [https://github.com/xmake-io/xmake/issues/835](https://github.com/xmake-io/xmake/issues/835)
+
+### Improve protobuf rule support
+
+The built-in `protobuf.cpp` compilation rule of xmake also supports the case of importing multi-level subdirectories in `*.proto`. Previously, only proto files at the same level could be used.
+
+This is the case for `import common-files/b.proto`:
+
+```
+proto-files
+    a.proto
+    common-files
+        b.proto
+```
+
+The corresponding xmake.lua configuration is as follows:
+
+
+```lua
+add_requires("protobuf-cpp")
+
+target("test")
+    set_kind("binary")
+    set_languages("c++11")
+    add_packages("protobuf-cpp")
+    add_files("*.cpp")
+    add_files("proto/**.proto", {rules = "protobuf.cpp", proto_rootdir = "proto"})
+```
+
+Compared to before, an additional `{proto_rootdir = ""}` configuration needs to be passed to specify the root directory of all protos relative to the import.
+
+For details about this, see: [https://github.com/xmake-io/xmake/issues/828](https://github.com/xmake-io/xmake/issues/828)
+
+## Changlog
+
+### New features
+
+* Add `xmake show -l envs` to show all builtin envirnoment variables
+* [#861](https://github.com/xmake-io/xmake/issues/861): Support search local package file to install remote package
+* [#854](https://github.com/xmake-io/xmake/issues/854): Support global proxy settings for curl, wget and git
+
+### Change
+
+* [#828](https://github.com/xmake-io/xmake/issues/828): Support to import sub-directory files for protobuf rules
+* [#835](https://github.com/xmake-io/xmake/issues/835): Improve mode.minsizerel to add /GL flags for msvc
+* [#828](https://github.com/xmake-io/xmake/issues/828): Support multi-level directories for protobuf/import
+* [#838](https://github.com/xmake-io/xmake/issues/838#issuecomment-643570920): Support to override builtin-rules for `add_files("src/*.c", {rules = {"xx", override = true}})`
+* [#847](https://github.com/xmake-io/xmake/issues/847): Support to parse include deps for rc file
+* Improve msvc tool chain, remove the dependence of global environment variables
+* [#857](https://github.com/xmake-io/xmake/pull/857): Improved `set_toolchains()` when cross-compilation is supported, specific target can be switched to host toolchain and compiled at the same time
+
+### Bugs fixed
+
+* Fix the progress bug for theme
+* [#829](https://github.com/xmake-io/xmake/issues/829): Fix invalid sysroot path for macOS
+* [#832](https://github.com/xmake-io/xmake/issues/832): Fix find_packages bug for the debug mode

+ 193 - 0
docs/posts/xmake-update-v2.3.6.md

@@ -0,0 +1,193 @@
+---
+title: xmake v2.3.6 released, Added fortran compilation support
+tags: [xmake, lua, C/C++, toolchains, fortran, zig, golang, dlang]
+date: 2020-07-28
+author: Ruki
+---
+
+This version focuses on some improvements to the support of other languages, such as fortran compilation support, experimental support for zig language, and third-party dependency package support and cross-compilation support for golang/dlang.
+
+Although, xmake focuses on c/c++ build support, other languages support xmake will also make some improvements from time to time. Its main purpose is not to replace their official build system, but only to support mixed compilation with c/c++ , To better serve c/c++ projects,
+After all, some c/c++ projects still occasionally call code interfaces of other languages, such as mixed calls with languages such as cuda, dlang, objc, swift, asm, etc., so xmake still provides some basic compilation support for them.
+
+In addition, regarding c/c++, we also support the header file dependency format of the new `/sourceDependencies xxx.json` output in the vs preview version (this is more reliable and stable for multi-language header file dependency detection).
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Documents](https://xmake.io)
+
+![](/assets/img/index/xmake-basic-render.gif)
+
+## Introduction of New Features
+
+### Fortran language compilation support
+
+Starting from this version, we have fully supported the use of the gfortran compiler to compile fortran projects, we can quickly create an empty project based on fortran by using the following command:
+
+```console
+$ xmake create -l fortran -t console test
+```
+
+Its xmake.lua content is as follows:
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.f90")
+```
+
+More code examples can be viewed here: [Fortran Examples](https://github.com/xmake-io/xmake/tree/master/tests/projects/fortran)
+
+
+
+
+
+
+
+
+### Zig language experimental support
+
+Note: At present, this language xmake is still in the experimental support stage, and it is not perfect. For example, it is not supported on windows, and dynamic library compilation under linux/macOS is not yet supported. Please evaluate and use it yourself.
+
+We can use the following configuration method to try and experience, at least the console and static library programs under linux/macOS can still run.
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.zig")
+```
+
+As for why windows does not support it, please refer to the issues I mentioned to zig earlier, [#5825](https://github.com/ziglang/zig/issues/5825)
+
+The dynamic library does not support it because I have some pitfalls (the dynamic library generated by zig will automatically append `.0.0.0`), see: [issue 5827](https://github.com/ziglang/zig/ issues/5827)
+
+In addition, I lay down in other pits. I personally feel that there are a lot of pits, so I'm still in the experimental stage for the time being, and I will look at it later.
+
+For more examples, see: [Zig Examples](https://github.com/xmake-io/xmake/tree/master/tests/projects/zig)
+
+### Go dependency package and cross compilation support
+
+The new version of xmake continues to make some improvements to the go build support, such as cross-compilation of go. For example, we can compile windows programs on macOS and linux:
+
+```console
+$ xmake f -p windows -a x86
+```
+
+In addition, the new version also initially supports the third-party dependency package management of go:
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+add_requires("go::github.com/sirupsen/logrus", {alias = "logrus"})
+add_requires("go::golang.org/x/sys/internal/unsafeheader", {alias = "unsafeheader"})
+if is_plat("windows") then
+    add_requires("go::golang.org/x/sys/windows", {alias = "syshost"})
+else
+    add_requires("go::golang.org/x/sys/unix", {alias = "syshost"})
+end
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.go")
+    add_packages("logrus", "syshost", "unsafeheader")
+```
+
+However, there are still some imperfections. For example, all cascading dependency packages must be manually configured at present, which will be a bit more cumbersome and needs to be improved in the future.
+
+For more examples, see: [Go Examples](https://github.com/xmake-io/xmake/tree/master/tests/projects/go)
+
+### Dlang/Dub dependency package support
+
+xmake also supports dlang's dub package management, which can quickly integrate dlang's third-party dependency packages:
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+add_requires("dub::log 0.4.3", {alias = "log"})
+add_requires("dub::dateparser", {alias = "dateparser"})
+add_requires("dub::emsi_containers", {alias = "emsi_containers"})
+add_requires("dub::stdx-allocator", {alias = "stdx-allocator"})
+add_requires("dub::mir-core", {alias = "mir-core"})
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.d")
+    add_packages("log", "dateparser", "emsi_containers", "stdx-allocator", "mir-core")
+```
+
+### cl.exe new header file dependent file support
+
+The header file dependency of msvc usually needs to parse the output content of `/showIncludes` and extract the includes file list inside to handle the dependency compilation problem. However, cl.exe does a very bad job of this output. The includes information and compilation output are Mixed together.
+
+It is very unfriendly to build tools to handle dependency analysis, especially in a multi-language environment, how to judge is includes, you need to judge the extraction through the preceding `Note: including file:` string, but in Chinese, it is `Note: include File: `,
+If you change to the Japanese environment, it is also a Japanese prefix string, the encoding format problems, hard-coding problems, and the parsing and processing are not perfect.
+
+Regarding this point, in the latest vs2019 preview version, Microsoft has finally made improvements to the alignment. Through the new `/sourceDependencies xxx.json` compilation option, the includes dependency information can be better output, which is convenient for analysis and extraction in a multilingual environment.
+
+In addition, the output of this new option is independent of a separate json file, and finally is not mixed with the compilation output, and finally there is no need to parse and separate compilation errors, warning messages, and includes list information.
+
+The output will look like this:
+
+```
+{
+    "Version": "1.0",
+    "Data": {
+        "Source": "z:\\personal\\tbox\\src\\tbox\\tbox.c",
+        "Includes": [
+            "z:\\personal\\tbox\\src\\tbox\\tbox.h",
+            "z:\\personal\\tbox\\src\\tbox\\prefix.h",
+            "z:\\personal\\tbox\\src\\tbox\\prefix\\prefix.h",
+            "z:\\personal\\tbox\\src\\tbox\\prefix\\config.h",
+            "z:\\personal\\tbox\\src\\tbox\\config.h",
+            ...
+```
+
+In the new version, xmake handles json parsing by adding a builtin `core.base.json` module, which can easily analyze and support the new header file dependent data. This mode is preferred (if cl is supported by the new version) , The old version of cl still uses `/showIncludes`).
+
+### Xcode plugin generation support
+
+At present, we have no time to implement the generation of xcode projects by ourselves, but it does not mean that it is not supported, because xmake supports the generation of cmakelists.txt files, and cmake supports the generation of xcode project files. Before the official implementation,
+We can also support it in disguise through cmake, xmake will automatically call cmake internally to transfer the generated results, there is no difference in use for users, just make sure that cmake is installed:
+
+```console
+$ xmake project -k xcode
+```
+
+!> After we have time, we will re-implement each more complete xcode output plugin by ourselves, and welcome everyone to contribute.
+
+### Support intellisense for xmake-vscode plugin
+
+Recently, we also updated the [xmake-vscode](https://github.com/xmake-io/xmake-vscode) plugin, by automatically generating `compile_commands.json` to the current project’s `.vscode` directory, Then we only need to configure `.vscode/c_cpp_properties.json` and associate this `.vscode/compile_commands.json` path in it
+Can realize intellisense automatic prompt, synchronize the configuration information such as includedirs in xmake.lua.
+
+As for how to generate `c_cpp_properties`, there are detailed instructions in the official document: https://code.visualstudio.com/docs/cpp/configure-intellisense-crosscompilation
+
+The main configuration items inside:
+
+```
+  "configurations": [
+    {
+      "compileCommands": ".vscode/compile_commands.json",
+    }
+  ],
+```
+
+## Changlog
+
+### New features
+
+* Add `xmake project -k xcode` generator (use cmake)
+* [#870](https://github.com/xmake-io/xmake/issues/870): Support gfortran compiler
+* [#887](https://github.com/xmake-io/xmake/pull/887): Support zig compiler
+* [#893](https://github.com/xmake-io/xmake/issues/893): Add json module
+* [#898](https://github.com/xmake-io/xmake/issues/898): Support cross-compilation for golang
+* [#275](https://github.com/xmake-io/xmake/issues/275): Support go package manager to install go packages
+* [#581](https://github.com/xmake-io/xmake/issues/581): Support dub package manager to install dlang packages
+
+### Change
+
+* [#868](https://github.com/xmake-io/xmake/issues/868): Support new cl.exe dependency report files, `/sourceDependencies xxx.json`
+* [#902](https://github.com/xmake-io/xmake/issues/902): Improve to detect cross-compilation toolchain

+ 265 - 0
docs/posts/xmake-update-v2.3.7.md

@@ -0,0 +1,265 @@
+---
+title: xmake v2.3.7 released, Add tinyc and emscripten toolchains
+tags: [xmake, lua, C/C++, toolchains, tinyc, emscripten, qt, cuda]
+date: 2020-09-14
+author: Ruki
+---
+
+[xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, very friendly to novices, can get started quickly in a short time, allowing users to focus more on the actual project development.
+
+With the continuous iterative development of xmake in recent years, xmake has harvested 2.9K stars, 300+ forks, 30+ contributors on Github, and handled 900+ issues, 5400+ Commits, and active users are also growing.
+
+![](https://tboox.org/static/img/xmake/star-history.png)
+
+Now, the xmake v2.3.7 version is released. In the new version, we mainly improved the stability and compatibility of xmake itself. Through two months of continuous iteration, we have fixed various user feedback problems, user experience and The stability has been greatly improved.
+
+In addition, we also added support for TinyC and Emscripten (WebAssembly) compilation tool chains in this version.
+
+Especially for the windows platform, we provide an additional xmake-tinyc installation package, which has a built-in tinyc compiler, so that users can completely escape the bloated vs environment, one-click installation, out of the box, only 5M installation package is needed Simple C programs can be developed, and a complete set of winapi header files are also included.
+
+Finally, we also improved the trybuild mode compilation. Through xmake, third-party projects maintained by autotools/cmake can be quickly compiled, and cross-compilation environments such as android/ios/mingw can be quickly connected to achieve rapid migration and compilation.
+
+* [Project source code](https://github.com/xmake-io/xmake)
+* [Official Document](https://xmake.io/)
+
+## New feature introduction
+
+### More diverse installation methods
+
+In the new version, we submitted the xmake installation package to windows winget and ubuntu ppa repositories, we can install xmake more conveniently and quickly.
+
+#### Winget installation
+
+```bash
+winget install xmake
+```
+
+#### Ubuntu PPA installation
+
+```bash
+sudo add-apt-repository ppa:xmake-io/xmake
+sudo apt update
+sudo apt install xmake
+```
+
+Of course, we also support many other installation methods. For detailed installation methods for other platforms, see: [Installation Document](/zh/guide/installation).
+
+### Richer toolchain support
+
+Currently we have supported a lot of toolchain environments, and in this version, we have added support for TinyC and Emscripten (WebAssembly) compilation toolchains. We can quickly switch to the corresponding toolchain to compile with the following command.
+
+```bash
+xmake f --toolchain=[tinyc|emscripten]
+xmake
+```
+
+In the new version, we also provide two additional installation packages, built-in and integrated TinyC compilation environment, the entire installation package only needs 5M, and also contains winsdk api.
+
+The installation package can be found in the github/releases directory of xmake.
+
+* [xmake-tinyc-v2.3.7.win64.exe](https://github.com/xmake-io/xmake/releases/download/v2.3.7/xmake-tinyc-v2.3.7.win64.exe)
+* [xmake-tinyc-v2.3.7.win32.exe](https://github.com/xmake-io/xmake/releases/download/v2.3.7/xmake-tinyc-v2.3.7.win32.exe)
+
+Through this installation package, we can completely get rid of the bloated vs development environment (several G) by compiling and developing C programs, realize one-click installation, and use it out of the box. It is very useful for us to brush leetcode and write some C test code. Yes, there is no need to install the entire vs for this particular installation.
+
+In addition, if we want to view all toolchains supported by xmake, we can execute the following command, and the compilation configuration of `xmake f -p cross --sdk=/xxx` can support more general cross toolchains.
+
+```bash
+$ xmake show -l toolchains
+xcode         Xcode IDE
+vs            VisualStudio IDE
+yasm          The Yasm Modular Assembler
+clang         A C language family frontend for LLVM
+go            Go Programming Language Compiler
+dlang         D Programming Language Compiler
+gfortran      GNU Fortran Programming Language Compiler
+zig           Zig Programming Language Compiler
+sdcc          Small Device C Compiler
+cuda          CUDA Toolkit
+ndk           Android NDK
+rust          Rust Programming Language Compiler
+llvm          A collection of modular and reusable compiler and toolchain technologies
+cross         Common cross compilation toolchain
+nasm          NASM Assembler
+gcc           GNU Compiler Collection
+mingw         Minimalist GNU for Windows
+gnu-rm        GNU Arm Embedded Toolchain
+envs          Environment variables toolchain
+fasm          Flat Assembler
+tinyc         Tiny C Compiler
+emcc          A toolchain for compiling to asm.js and WebAssembly
+```
+
+
+
+
+
+### TryBuild compilation mode improvement
+
+The so-called trybuild mode is a feature introduced by xmake that adapts to existing third-party build systems, because most existing third-party projects are maintained by third-party build systems such as autotools/cmake. If they are migrated to xmake The cost of migration is relatively high for configuration.
+
+Although the configuration of xmake is very easy to use, there is no need to change the build system for projects that have been stably maintained. xmake is mainly used for the construction and maintenance of some new projects.
+
+Based on this background, xmake adopts the trybuild compilation mode, which is the so-called trial compilation mode, which automatically detects the build system of third-party projects. If it detects that the project is maintained by autotools, it will automatically call `./configure; make` to compile.
+
+If a project maintained by cmake is detected, cmake is automatically called to generate makefile/build.ninja to compile. For users who use xmake, the compilation can always be completed by just executing the command xmake, for example:
+
+```bash
+$ xmake
+note: configure found, try building it or you can run `xmake f --trybuild=` to set buildsystem (pass -y or --confirm=y/n/d to skip confirm)?
+please input: y (y/n)
+y
+  ...
+  CC src/pcre2grep-pcre2grep.o
+  CC src/libpcre2_8_la-pcre2_auto_possess.lo
+  CC src/libpcre2_8_la-pcre2_config.lo
+  ...
+build ok!
+```
+
+After xmake detects the autotools build system, it will prompt the user if you need to try to call autotools to compile. After typing y to confirm, you can directly complete the compilation. For cmake projects, you only need to execute the same `xmake` command.
+
+You don’t need to care about how autotools/cmake needs to be configured, used and compiled. After all, cmake needs to generate different build files for windows and linux platforms. The compilation methods are also different. One will call make and the other will call msbuild. Big.
+
+Not only that, xmake also docked with `xmake -r` to directly recompile, docked with `xmake clean` to achieve unified file cleaning, and docked with `xmake -v` to achieve unified detailed compilation command viewing.
+
+#### TryBuild's cross-compilation support
+
+If it's just the compilation of the current host platform, you might say, what's the matter, cmake also has `cmake --build .` to compile directly, it is not too troublesome.
+
+So the question is, how to do cross compilation? If you have used autotools/cmake to cross-compile and generate mingw/android/ios target programs, can cmake and autotools still handle it simply and consistently?
+
+Autotools will not say much, anyway, I hate its cross-experience. Every time I cross-compile and transplant a code with an autotools project, it takes a long time. I often have to package various errors and study the transfer of various configuration parameters. Different platforms have different configurations.
+
+And cmake I don’t think it’s easy to use, for example, for the Android platform, I have to do it like this:
+
+```bash
+$ cmake \
+    -DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake \
+    -DANDROID_ABI=$ABI \
+    -DANDROID_NATIVE_API_LEVEL=$MINSDKVERSION \
+    $OTHER_ARGS
+```
+
+For the ios platform, I did not find a short-answer configuration method, but found a third-party ios toolchain configuration, which is very complicated: https://github.com/leetal/ios-cmake/blob/master/ios.toolchain.cmake
+
+For mingw, it is another way. I have been tossing about the environment for a long time, which is very tossing.
+
+Then if you use xmake to dock cmake to achieve cross-compilation, you only need to do this.
+
+Compile the android program:
+
+```bash
+xmake f -p android --trybuild=cmake --ndk=/xxx
+xmake
+```
+
+Compile the ios program:
+
+```bash
+xmake f -p iphoneos --trybuild=cmake
+xmake
+```
+
+Compile the mingw program:
+
+```bash
+xmake f -p mingw --trybuild=cmake --mingw=/sdk/xxx
+xmake
+```
+
+When we only need to configure, enable cmake's try-compilation mode through `--trybuild=cmake`, and then switch to the corresponding platform through `-p android/iphoneos/mingw`, dock the corresponding SDK, and you can use the same method To quickly implement cross-compilation, even if this project is maintained by cmake.
+
+The user does not need to be concerned. If you use cmake to transfer the configuration of different toolchains, xmake will automatically handle it for you. You only need to execute xmake to compile, or execute `xmake -r` to recompile, or view compilation details` xmake -v`.
+
+In addition, you can quickly switch the build architecture by `xmake f -p iphoneos -a arm64 --trybuild=cmake`.
+
+Finally, we need to explain that although trybuild mode can greatly help users save compilation and configuration operations, if the conditions are run, we still hope that everyone can directly use xmake.lua to maintain their projects.
+
+In this way, there is no need to compile with trybuild, and xmake will support cross-compilation more perfectly, because internal xmake will directly compile the project without calling cmake, autotools and other tools, for example:
+
+```bash
+xmake f -p iphoneos
+xmake
+```
+
+or
+
+```bash
+xmake f -p android --ndk=/xxx
+xmake
+```
+
+As you can see, this time we omit the `--trybuild=cmake` parameter, because we don’t need it, we compile directly. At this time, xmake is equivalent to independent make/ninja and does not rely on make at all, and the compilation speed is also Can be completely comparable to ninja.
+
+### Improve the integration of remote dependency packages
+
+#### Cross compilation support
+
+xmake not only supports mingw/autotools cross-compilation support for trybuild, but also supports cross-compilation installation and integration for third parties maintained by cmake/autotools in remote package warehouses.
+
+E.g:
+
+```lua
+add_requires("pcre2")
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    add_packages("pcre2")
+```
+
+Then by switching to the iphoneos platform, you can quickly integrate and install the pcre2 package of the iphoneos platform, and then compile and link it, even if the pcre2 package is maintained by autotools/cmake.
+
+```bash
+xmake f -p iphoneos
+xmake
+```
+
+#### Private network package warehouse
+
+In this version, we have also made some improvements to the integration of remote dependency packages. For example, you can switch to private network mode by configuring `xmake g --network=private`.
+
+This is mainly used for some company's internal network through xmake's self-built package management warehouse to achieve closed C/C++ dependency package integration, and will not rely on packages from the official warehouse provided by xmake.
+
+#### Recursively export installed packages
+
+xmake previously provided a command to export all third-party dependency packages installed by xmake.
+
+```bash
+xmake require --export
+```
+
+However, the previous version corresponds to some packages that have dependencies. When exporting, only itself will be exported, and all its dependencies will not be exported. In this version, we have improved it and will also perform all corresponding dependent packages.了export.
+
+### Improve support for Qt SDK environment
+
+In addition, this version also provides better support for the Qt SDK toolchain environment. For example, the Qt SDK toolchain installed by the apt command under the ubuntu system is also supported, while the previous version can only support downloading and installing from the Qt official website The Qt SDK environment.
+
+## Changelog
+
+### New features
+
+* [#2941](https://github.com/microsoft/winget-pkgs/pull/2941): Add support for winget
+* Add xmake-tinyc installer without msvc compiler for windows
+* Add tinyc compiler toolchain
+* Add emcc compiler toolchain (emscripten) to compiling to asm.js and WebAssembly
+* [#947](https://github.com/xmake-io/xmake/issues/947): Add `xmake g --network=private` to enable the private network
+
+### Change
+
+* [#907](https://github.com/xmake-io/xmake/issues/907): Improve to the linker optimization for msvc
+* Improve to detect qt sdk environment
+* [#918](https://github.com/xmake-io/xmake/pull/918): Improve to support cuda11 toolchains
+* Improve Qt support for ubuntu/apt
+* Improve CMake project generator
+* [#931](https://github.com/xmake-io/xmake/issues/931): Support to export packages with all dependences
+* [#930](https://github.com/xmake-io/xmake/issues/930): Support to download package without version list directly 
+* [#927](https://github.com/xmake-io/xmake/issues/927): Support to switch arm/thumb mode for android ndk
+* Improve trybuild/cmake to support android/mingw/iphoneos/watchos toolchains
+
+### Bugs fixed
+
+* [#903](https://github.com/xmake-io/xmake/issues/903): Fix install vcpkg packages fails
+* [#912](https://github.com/xmake-io/xmake/issues/912): Fix the custom toolchain
+* [#914](https://github.com/xmake-io/xmake/issues/914): Fix bad light userdata pointer for lua on some aarch64 devices

+ 246 - 0
docs/posts/xmake-update-v2.3.8.md

@@ -0,0 +1,246 @@
+---
+title: xmake v2.3.8 released, Add Intel C++/Fortran Compiler Support
+tags: [xmake, lua, C/C++, toolchains, wasm, emscripten, qt, intel, icc, fortran]
+date: 2020-10-17
+author: Ruki
+---
+
+[xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, very friendly to novices, can get started quickly in a short time, allowing users to focus more on the actual project development.
+
+In this new version, we have made full platform support for the Intel series of C++ and Fortran compilers, and improved the Wasm tool chain support added in the previous version, and also supported the Qt SDK for Wasm.
+
+In addition, we have also upgraded luajit to the latest v2.1 version. In terms of cross-platform, xmake has also made great improvements and added support for mips64 architecture.
+
+* [Project source code](https://github.com/xmake-io/xmake)
+* [Official Document](https://xmake.io/)
+
+
+## New feature introduction
+
+### Add Intel C++ Compiler support
+
+On this version, we have made full platform support for the Intel series of C++ compilers, including icl on windows and icc/icpc under linux/macOS.
+
+To enable the Intel C++ compiler, we only need to switch to the corresponding toolchain through the `--toolchain=icc` parameter on the system where the Intel compiler is installed.
+
+```bash
+$ xmake f --toolchain=icc
+$ xmake
+```
+
+### Add Intel Fortran Compiler support
+
+In the previous version, xmake only supported the gfortran compiler. In this version, we also support the Intel Fortran compiler, which is ifort. We only need to switch to the corresponding ifort tool chain to use it.
+
+```bash
+$ xmake f --toolchain=ifort
+$ xmake
+```
+
+### Add Wasm platform and Qt/Wasm support
+
+In the last version, we added the `--toolchain=emcc` toolchain to support the compilation of wasm programs, but just specifying the toolchain does not adjust the extension of the target program well, for example, for `*.js` and The file of `*.wasm` is generated.
+
+In the new version, we continue to add the `xmake f -p wasm` platform, the built-in emcc tool chain is enabled, and the surrounding configuration has been improved again based on it.
+
+As long as you switch to the wasm platform, xmake will generate `*.js` and corresponding `*.wasm` and other target files by default, and additionally generate `*.html` pages that can load js to run the wasm program.
+
+In addition, we also support Qt SDK for Wasm, for example, we create a Qt QuickApp project.
+
+```bash
+$ xmake create -t qt.quickapp_static quickapp
+```
+
+Here, we noticed that what we created is a Qt project that requires a static link. Because of the wasm version of the Qt library, we need to force a static link to the program to use it normally.
+
+The content of the generated project file xmake.lua is roughly as follows:
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+includes("qt_add_static_plugins.lua")
+
+target("demo")
+    add_rules("qt.quickapp_static")
+    add_headerfiles("src/*.h")
+    add_files("src/*.cpp")
+    add_files("src/qml.qrc")
+    add_frameworks("QtQuickControls2", "QtQuickTemplates2")
+    qt_add_static_plugins("QtQuick2Plugin", {linkdirs = "qml/QtQuick.2", links = "qtquick2plugin"})
+    qt_add_static_plugins("QtQuick2WindowPlugin", {linkdirs = "qml/QtQuick/Window.2", links = "windowplugin"})
+    qt_add_static_plugins("QtQuickControls2Plugin", {linkdirs = "qml/QtQuick/Controls.2", links = "qtquickcontrols2plugin"})
+    qt_add_static_plugins("QtQuickTemplates2Plugin", {linkdirs = "qml/QtQuick/Templates.2", links = "qtquicktemplates2plugin"})
+```
+
+In the above configuration, in addition to enabling the `qt.quickapp_static` compilation rules, we also configure some necessary Qt plugins through `qt_add_static_plugins`.
+
+Next, we only need to switch to the wasm platform and make sure that the Qt SDK is set to complete the compilation.
+
+```bash
+$ xmake f -p wasm [--qt=~/Qt]
+$ xmake
+```
+
+After the compilation is completed, xmake will generate demo.html and the corresponding demo.js/demo.wasm program in the build directory. We can open the demo.html page to run the Qt program we compiled. The display effect is as follows:
+
+![](/assets/img/posts/xmake/xmake-qt-wasm.png)
+
+For a more detailed description of Qt/Wasm, see: [Issue #956](https://github.com/xmake-io/xmake/issues/956)
+
+
+
+
+
+
+### Add Math/Float-point compilation optimization settings
+
+We have added a new `set_fpmodels()` setting interface, which is used to set the floating-point compilation mode and the compilation abstraction settings for the optimization of mathematical calculations. It provides several commonly used levels such as fast, strict, except, precise, and some Set at the same time, some conflicts, the last setting takes effect.
+
+For the description of these levels, you can refer to the Microsoft document: [Specify floating-point behavior](https://docs.microsoft.com/en-us/cpp/build/reference/fp-specify-floating-point-behavior ?view=vs-2019)
+
+Of course, for other compilers such as gcc/icc, xmake will map to different compilation flags.
+
+```lua
+set_fpmodels("fast")
+set_fpmodels("strict")
+set_fpmodels("fast", "except")
+set_fpmodels("precise") - default
+```
+
+For details on this, see: [Issue #981](https://github.com/xmake-io/xmake/issues/981)
+
+### Add OpenMP Support
+
+In order to enable the openmp feature more abstractly and simply, we can set it through the newly added `c.openmp` and `c++.openmp` rules. In addition, we need additional libomp libraries on linux and macOS, so we can pass ʻAdd_requires("libomp")` for quick reference and integration.
+
+
+```lua
+add_requires("libomp", {optional = true})
+target("loop")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    add_rules("c++.openmp")
+    add_packages("libomp")
+```
+
+If it is c code, you need to enable ʻadd_rules("c.openmp")`. If it is c/c++ mixed compilation, then these two rules must be set.
+
+### Add c11/c17 support
+
+In the new version, xmake has also made improvements to `set_languages`, adding new c11/c17 settings, and at the same time adapting and adapting `/std:c11` and `/std:c17` provided by the latest version of msvc. stand by.
+
+We only need simple settings:
+
+```lua
+set_languages("c17")
+```
+
+You can enable the c17 standard to compile, even if the lower version of msvc and other compilers do not support it, xmake will automatically ignore the settings.
+
+### Better Mingw support
+
+Regarding this improvement, several aspects are involved. The first is the improvement of the automatic detection of the Mingw SDK root directory under Windows. In most cases, we do not need to configure the `--mingw=` parameter to specify the path explicitly, and it can also It was automatically detected.
+
+For details on this, see: [Issue #977](https://github.com/xmake-io/xmake/issues/977)
+
+In addition, in addition to Msys2/Mingw as well as macOS, linux/Mingw, we additionally support [llvm-mingw](https://github.com/mstorsjo/llvm-mingw) this SDK in the new version, so that we can use mingw to compile the program of arm/arm64 architecture.
+
+```bash
+$ xmake f -p mingw -a arm64
+$ xmake
+```
+
+In addition, in the automatic compilation and integration of remote dependency packages, there are now third-party libraries with cmakelists. Even on the mingw platform, xmake can be automatically compiled and integrated for direct use, which is very fast and convenient.
+
+Recently, in the [xmake-repo](https://github.com/xmake-io/xmake-repo) official C/C++ package repository, we have also added a lot of new libraries that support the mingw platform, which can be used directly .
+
+### Better cross-platform operation
+
+We have added support for mips64-based Linux system operation, and improved the stability of xmake under arm/arm64. By incorporating the latest luajit v2.1, we have solved many problems left by luajit, such as the bad of lightuserdata under arm64. Pointer and other issues.
+
+### Add macOS Sierra for arm64 support
+
+xmake has also adapted the latest Xcode-beta, and added macOs for arm64 target program compilation support, just switch to the arm64 architecture compilation.
+
+```bash
+$ xmake f -a arm64 [--xcode=Applications/Xcode-beta.app/]
+$ xmake
+```
+
+Of course, the premise is to run under macOS and use the latest Xcode-beta version that supports the Developer Transition Kit (DTK).
+
+### Add more C/C++ libraries for the official repository
+
+In the official C/C++ repository of xmake [xmake-repo](https://github.com/xmake-io/xmake-repo), we have recently added dozens of commonly used C/C++ libraries, and also The libraries of the libx11 series are all included.
+
+Although the warehouse package maintenance workload is huge, the current development trend is also becoming more and more active. We have received more and more users' contributions and improved maintenance to the warehouse package.
+
+And, now our official warehouse can be quickly integrated: linux, macOS, windows, mingw, bsd, msys, iphoneos, android and other eight common platform libraries, to achieve true cross-platform C/C++ remote dependency library integration and use support.
+
+![](/assets/img/posts/xmake/xmake-packages.png)
+
+Currently we have included a list of some packages and supporting platforms, you can view from here: [PKGLIST.md](https://github.com/xmake-io/xmake-repo/blob/master/PKGLIST.md)
+
+We have been working hard to solve the problems of messy C/C++ library ecology and cumbersome integration and use, and provide quick and consistent automatic integration and compilation solutions. xmake not only supports the integration of third-party official warehouse packages such as vcpkg/conan/clib/homebrew, but also We are working hard to improve our self-built official warehouse to achieve a better integrated experience.
+
+for example:
+
+```lua
+add_requires("tbox >1.6.1", "libuv master", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8")
+add_requires("conan::openssl/1.1.1g", {alias = "openssl", optional = true, debug = true})
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("tbox", "libuv", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8", "openssl")
+```
+
+Packages with namespaces such as `vcpkg::`, `brew::` and `conan::` will automatically switch to the corresponding third-party package warehouse to download and integrate, and the default `tbox >1.6.1` etc. Library, the package provided in the official xmake-repo repository will be used by default.
+
+The usage and integration methods are exactly the same, xmake will automatically download, compile, integrate and link.
+
+For more detailed instructions on the dependency integration of remote packages, we can look at the relevant documentation: [Remote dependency library integration and use](/zh/guide/package-management/using-official-packages)
+
+At the same time, we also welcome more people to participate to help improve the construction of the C/C++ library ecology, and provide a concise and consistent library experience. I believe that C/C++ package management and library ecology are not worse than Rust/Go.
+
+### More release version installation support
+
+In the new version, we submitted xmake to the Ubuntu PPA source, so in addition to the existing script installation method, we can also quickly install xmake through apt.
+
+```bash
+sudo add-apt-repository ppa:xmake-io/xmake
+sudo apt update
+sudo apt install xmake
+```
+
+At the same time, we also submitted the package to the Copr package management repository, so that we can also quickly install xmake through dnf in Fedora, RHEL, OpenSUSE, CentOS and other distributions.
+
+```bash
+sudo dnf copr enable waruqi/xmake
+sudo dnf install xmake
+```
+
+## Changelog
+
+### New features
+
+* [#955](https://github.com/xmake-io/xmake/issues/955): Add zig project templates
+* [#956](https://github.com/xmake-io/xmake/issues/956): Add wasm platform and support Qt/Wasm SDK
+* Upgrade luajit vm and support for runing on mips64 device
+* [#972](https://github.com/xmake-io/xmake/issues/972): Add `depend.on_changed()` api to simplify adding dependent files
+* [#981](https://github.com/xmake-io/xmake/issues/981): Add `set_fpmodels()` for math optimization mode
+* [#980](https://github.com/xmake-io/xmake/issues/980): Support Intel C/C++ and Fortran Compiler
+* [#986](https://github.com/xmake-io/xmake/issues/986): Support for `c11` and `c17` for MSVC Version 16.8 and Above
+* [#979](https://github.com/xmake-io/xmake/issues/979): Add Abstraction for OpenMP. `add_rules("c++.openmp")`
+
+### Change
+
+* [#958](https://github.com/xmake-io/xmake/issues/958): Improve mingw platform to support llvm-mingw toolchain
+* Improve `add_requires("zlib~xxx")` to support for installing multi-packages at same time
+* [#977](https://github.com/xmake-io/xmake/issues/977): Improve find_mingw for windows
+* [#978](https://github.com/xmake-io/xmake/issues/978): Improve toolchain flags order
+* Improve Xcode toolchain to support for macOS/arm64
+
+### Bugs fixed
+
+* [#951](https://github.com/xmake-io/xmake/issues/951): Fix emcc support for windows
+* [#992](https://github.com/xmake-io/xmake/issues/992): Fix filelock bug

+ 373 - 0
docs/posts/xmake-update-v2.3.9.md

@@ -0,0 +1,373 @@
+---
+title: xmake v2.3.9 released, Add independent Xrepo C/C++ package manager
+tags: [xmake, lua, C/C++, toolchains, xrepo, packages, vcpkg, conan]
+date: 2020-11-24
+author: Ruki
+---
+
+author: Ruki}
+---
+
+[xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, very friendly to novices, can get started quickly in a short time, allowing users to focus more on the actual project development.
+
+In this new version, we focus on improving the dependency package management of xmake, adding support for the pacman package manager under Archlinux and MSYS2/Mingw, and we have further enriched the official package repository of xmake [xmake-repo](https: //github.com/xmake-io/xmake-repo), more than 50 commonly used C/C++ packages have been added.
+
+In addition, we have added an independent subcommand based on xmake: [xrepo](https://github.com/xmake-io/xrepo/), a complete and independent cross-platform C/C++ package manager, which is convenient for users Conveniently manage the installation and integrated use of daily C/C++ packages.
+
+At the same time, we have also released the xrepo related site [xrepo.xmake.io](https://xrepo.xmake.io), we can quickly check the usage of xrepo and each package in the official xmake-repo repository. Support and usage of
+
+* [Project source code](https://github.com/xmake-io/xmake)
+* [Official Document](https://xmake.io/)
+* [Xrepo Command](https://github.com/xmake-io/xrepo)
+
+## New feature introduction
+
+### Xrepo Package Manager
+
+xrepo is a cross-platform C/C++ package manager based on [Xmake](https://github.com/xmake-io/xmake).
+
+It is based on the runtime provided by xmake, but it is a complete and independent package management program. Compared with package managers such as vcpkg/homebrew, xrepo can provide C/C++ packages for more platforms and architectures at the same time.
+
+And it also supports multi-version semantic selection. In addition, it is also a decentralized distributed warehouse. It not only provides the official [xmake-repo](https://github.com/xmake-io/xmake-repo) warehouse, It also supports users to build multiple private warehouses.
+
+At the same time, xrepo also supports installing packages from third-party package managers such as vcpkg/homebrew/conan, and provides unified and consistent library link information to facilitate integration and docking with third-party projects.
+
+If you want to know more, please refer to: [online documentation](https://xrepo.xmake.io/#/zh-cn/getting_started), [Github](https://github.com/xmake-io /xrepo) and [Gitee](https://gitee.com/tboox/xrepo)
+
+![](https://xrepo.xmake.io/assets/img/xrepo.gif)
+
+
+
+
+
+
+#### Installation
+
+We only need to install xmake to use the xrepo command. For the installation of xmake, we can see: [xmake installation document](/zh/guide/installation).
+
+#### Support platform
+
+* Windows (x86, x64)
+* macOS (i386, x86_64, arm64)
+* Linux (i386, x86_64, cross-toolchains ..)
+* *BSD (i386, x86_64)
+* Android (x86, x86_64, armeabi, armeabi-v7a, arm64-v8a)
+* iOS (armv7, armv7s, arm64, i386, x86_64)
+* MSYS (i386, x86_64)
+* MinGW (i386, x86_64, arm, arm64)
+* Cross Toolchains
+
+#### Supported package management warehouse
+
+* Official self-built warehouse [xmake-repo](https://github.com/xmake-io/xmake-repo) (tbox >1.6.1)
+* [User-built warehouse](/zh/package/remote_package#%e4%bd%bf%e7%94%a8%e8%87%aa%e5%bb %ba%e7%a7%81%e6%9c%89%e5%8c%85%e4%bb%93%e5%ba%93)
+* Conan (conan::openssl/1.1.1g)
+* Vcpkg (vcpkg:ffmpeg)
+* Homebrew/Linuxbrew (brew::pcre2/libpcre2-8)
+* Pacman on archlinux/msys2 (pacman::libcurl)
+* Clib (clib::clibs/[email protected])
+* Dub (dub::log 0.4.3)
+
+#### Distributed repository support
+
+In addition to directly retrieve the installation package from the official repository: [xmake-repo](https://github.com/xmake-io/xmake-repo),
+We can also add any number of self-built warehouses, and even completely isolate the external network, and only maintain the installation and integration of private packages on the company's internal network.
+
+Just use the following command to add your own warehouse address:
+
+```console
+$ xrepo add-repo myrepo https://github.com/mygroup/myrepo
+```
+
+#### Install C/C++ package independently
+
+Various installation methods are available, supporting semantic version, debugging package, dynamic library, configurable parameters, and C/C++ package installation in various third-party package management.
+
+```console
+$ xrepo install zlib tbox
+$ xrepo install "zlib 1.2.x"
+$ xrepo install "zlib >=1.2.0"
+$ xrepo install -p iphoneos -a arm64 zlib
+$ xrepo install -p android [--ndk=/xxx] zlib
+$ xrepo install -p mingw [--mingw=/xxx] zlib
+$ xrepo install -p cross --sdk=/xxx/arm-linux-musleabi-cross zlib
+$ xrepo install -m debug zlib
+$ xrepo install -k shared zlib
+$ xrepo install -f "vs_runtime=MD" zlib
+$ xrepo install -f "regex=true,thread=true" boost
+$ xrepo install brew::zlib
+$ xrepo install vcpkg::zlib
+$ xrepo install conan::zlib/1.2.11
+$ xrepo install pacman:libpng
+$ xrepo install dub:log
+```
+
+#### Seamless integration with xmake project
+
+```lua
+add_requires("tbox >1.6.1", "libuv master", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8")
+add_requires("conan::openssl/1.1.1g", {alias = "openssl", optional = true, debug = true})
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("tbox", "libuv", "vcpkg::ffmpeg", "brew::pcre2/libpcre2-8", "openssl")
+```
+
+The following is the overall architecture and compilation process integrated with xmake.
+
+<img src="/assets/img/index/package_arch.png" width="650px" />
+
+
+For more information about how to use xrepo, please refer to the document: [Xrepo Quick Start](https://xrepo.xmake.io/#/zh-cn/getting_started).
+
+
+### Support the installation of cross-compiled dependency packages
+
+In the new version, we have improved the dependency package installation mechanism inside xmake, and added support for the installation of C/C++ dependency packages for the cross-compilation tool chain, for example:
+
+```lua
+add_requires("zlib", "openssl")
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("zlib", "openssl")
+```
+
+We have configured two dependency packages above: zlib, openssl, and then we switch to the cross-compilation environment and use the compilation tool chain on musl.cc to compile.
+
+```console
+$ xmake f -p cross --sdk=/tmp/arm-linux-musleabi-cross
+in xmake-repo:
+  -> openssl 1.1.1h
+please input: y (y/n)
+
+  => http://zlib.net/zlib-1.2.11.tar.gz .. ok
+  => download https://github.com/openssl/openssl/archive/OpenSSL_1_1_1h.zip .. ok
+  => installing zlib .. ok
+  => installing openssl .. ok
+$ xmake
+[50%]: ccache compiling.release src/main.cpp
+[75%]: linking.release test
+[100%]: build ok!
+```
+
+xmake will automatically pull the zlib/openssl source code package, and then use the `arm-linux-musleabi-cross` cross tool chain to compile and install zlib and openssl. After the installation is complete, it will be automatically integrated into the test project to participate in the link until it is fully compiled.
+
+Of course, to make C/C++ support cross-compilation, you first need to maintain the official xmake-repo repository and increase the support for cross-compilation. At present, there are not many C/C++ packages that support crossover in the warehouse, but many have already been included, and they will continue to be expanded in the future.
+
+If you want to see which packages support cross-compilation, you can go directly to the package warehouse site to view: [List of C/C++ packages that support cross-compilation](https://xrepo.xmake.io/#/packages/cross)
+
+We can also use the xrepo command provided in the new version to directly retrieve the packages supported by the specified platform (support fuzzy query):
+
+```console
+$ xrepo search -p cross zli*
+```
+
+We also welcome everyone to help contribute more packages to the official repository of [xmake-repo](https://github.com/xmake-io/xmake-repo), and work together to improve the construction of the C/C++ package management ecosystem so that users can It is more convenient to use various dependency packages, and no longer be bothered by various tedious porting tasks.
+
+
+### Package license detection mechanism
+
+Taking into account the different licenses of the packages in the warehouse, some packages may conflict with the license of the user project after use, so xmake adds a package dependency license compatibility detection mechanism in the new version.
+
+And a new `set_license` interface is added, allowing users to set the license of each target.
+
+For example, we integrated a LGPL-2.0 package libplist library, but our project does not have any license settings.
+
+```lua
+add_requires("libplist") - LGPL-2.0
+target("test")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    add_packages("libplist")
+```
+
+When compiling, there will be the following prompt to warn users that there may be a risk of code license conflict when using libplist.
+
+```bash
+$ xmake
+warning: target(test) maybe is not compatible with license(LGPL-2.1) of package(libplist),
+we can use shared libraries with LGPL-2.1 or use set_license()/set_policy() to modify/disable license!
+```
+
+And if we explicitly pass the project through `set_license("LGPL-2.0")` to ensure full compatibility, there will be no warning messages, and for `GPL`-related licenses, xmake will also have corresponding detections.
+
+The relatively loose license packages such as MIT, BSD, etc., are directly integrated and used without any warning.
+
+In addition, if we explicitly set `set_license()` and the package license conflicts, we will also prompt a warning.
+
+### Pacman package support
+
+In the previous version, xmake already supports the automatic integration of third-party warehouse package sources such as vcpkg, conan, clib, homebrew, etc. In the new version, we have added support for the integration of packages managed by pacman.
+
+We support both the installation and integration of the pacman package on archlinux, and the installation and integration of the mingw `x86_64`/`i386` package of pacman on msys2.
+
+```lua
+add_requires("pacman::zlib", {alias = "zlib"})
+add_requires("pacman::libpng", {alias = "libpng"})
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("zlib", "libpng")
+```
+
+On archlinux, only:
+
+```console
+xmake
+```
+
+To install the mingw package on msys2, you need to specify the mingw platform:
+
+```console
+xmake f -p mingw -a [x86_64|i386]
+xmake
+```
+
+### Install any version of the package
+
+Because the packages in the xmake-repo warehouse have a strict version list and the corresponding sha256 value for the integrity check of the download, this will ensure the reliability and integrity of the package download.
+
+However, it also leads to the inability to fully include all versions of a package. If there is a required version that has not been included, one way is for the user to add pr to the xmake-repo repository to increase the support for the corresponding version.
+
+Another way is to configure `{verify = false}` in xmake.lua to force the skip verification mechanism, so that you can choose to download any version of the package.
+
+```lua
+add_requires("libcurl 7.73.0", {verify = false})
+```
+
+### Improve vcpkg package integration
+
+Regarding the dependency integration of the vcpkg package, a lot of improvements have been made in the new version. Not only has the switch support for the windows-static-md package been added, but we have also improved the automatic detection mechanism of the vcpkg command, making it possible in more scenarios It can be detected automatically instead of requiring manual configuration.
+
+### Improve custom cross toolchain
+
+In the new version, we continue to make improvements to the custom tool chain to make the automatic detection more intelligent. Usually only need to specify sdkdir, xmake can automatically detect other configurations, such as cross and other information, for example:
+
+```lua
+toolchain("my_toolchain")
+    set_kind("standalone")
+    set_sdkdir("/tmp/arm-linux-musleabi-cross")
+toolchain_end()
+
+target("hello")
+    set_kind("binary")
+    add_files("apps/hello/*.c")
+```
+
+This is the most streamlined cross-toolchain configuration. It only sets the corresponding SDK path, and then marks it as a complete and independent toolchain by `set_kind("standalone")`.
+
+At this time, we can use the command line `--toolchain=my_toolchain` to manually switch to this toolchain.
+
+```console
+xmake f --toolchain=my_toolchain
+xmake
+```
+
+In addition, we can also directly bind it to the corresponding target through `set_toolchains` in xmake.lua, then only when this target is compiled, will we switch to our custom toolchain.
+
+
+```lua
+toolchain("my_toolchain")
+    set_kind("standalone")
+    set_sdkdir("/tmp/arm-linux-musleabi-cross")
+toolchain_end()
+
+target("hello")
+    set_kind("binary")
+    add_files("apps/hello/*.c")
+    set_toolchains("my_toolchain")
+```
+
+In this way, we no longer need to switch the toolchain manually, just execute xmake and it will automatically switch to the my_toolchain toolchain by default.
+
+This is especially useful for embedded development, because there are many cross-compilation tool chains for embedded platforms, and we often need various switches to complete the compilation of different platforms.
+
+Therefore, we can place all toolchain definitions in a separate lua file to define, for example:
+
+```
+projectdir
+    -xmake.lua
+    -toolchains
+      -my_toolchain1.lua
+      -my_toolchain2.lua
+      -...
+```
+
+Then, we only need to import them through includes in xmake.lua, and bind different tool chains according to different custom platforms:
+
+```lua
+includes("toolchains/*.lua")
+target("hello")
+    set_kind("binary")
+    add_files("apps/hello/*.c")
+    if is_plat("myplat1") then
+        set_toolchains("my_toolchain1")
+    elseif is_plat("myplat2") then
+        set_toolchains("my_toolchain2")
+    end
+```
+
+In this way, we can quickly switch the designated platform when compiling to automatically switch the corresponding tool chain.
+
+```console
+xmake f -p myplat1
+xmake
+```
+
+If some cross-compilation toolchains are complex in structure and automatic detection is not enough, you can use `set_toolset`, `set_cross` and `set_bindir` interfaces according to the actual situation to configure other settings in a targeted manner.
+
+For example, in the following example, we also added some cxflags/ldflags and the built-in system library links.
+
+```lua
+toolchain("my_toolchain")
+    set_kind("standalone")
+    set_sdkdir("/tmp/arm-linux-musleabi-cross")
+    on_load(function (toolchain)
+        - add flags for arch
+        if toolchain:is_arch("arm") then
+            toolchain:add("cxflags", "-march=armv7-a", "-msoft-float", {force = true})
+            toolchain:add("ldflags", "-march=armv7-a", "-msoft-float", {force = true})
+        end
+        toolchain:add("ldflags", "--static", {force = true})
+        toolchain:add("syslinks", "gcc", "c")
+    end)
+```
+
+For more examples of custom toolchains, you can refer to the built-in toolchain definition in the directory of xmake source code: [Internal Toolchain List](https://github.com/xmake-io/xmake/blob/master/xmake/ toolchains/)
+
+### Support mouse for menu configuration
+
+Remember that xmake also provides graphical terminal menu configuration? It is the classic menu config graphical configuration interface similar to linux kernel.
+
+```bash
+xmake f --menu
+```
+
+In the new version, we have also made further improvements to it, adding cross-platform mouse operations. We can use the mouse to click and select various configuration items, which is more convenient.
+
+<img src="/assets/img/index/menuconf.png" width="650px" />
+
+## Changelog
+
+### New features
+
+* Add new [xrepo](https://github.com/xmake-io/xrepo) command to manage C/C++ packages
+* Support for installing packages of cross-compilation
+* Add musl.cc toolchains
+* [#1009](https://github.com/xmake-io/xmake/issues/1009): Support select and install any version package, e.g. `add_requires("libcurl 7.73.0", {verify = false})`
+* [#1016](https://github.com/xmake-io/xmake/issues/1016): Add license checking for target/packages
+* [#1017](https://github.com/xmake-io/xmake/issues/1017): Support external/system include directories `add_sysincludedirs` for package and toolchains
+* [#1020](https://github.com/xmake-io/xmake/issues/1020): Support to find and install pacman package on archlinux and msys2
+* Support mouse for `xmake f --menu`
+
+### Change
+
+* [#997](https://github.com/xmake-io/xmake/issues/997): Support to set std lanuages for `xmake project -k cmake`
+* [#998](https://github.com/xmake-io/xmake/issues/998): Support to install vcpkg packages with windows-static-md
+* [#996](https://github.com/xmake-io/xmake/issues/996): Improve to find vcpkg directory
+* [#1008](https://github.com/xmake-io/xmake/issues/1008): Improve cross toolchains
+* [#1030](https://github.com/xmake-io/xmake/issues/1030): Improve xcode.framework and xcode.application rules
+* [#1051](https://github.com/xmake-io/xmake/issues/1051): Add `edit` and `embed` to `set_symbols()` only for msvc
+* [#1062](https://github.com/xmake-io/xmake/issues/1062): Improve `xmake project -k vs` plugin.

+ 472 - 0
docs/posts/xmake-update-v2.5.1.md

@@ -0,0 +1,472 @@
+---
+title: xmake v2.5.1 released, Support for Apple Silicon and more powerful C/C++ package management
+tags: [xmake, lua, C/C++, toolchains, xrepo, packages, vcpkg, conan, Apple, Silicon]
+date: 2021-01-16
+author: Ruki
+---
+
+package management', tags: [xmake, lua, C/C++, toolchains, xrepo, packages, vcpkg,]
+---
+
+[xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, very friendly to novices, can get started quickly in a short time, allowing users to focus more on the actual project development.
+
+This is the first version of xmake this year and the first version that is fully adapted to support Apple Silicon (macOS ARM) devices.
+
+In this version, we mainly improved the integrated support for C/C++ dependent packages, which is more stable, and can be more flexible to achieve customized configuration compilation.
+
+In addition, we also focused on improving the vs/vsxmake two vs project generator plugins, fixing many details, and also supporting the sub-project `group`, and now it is possible to generate a project structure similar to the following figure.
+
+![](/assets/img/manual/set_group.png)
+
+About Zig, because it has fixed a lot of problems that I have reported before in v0.7.1. Now xmake can already support the compilation of zig projects.
+
+At the same time, we have newly developed a [luarocks-build-xmake](https://github.com/xmake-io/luarocks-build-xmake) plugin to replace luarocks' built-in build system with xmake.
+
+Finally, in this version, we continue to improve the `xmake f --menu` graphical configuration menu, which fully supports mouse operation and scrolling support, and also supports utf8.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+
+
+
+
+
+
+
+
+
+## New feature introduction
+
+### Add add_requireconfs to improve package configuration
+
+Despite the previous version, we can define and configure dependent packages by `add_requires("libpng", {configs = {shared = true}})`.
+
+However, if the user project has a huge project and many dependent packages, and each package requires different compilation configuration parameters, the configuration will still be very cumbersome and has limitations, such as the inability to rewrite the internal sub-dependent package configuration.
+
+Therefore, we have added `add_requireconfs` to configure the configuration of each package and its sub-dependencies more flexibly and conveniently. Below we focus on several usages:
+
+##### Set the configuration of the specified package
+
+This is the basic usage. For example, we have declared a package through `add_requires("zlib")`, and want to expand the configuration of this zlib later and change it to dynamic library compilation. You can configure it in the following way.
+
+```lua
+add_requires("zlib")
+add_requireconfs("zlib", {configs = {shared = true}})
+```
+
+It is equivalent to
+
+```lua
+add_requires("zlib", {configs = {shared = true}})
+```
+
+##### Set general default configuration
+
+The above usage, we still don't see any practical use, but if we rely on more we can see the effect, such as the following:
+
+```lua
+add_requires("zlib", {configs = {shared = true}})
+add_requires("pcre", {configs = {shared = true}})
+add_requires("libpng", {configs = {shared = true}})
+add_requires("libwebp", {configs = {shared = true}})
+add_requires("libcurl", {configs = {shared = false}})
+```
+
+Is it very cumbersome, if we use `add_requireconfs` to set the default configuration, it can be greatly simplified to the following configuration:
+
+
+```lua
+add_requireconfs("*", {configs = {shared = true}})
+add_requires("zlib")
+add_requires("pcre")
+add_requires("libpng")
+add_requires("libwebp")
+add_requires("libcurl", {configs = {shared = false}})
+```
+
+For the above configuration, we use pattern matching through `add_requireconfs("*", {configs = {shared = true}})` to set all dependent packages to compile and install dynamic libraries by default.
+
+However, we used `add_requires("libcurl", {configs = {shared = false}})` to configure libcurl to compile and install static libraries.
+
+The final configuration result is: zlib/pcre/libpng/libwebp is a shared library, and libcurl is a static library.
+
+Through pattern matching, we can put some common configurations of each package into the unified `add_requireconfs` to pre-configure, which greatly simplifies the definition of each `add_requires`.
+
+!> By default, for the same configuration, xmake will give priority to the configuration in add_requires instead of add_requireconfs.
+
+If the version is set in `add_requires("zlib 1.2.11")`, the configuration of add_requires will be used first, and the version configuration in add_requireconfs will be completely ignored. Of course, we can also completely override the version specified in `add_requires` through override .
+
+```lua
+add_requires("zlib 1.2.11")
+add_requireconfs("zlib", {override = true, version = "1.2.10"})
+```
+
+##### Rewrite package dependency configuration
+
+In fact, the biggest use of `add_requireconfs` is to allow users to rewrite the configuration of specific dependent packages of the installation package.
+
+What does it mean? For example, our project integrates the package libpng and uses a dynamic library version, but the zlib library that libpng depends on is actually a static library version.
+
+```lua
+add_requires("libpng", {configs = {shared = true}})
+```
+
+So if we want to change the zlib package that libpng depends on to be compiled as a dynamic library, how should we configure it? This requires `add_requireconfs`.
+
+
+```lua
+add_requires("libpng", {configs = {shared = true}})
+add_requireconfs("libpng.zlib", {configs = {shared = true}})
+```
+
+Through the writing method of `libpng.zlib` dependency path, specify an internal dependency and rewrite the internal dependency configuration.
+
+If the dependency path is deep, such as the dependency chain of `foo -> bar -> xyz`, we can write: `foo.bar.xyz`
+
+We can also rewrite the internal zlib library version that libpng depends on:
+
+
+```lua
+add_requires("libpng")
+add_requireconfs("libpng.zlib", {version = "1.2.10"})
+```
+
+##### Pattern matching for cascading dependencies
+
+If a package has a lot of dependencies, and the dependency level is also very deep, what to do, for example, the package libwebp, its dependencies are:
+
+```
+libwebp
+  - libpng
+    - zlib
+    - cmake
+  - libjpeg
+  - libtiff
+    - zlib
+  - giflib
+  - cmake
+```
+
+If I want to rewrite all the dependent libraries in libwebp to add specific configuration, then the configuration one by one will be very cumbersome. At this time, the recursive dependency pattern matching of `add_requireconfs()` is needed to support.
+
+```lua
+add_requires("libwebp")
+add_requireconfs("libwebp.**|cmake", {configs = {cxflags = "-DTEST"}})
+```
+
+In the above configuration, we added `-DTEST` to compile all the library dependencies in libwebp, but the cmake dependency is a build tool dependency, and we can exclude it by way of `|xxx`.
+
+The pattern matching here is very similar to `add_files()`.
+
+We are giving a few examples. For example, this time we only rewrite the single-level dependency configuration under libwebp to enable the debugging library:
+
+```lua
+add_requires("libwebp")
+add_requireconfs("libwebp.*|cmake", {debug = true})
+```
+
+### Graphical configuration supports mouse and scroll operations
+
+We upgraded the tui component library used by xmake: [LTUI](https://github.com/tboox/ltui), added support for the mouse, and scrolling support for some components, we can go to the graphical configuration, More flexible and convenient configuration of compilation options.
+
+<img src="https://tboox.org/static/img/ltui/choicebox_scrollbar.png" width="650px" />
+
+### stdin redirect support
+
+In the previous version, the process execution interface such as os.execv/os.runv provided by xmake only supports stdout/stderr output redirection, but does not support stdin input redirection, so in this version, we also do it Supported.
+
+The usage is as follows:
+
+```lua
+os.execv("foo", {"arg1", "arg2"}, {stdin = "/tmp/a"})
+```
+
+When we execute the process, we can use the /tmp/a file as the redirected input. Of course, we can also pass `{stdout = "/tmp/out"}` as the redirected output.
+
+### vs project grouping support
+
+We have added a new interface `set_group` to support grouping of each target. This interface is currently only used for vs/vsxmake project generation. The subproject directory tree within the vs project is displayed in groups according to the specified structure, but it may also be Other modules increase grouping support.
+
+For example, for the following grouping configuration:
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("test1")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    set_group("group1")
+
+target("test2")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    set_group("group1")
+
+target("test3")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    set_group("group1/group2")
+
+target("test4")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    set_group("group3/group4")
+
+target("test5")
+    set_kind("binary")
+    add_files("src/*.cpp")
+
+target("test6")
+    set_kind("binary")
+    add_files("src/*.cpp")
+```
+
+The effect of the generated VS project directory structure is as follows:
+
+![](/assets/img/manual/set_group.png)
+
+Among them, `set_group("group1/group2")` can set the target to the secondary group.
+
+### Automatically update vs project
+
+If you feel that it is cumbersome to generate and update the VS project through the `xmake project -k vsxmake` command every time, we can now configure the `plugin.vsxmake.autoupdate` rule in xmake.lua to achieve automatic update.
+
+Users can automatically update the VS project if there are changes to the file list or xmake.lua after each execution of the build in the VS project.
+
+```lua
+add_rules("plugin.vsxmake.autoupdate")
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+```
+
+### Improve vs/vsxmake project plugin
+
+In addition to the group support and automatic updates mentioned above, in this version, we also fixed a lot of VS project-related issues, such as: intellisense prompt improvement, path truncation problem repair, full support for remote dependency packages
+
+### Improve windows registry support
+
+xmake improves the internal winos module and adds some interfaces to access the registry more conveniently and obtain the registry configuration on windows.
+
+#### winos.registry_keys
+
+- Get the list of registry builds
+
+Support through pattern matching, traverse to obtain the registry key path list, `*` is single-level path matching, `**` is recursive path matching.
+
+```lua
+local keypaths = winos.registry_keys("HKEY_LOCAL_MACHINE\\SOFTWARE\\*\\Windows NT\\*\\CurrentVersion\\AeDebug")
+for _, keypath in ipairs(keypaths) do
+    print(winos.registry_query(keypath .. ";Debugger"))
+end
+```
+
+#### winos.registry_values
+
+- Get a list of registry value names
+
+Support to obtain the value name list of the specified key path through pattern matching, and the string after the `;` is the specified key name pattern matching string.
+
+```lua
+local valuepaths = winos.registry_values("HKEY_LOCAL_MACHINE\\SOFTWARE\\xx\\AeDebug;Debug*")
+for _, valuepath in ipairs(valuepaths) do
+    print(winos.registry_query(valuepath))
+end
+```
+
+#### winos.registry_query
+
+- Get the registry value
+
+Get the value under the specified registry path, if the value name is not specified, then get the default value of the key path
+
+```lua
+local value, errors = winos.registry_query("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug")
+local value, errors = winos.registry_query("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug;Debugger")
+```
+
+### Support for building Zig project
+
+In the last version, xmake has experimentally supported zig, but there were also many pitfalls during the period, especially when building on windows/macos encountered many problems.
+
+Then in the latest zig 0.7.1, most of the problems I encountered have been fixed, and now xmake can already support zig project compilation.
+
+We can quickly create a Zig empty project with the following command:
+
+```bash
+$ xmake create -l zig console
+```
+
+The content of xmake.lua is as follows:
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("console")
+    set_kind("binary")
+    add_files("src/*.zig")
+```
+
+As you can see, the configuration method is actually no different from C/C++. Because Zig and C have good binary compatibility, we can also use `add_requires` to add remote dependency support for C/C++ packages to the zig project.
+
+Then execute xmake to complete the compilation.
+
+```bash
+$ xmake
+```
+
+Then continue to run the run command, you can directly execute the zig program and output the running result.
+
+```bash
+$ xmake run
+Hello world!
+```
+
+We can also easily implement the mixed compilation support of C and Zig, just add the corresponding C code file.
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("console")
+    set_kind("binary")
+    add_files("src/*.zig", "src/*.c")
+```
+
+For complete code examples, see: [Zig with C](https://github.com/xmake-io/xmake/blob/dev/tests/projects/zig/console_c_call_zig/xmake.lua)
+
+### Luarocks plugin
+
+[luarocks](https://luarocks.org/) is a package management tool of lua, which provides the installation and integration of various lua modules, but it uses a built-in construction mechanism to build lua c modules.
+
+For example, in its rockspec file, the builtin build type is used to describe the construction of common lua c modules:
+
+```lua
+build = {
+    type = "builtin",
+    modules = {
+        ["module.hello"] = {
+            sources = "src/test.c"
+        }
+    },
+    copy_directories = {}
+}
+```
+
+This is not a problem for small modules, but if the c code structure of the module is more complicated, its built-in construction rules still have many limitations and are not flexible. In addition, switching msvc / mingw tool chain and parameter configuration etc. Neither is flexible enough.
+
+Therefore, xmake provides [luarocks=build-xmake](https://github.com/xmake-io/luarocks-build-xmake) plugin to use xmake to replace the built-in build system of luarocks. The replacement method is also very simple. You only need to buildin Change the build type to xmake and add the luarocks-build-xmake dependency.
+
+```lua
+dependencies = {
+    "lua >= 5.1",
+    "luarocks-build-xmake"
+}
+build = {
+    type = "xmake",
+    modules = {
+        ["module.hello"] = {
+            sources = "src/test.c"
+        }
+    },
+    copy_directories = {}
+}
+```
+
+But this is still very cumbersome. It is still necessary to describe the rules based on the source file list in the modules in the rockspec file, and then luarocks-build-xmake will automatically generate xmake.lua according to the configuration to complete the build.
+
+But since xmake is used, your own lua module can be maintained with xmake.lua, so the build configuration is more flexible, so we only need the following.
+
+```lua
+dependencies = {
+    "lua >= 5.1",
+    "luarocks-build-xmake"
+}
+build = {
+    type = "xmake",
+    copy_directories = {}
+}
+```
+
+You only need to set the current switch to xmake compilation, and use the xmake.lua rules file built into the lua module project.
+
+### Support for deploying Qt programs on windows
+
+Thank you very much for the contribution of @SirLynix, xmake can already support the deployment and installation of Qt applications on windows.
+
+We only need to maintain a Qt program normally, for example:
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("demo")
+     add_rules("qt.quickapp")
+     add_headerfiles("src/*.h")
+     add_files("src/*.cpp")
+     add_files("src/qml.qrc")
+```
+
+Then, we only need to execute the following compile and install commands, and xmake will automatically call the windeployqt.exe program to install and deploy our Qt application.
+
+```bash
+$ xmake
+$ xmake install -o d:\installdir
+```
+
+Related patches: [#1145](https://github.com/xmake-io/xmake/pull/1145)
+
+In addition, in the previous version, xmake has also supported the deployment and packaging of Qt programs for macOS and android versions. Each time only normal compilation commands are required, the QT .app/.apk installation package can be generated.
+
+```bash
+$ xmake f -p android --ndk=/xxx/android-ndk-r20b --sdk=/xxx
+$ xmake
+```
+
+### Some bug fixes
+
+We have also fixed many problems reported by users. Here we introduce some more important bug fixes, such as:
+
+We fixed the problem of empty double quotes in `add_defines("TEST=\"hello world\"")`, which caused errors in previous compilation.
+
+In addition, we improved the search and support of the vstudio environment, and solved the problem of compilation failure caused by Chinese in the user's home directory and environment variables.
+
+
+We have also improved the llvm toolchain to solve the problem of the lack of isysroot configuration when using the llvm tool chain under macOS if xcode is not installed, and the occasional failure of the header file dependency compilation under msvc.
+
+## Changelog
+
+### New features
+
+* [#1035](https://github.com/xmake-io/xmake/issues/1035): The graphics configuration menu fully supports mouse events, and support scroll bar
+* [#1098](https://github.com/xmake-io/xmake/issues/1098): Support stdin for os.execv
+* [#1079](https://github.com/xmake-io/xmake/issues/1079): Add autoupdate plugin rule for vsxmake, `add_rules("plugin.vsxmake.autoupdate")`
+* Add `xmake f --vs_runtime=MT` and `set_runtimes("MT")` to set vs runtime for targets and packages
+* [#1032](https://github.com/xmake-io/xmake/issues/1032): Support to enum registry keys and values
+* [#1026](https://github.com/xmake-io/xmake/issues/1026): Support group for vs/vsxmake project
+* [#1178](https://github.com/xmake-io/xmake/issues/1178): Add `add_requireconfs()` api to rewrite configs of depend packages
+* [#1043](https://github.com/xmake-io/xmake/issues/1043): Add `luarocks.module` rule for luarocks-build-xmake
+* [#1190](https://github.com/xmake-io/xmake/issues/1190): Support for Apple Silicon (macOS ARM)
+* [#1145](https://github.com/xmake-io/xmake/pull/1145): Support Qt deploy for Windows, thanks @SirLynix
+
+### Change
+
+* [#1072](https://github.com/xmake-io/xmake/issues/1072): Fix and improve to parse cl deps
+* Support utf8 for ui modules and `xmake f --menu`
+* Improve to support zig on macOS
+* [#1135](https://github.com/xmake-io/xmake/issues/1135): Improve multi-toolchain and multi-platforms for targets
+* [#1153](https://github.com/xmake-io/xmake/issues/1153): Improve llvm toolchain to support sysroot on macOS
+* [#1071](https://github.com/xmake-io/xmake/issues/1071): Improve to generate vs/vsxmake project to support for remote packages
+* Improve vs/vsxmake project plugin to support global `set_arch()` setting
+* [#1164](https://github.com/xmake-io/xmake/issues/1164): Improve to launch console programs for vsxmake project
+* [#1179](https://github.com/xmake-io/xmake/issues/1179): Improve llvm toolchain and add isysroot
+
+### Bugs fixed
+
+* [#1091](https://github.com/xmake-io/xmake/issues/1091): Fix incorrect ordering of inherited library dependencies
+* [#1105](https://github.com/xmake-io/xmake/issues/1105): Fix c++ language intellisense for vsxmake
+* [#1132](https://github.com/xmake-io/xmake/issues/1132): Fix TrimEnd bug for vsxmake
+* [#1142](https://github.com/xmake-io/xmake/issues/1142): Fix git not found when installing packages
+* Fix macos.version bug for macOS Big Sur
+* [#1084](https://github.com/xmake-io/xmake/issues/1084): Fix `add_defines()` bug (contain spaces)
+* [#1195](https://github.com/xmake-io/xmake/pull/1195): Fix unicode problem for vs and improve find_vstudio/os.exec

+ 547 - 0
docs/posts/xmake-update-v2.5.2.md

@@ -0,0 +1,547 @@
+---
+title: xmake v2.5.2 released, Support pull remote cross-toolchain and package integration
+tags: [xmake, lua, C/C++, toolchains, xrepo, packages, cross-toolchains]
+date: 2021-02-27
+author: Ruki
+---
+
+tags: [xmake, lua, C/C++, toolchains, xrepo, packages, cross-toolchains], date: '2021-02-27',]
+---
+
+[xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started quickly in a short time, allowing users to focus more on actual project development.
+
+In version 2.5.2, we added a heavyweight new feature: `Pull remote cross-compilation toolchain automatically`.
+
+Those who have done cross-compilation and have experience in C/C++ project migration should know that it is very troublesome to toss various cross-compilation toolchains
+and transplant and compile projects. You need to download the corresponding toolchain yourself.
+
+And it is easy to make mistakes in configuring the toolchain and the compilation environment to cause compilation failure.
+
+Now, xmake can already support the automatic download of the toolchain required by the project, and then use the corresponding toolchain to directly compile the project.
+The user does not need to care about how to configure the toolchain. In any case, just execute the `xmake` command to complete the compilation.
+
+![](/assets/img/posts/xmake/muslcc.gif)
+
+Even for the integration of C/C++ dependent packages, you can automatically switch to the corresponding toolchain to compile, install, and integrate.
+Everything is fully automated and does not require users to worry about it.
+
+In addition to the cross-compilation toolchain, we can also automatically pull toolchains, such as specific versions of llvm, llvm-mingw, zig
+and other toolchains to participate in the compilation of C/C++/Zig projects.
+
+Even cmake does not support the automatic pull of the toolchain. At most, it can only cooperate with third-party package management such as vcpkg/conan to integrate C/C++ dependent packages.
+In addition, even for C/C++ dependent packages, xmake has its own native The built-in package management tool has no dependencies at all.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+
+
+
+
+
+
+
+
+
+## New feature introduction
+
+### Automatically pull the remote cross-compilation toolchain
+
+Starting from version 2.5.2, we can pull the specified toolchain to integrate the compilation project, and we also support switching the dependent package to the corresponding remote toolchain to participate in the compilation and integration.
+
+For related example codes, see: [Toolchain/Packages Examples](https://github.com/xmake-io/xmake/tree/master/tests/projects/package)
+
+Related issue [#1217](https://github.com/xmake-io/xmake/issues/1217)
+
+Currently, we have included the following toolchain packages in the [xmake-repo](https://github.com/xmake-io/xmake-repo) repository, allowing xmake to pull and integrate remotely:
+
+* llvm
+* llvm-mingw
+* gnu-rm
+* muslcc
+* zig
+
+Although there are not many toolchain packages currently supported, but the overall architecture has been opened up, we only need to include more toolchains in the later stage, such as: gcc, tinyc, vs-buildtools and other toolchains.
+
+Since the xmake package supports semantic versions, if the project relies on a specific version of the gcc/clang compiler, users should not bother to install it. xmake will automatically detect whether the gcc/clang version of the current system meets the requirements.
+
+If the version is not satisfied, xmake will pull it remotely, automatically install and integrate a specific version of gcc/clang, and then compile the project.
+
+#### Pull the specified version of llvm toolchain
+
+We use clang in llvm-10 to compile the project.
+
+```lua
+add_requires("llvm 10.x", {alias = "llvm-10"})
+target("test")
+    set_kind("binary")
+    add_files("src/*.c)
+    set_toolchains("llvm@llvm-10")
+```
+
+Among them, the first half of `llvm@llvm-10` is the toolchain name, which is `toolchain("llvm")`, and the following name is the name of the toolchain package that needs to be associated, which is `package("llvm")` , But if an alias is set, the alias will be used first: `llvm-10`
+
+In addition, we will add the gcc toolchain package to xmake-repo in the future, so that users can freely switch to gcc-10, gcc-11 and other specific versions of gcc compilers without the need for users to manually install them.
+
+### Pull the cross-compilation toolchain
+
+We can also pull the specified cross-compilation toolchain to compile the project.
+
+```lua
+add_requires("muslcc")
+target("test")
+    set_kind("binary")
+    add_files("src/*.c)
+    set_toolchains("@muslcc")
+```
+
+muslcc is a cross-compilation toolchain provided by https://musl.cc. By default, xmake will automatically integrate and compile the `x86_64-linux-musl-` target platform.
+
+Of course, we can also use `xmake f -a arm64` to switch to the `aarch64-linux-musl-` target platform for cross-compilation.
+
+#### Pull the toolchain and integrate the dependency packages
+
+We can also use the specified muslcc cross-compilation toolchain to compile and integrate all dependent packages.
+
+```lua
+add_requires("muslcc")
+add_requires("zlib", "libogg", {system = false})
+
+set_toolchains("@muslcc")
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("zlib", "libogg")
+```
+
+At this time, the zlib, libogg and other dependent packages configured in the project will also switch to the muslcc toolchain, automatically download, compile and integrate them.
+
+We can also use `set_plat/set_arch` to fix the platform, so that only one xmake command is needed to complete the integration of the entire cross-compilation environment and architecture switching.
+
+```lua
+add_requires("muslcc")
+add_requires("zlib", "libogg", {system = false})
+
+set_plat("cross")
+set_arch("arm64")
+set_toolchains("@muslcc")
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("zlib", "libogg")
+```
+
+For complete examples, see: [Examples (muslcc)](https://github.com/xmake-io/xmake/blob/master/tests/projects/package/toolchain_muslcc/xmake.lua)
+
+#### Pull Zig toolchain
+
+xmake will first download a specific version of the zig toolchain, and then use this toolchain to compile the zig project. Of course, if the user has installed the zig toolchain by himself, xmake will also automatically detect whether the corresponding version is satisfied, and if it meets the requirements, it will use it directly , No need to download and install repeatedly.
+
+```lua
+add_rules("mode.debug", "mode.release")
+add_requires("zig 0.7.x")
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.zig")
+    set_toolchains("@zig")
+```
+
+### Support for zig cc compiler
+
+`zig cc` is the built-in c/c++ compiler of zig, which can compile and link c/c++ code completely independently. It does not rely on gcc/clang/msvc at all, which is very powerful.
+
+Therefore, we can use it to compile c/c++ projects. The key is that the zig toolchain is still very lightweight, only tens of M.
+
+We only need to switch to the zig toolchain to complete the compilation:
+
+```bash
+$ xmake f --toolchain=zig
+$ xmake
+[25%]: compiling.release src/main.c
+"zig cc" -c -arch x86_64 -fvisibility=hidden -O3 -DNDEBUG -o build/.objs/xmake_test/macosx/x86_64/release/src/main.c.o src/main.c
+[50%]: linking.release test
+"zig c++" -o build/macosx/x86_64/release/test build/.objs/xmake_test/macosx/x86_64/release/src/main.c.o -arch x86_64 -stdlib=libc++ -Wl,-x -lz
+[100%]: build ok!
+```
+
+In addition, another powerful feature of `zig cc` is that it also supports cross-compilation of different architectures, which is so happy.
+
+With xmake, we only need to switch the architecture to arm64 to achieve cross-compilation of arm64, for example:
+
+```bash
+$ xmake f -a arm64 --toolchain=zig
+$ xmake
+[25%]: compiling.release src/main.c
+"zig cc" -c -target aarch64-macos-gnu -arch arm64 -fvisibility=hidden -O3 -DNDEBUG -o build/.objs/xmake_test/macosx/arm64/release/src/main.c.o src/main.c
+checking for flags (-MMD -MF) ... ok
+checking for flags (-fdiagnostics-color=always) ... ok
+[50%]: linking.release xmake_test
+"zig c++" -o build/macosx/arm64/release/xmake_test build/.objs/xmake_test/macosx/arm64/release/src/main.co -target aarch64-macos-gnu -arch arm64 -stdlib=libc++ -Wl, -x -lz
+[100%]: build ok!
+```
+
+Even if you are on macOS, you can use `zig cc` to cross-compile windows/x64 target programs, which is equivalent to replacing what mingw does.
+
+```bash
+$ xmake f -p windows -a x64 --toolchain=zig
+$ xmake
+```
+
+### Automatically export all symbols in windows/dll
+
+There is such a function in cmake: `WINDOWS_EXPORT_ALL_SYMBOLS`, the statement in the installation cmake document:
+
+[https://cmake.org/cmake/help/latest/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.html](https://cmake.org/cmake/help/latest/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.html)
+
+> Enable this boolean property to automatically create a module definition (.def) file with all global symbols found
+> in the input .obj files for a SHARED library (or executable with ENABLE_EXPORTS) on Windows.
+> The module definition file will be passed to the linker causing all symbols to be exported from the .dll. For global data symbols,
+> __declspec(dllimport) must still be used when compiling against the code in the .dll. All other function symbols will be automatically exported and imported by callers.
+> This simplifies porting projects to Windows by reducing the need for explicit dllexport markup, even in C++ classes.
+
+Now, xmake also provides a similar feature, which can quickly export symbols in windows/dll in full to simplify the process of symbol export in the process of porting to third-party projects. In addition, if there are too many symbols in the project, you can also use this to simplify the explicit export requirements in the code.
+
+We only need to configure the `utils.symbols.export_all` rule on the corresponding generated dll target.
+
+```lua
+target("foo")
+    set_kind("shared")
+    add_files("src/foo.c")
+    add_rules("utils.symbols.export_all")
+
+target("test")
+    set_kind("binary")
+    add_deps("foo")
+    add_files("src/main.c")
+```
+
+xmake will automatically scan all obj object files, then generate the def symbol export file, and pass it to link.exe for fast and full export.
+
+### Convert mingw/.dll.a to msvc/.lib
+
+This feature is also based on the CMAKE_GNUtoMS function, which can convert the dynamic library (xxx.dll & xxx.dll.a) generated by MinGW into a format (xxx.dll & xxx.lib) that can be recognized by Visual Studio to achieve mixed compilation.
+
+This feature is particularly helpful for Fortran & C++ mixed projects, because VS does not provide the fortran compiler, you can only use MinGW's gfortran to compile the fortran part, and then link with the VS project.
+Often such projects also have some other libraries provided in the vs format, so it is not possible to compile it purely with MinGW. You can only use this function of cmake to mix and compile.
+
+Therefore, xmake also provides an auxiliary module interface to support it, and the usage is as follows:
+
+```lua
+import("utils.platform.gnu2mslib")
+
+gnu2mslib("xxx.lib", "xxx.dll.a")
+gnu2mslib("xxx.lib", "xxx.def")
+gnu2mslib("xxx.lib", "xxx.dll.a", {dllname = "xxx.dll", arch = "x64"})
+```
+
+Support to generate xxx.lib from def, and also support to automatically export .def from xxx.dll.a, and then generate xxx.lib
+
+For details, see: [issue #1181](https://github.com/xmake-io/xmake/issues/1181)
+
+### Add batch commands to simplify custom rules
+
+In order to simplify the configuration of user-defined rules, xmake newly provides custom script entries such as `on_buildcmd_file`, `on_buildcmd_files`, etc.
+We can construct a batch command line task through the batchcmds object, and xmake executes these commands at one time when actually executing the build.
+
+This is very useful for project generator plugins such as `xmake project`, because third-party project files generated by the generator do not support the execution of built-in scripts such as `on_build_files`.
+
+But the final result of the `on_buildcmd_file` construction is a batch of original cmd command lines, which can be directly executed as custom commands for other project files.
+
+In addition, compared to `on_build_file`, it also simplifies the implementation of compiling extension files, is more readable and easy to configure, and is more user-friendly.
+
+```lua
+rule("foo")
+    set_extensions(".xxx")
+    on_buildcmd_file(function (target, batchcmds, sourcefile, opt)
+        batchcmds:vrunv("gcc", {"-o", objectfile, "-c", sourcefile})
+    end)
+```
+
+In addition to `batchcmds:vrunv`, we also support some other batch commands, such as:
+
+```lua
+batchcmds:show("hello %s", "xmake")
+batchcmds:vrunv("gcc", {"-o", objectfile, "-c", sourcefile}, {envs = {LD_LIBRARY_PATH="/xxx"}})
+batchcmds:mkdir("/xxx") -- and cp, mv, rm, ln ..
+batchcmds:compile(sourcefile_cx, objectfile, {configs = {includedirs = sourcefile_dir, languages = (sourcekind == "cxx" and "c++11")}})
+batchcmds:link(objectfiles, targetfile, {configs = {linkdirs = ""}})
+```
+
+At the same time, we also simplify the configuration of dependency execution in it. The following is a complete example:
+
+```lua
+rule("lex")
+    set_extensions(".l", ".ll")
+    on_buildcmd_file(function (target, batchcmds, sourcefile_lex, opt)
+
+        -- imports
+        import("lib.detect.find_tool")
+
+        -- get lex
+        local lex = assert(find_tool("flex") or find_tool("lex"), "lex not found!")
+
+        -- get c/c++ source file for lex
+        local extension = path.extension(sourcefile_lex)
+        local sourcefile_cx = path.join(target:autogendir(), "rules", "lex_yacc", path.basename(sourcefile_lex) .. (extension == ".ll" and ".cpp" or ".c"))
+
+        -- add objectfile
+        local objectfile = target:objectfile(sourcefile_cx)
+        table.insert(target:objectfiles(), objectfile)
+
+        -- add commands
+        batchcmds:show_progress(opt.progress, "${color.build.object}compiling.lex %s", sourcefile_lex)
+        batchcmds:mkdir(path.directory(sourcefile_cx))
+        batchcmds:vrunv(lex.program, {"-o", sourcefile_cx, sourcefile_lex})
+        batchcmds:compile(sourcefile_cx, objectfile)
+
+        -- add deps
+        batchcmds:add_depfiles(sourcefile_lex)
+        batchcmds:set_depmtime(os.mtime(objectfile))
+        batchcmds:set_depcache(target:dependfile(objectfile))
+    end)
+```
+
+As we can see from the above configuration, the overall execution command list is very clear, and if we use `on_build_file` to implement it,
+we can compare the configuration of the previous rule, and we can intuitively feel that the configuration of the new interface is indeed simplified a lot.
+
+```lua
+rule("lex")
+
+    -- set extension
+    set_extensions(".l", ".ll")
+
+    -- load lex/flex
+    before_load(function (target)
+        import("core.project.config")
+        import("lib.detect.find_tool")
+        local lex = config.get("__lex")
+        if not lex then
+            lex = find_tool("flex") or find_tool("lex")
+            if lex and lex.program then
+                config.set("__lex", lex.program)
+                cprint("checking for Lex ... ${color.success}%s", lex.program)
+            else
+                cprint("checking for Lex ... ${color.nothing}${text.nothing}")
+                raise("lex/flex not found!")
+            end
+        end
+    end)
+
+    -- build lex file
+    on_build_file(function (target, sourcefile_lex, opt)
+
+        -- imports
+        import("core.base.option")
+        import("core.theme.theme")
+        import("core.project.config")
+        import("core.project.depend")
+        import("core.tool.compiler")
+        import("private.utils.progress")
+
+        -- get lex
+        local lex = assert(config.get("__lex"), "lex not found!")
+
+        -- get extension: .l/.ll
+        local extension = path.extension(sourcefile_lex)
+
+        -- get c/c++ source file for lex
+        local sourcefile_cx = path.join(target:autogendir(), "rules", "lex_yacc", path.basename(sourcefile_lex) .. (extension == ".ll" and ".cpp" or ".c"))
+        local sourcefile_dir = path.directory(sourcefile_cx)
+
+        -- get object file
+        local objectfile = target:objectfile(sourcefile_cx)
+
+        -- load compiler
+        local compinst = compiler.load((extension == ".ll" and "cxx" or "cc"), {target = target})
+
+        -- get compile flags
+        local compflags = compinst:compflags({target = target, sourcefile = sourcefile_cx})
+
+        -- add objectfile
+        table.insert(target:objectfiles(), objectfile)
+
+        -- load dependent info
+        local dependfile = target:dependfile(objectfile)
+        local dependinfo = option.get("rebuild") and {} or (depend.load(dependfile) or {})
+
+        -- need build this object?
+        local depvalues = {compinst:program(), compflags}
+        if not depend.is_changed(dependinfo, {lastmtime = os.mtime(objectfile), values = depvalues}) then
+            return
+        end
+
+        -- trace progress info
+        progress.show(opt.progress, "${color.build.object}compiling.lex %s", sourcefile_lex)
+
+        -- ensure the source file directory
+        if not os.isdir(sourcefile_dir) then
+            os.mkdir(sourcefile_dir)
+        end
+
+        -- compile lex
+        os.vrunv(lex, {"-o", sourcefile_cx, sourcefile_lex})
+
+        -- trace
+        if option.get("verbose") then
+            print(compinst:compcmd(sourcefile_cx, objectfile, {compflags = compflags}))
+        end
+
+        -- compile c/c++ source file for lex
+        dependinfo.files = {}
+        assert(compinst:compile(sourcefile_cx, objectfile, {dependinfo = dependinfo, compflags = compflags}))
+
+        -- update files and values to the dependent file
+        dependinfo.values = depvalues
+        table.insert(dependinfo.files, sourcefile_lex)
+        depend.save(dependinfo, dependfile)
+    end)
+```
+
+For a detailed description and background of this, see: [issue 1246](https://github.com/xmake-io/xmake/issues/1246)
+
+### Dependent package configuration improvements
+
+#### Use add_extsources to improve package name lookup
+
+Regarding the definition of remote dependency packages, we have also added two configuration interfaces `add_extsources` and `on_fetch`, which can better configure xmake to search for system libraries during the process of installing C/C++ packages.
+
+As for the specific background, we can give an example. For example, we added a package of `package("libusb")` to the [xmake-repo](https://github.com/xmake-io/xmake-repo) repository .
+
+Then users can directly integrate and use it in the following ways:
+
+```lua
+add_requires("libusb")
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("libusb")
+```
+
+If libusb is not installed on the user's system, xmake will automatically download the libusb library source code, automatically compile, install and integrate, and there is no problem.
+
+But if the user installs the libusb library to the system through `apt install libusb-1.0`, then xmake should automatically search for the libusb package installed by the user in the system environment first, and use it directly, avoiding additional download, compilation and installation.
+
+But here comes the problem, xmake internally passes `find_package("libusb")` and fails to find it. Why is that? Because the package name of libusb installed via apt is `libusb-1.0`, not libusb.
+
+We can only find it through `pkg-config --cflags libusb-1.0`, but the default find_package logic inside xmake doesn't know the existence of `libusb-1.0`, so it can't be found.
+
+Therefore, in order to better adapt to the search of system libraries in different system environments, we can use `add_extsources("pkgconfig::libusb-1.0")` to let xmake improve the search logic, for example:
+
+```lua
+package("libusb")
+    add_extsources("pkgconfig::libusb-1.0")
+    on_install(function (package)
+        -- ...
+    end)
+```
+
+In addition, we can also use this method to improve the search for packages installed by other package managers such as homebrew/pacman, for example: `add_extsources("pacman::libusb-1.0")`.
+
+#### Use on_fetch to improve find system libraries
+
+If the system libraries installed under different systems only have different package names, it is enough to use `add_extsources` to improve the system library search, which is simple and convenient.
+
+However, if some packages are installed in the system, the location is more complicated. To find them, some additional scripts may be needed. For example: access to the registry under windows to find packages, etc. At this time, we can use `on_fetch `Fully customized search system library logic.
+
+Let's take libusb as an example. Instead of `add_extsources`, we can use the following method to achieve the same effect. Of course, we can do more things in it.
+
+```lua
+package("libusb")
+    on_fetch("linux", function(package, opt)
+        if opt.system then
+            return find_package("pkgconfig::libusb-1.0")
+        end
+    end)
+```
+
+### Support manifest file on windows
+
+In the new version, we also added support for windows `.manifest` files, just add it through `add_files`.
+
+```lua
+add_rules("mode.debug", "mode.release")
+target("test")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    add_files("src/*.manifest")
+```
+
+### Improve xrepo command
+
+Regarding the xrepo command, we have also improved it slightly. Now you can batch uninstall and delete the installed packages through the following command, and support pattern matching:
+
+```bash
+$ xrepo remove --all
+$ xrepo remove --all zlib pcr*
+```
+
+### Support to export package configuration
+
+We have also improved `add_packages` so that it also supports `{public = true}` to export package configuration to the parent target.
+
+
+```lua
+add_rules("mode.debug", "mode.release")
+add_requires("pcre2")
+
+target("test")
+    set_kind("shared")
+    add_packages("pcre2", {public = true})
+    add_files("src/test.cpp")
+
+target("demo")
+    add_deps("test")
+    set_kind("binary")
+    add_files("src/main.cpp") -- here we can use the pcre2 library exported by the test target
+```
+
+
+it's private by default, but links/linkdirs will still be exported automatically
+
+```lua
+add_packages("pcre2")
+```
+
+it will export all, contains includedirs, defines
+
+```lua
+add_packages("pcre2", {public = true})
+```
+
+## Changelog
+
+### New features
+
+* [#955](https://github.com/xmake-io/xmake/issues/955#issuecomment-766481512): Support `zig cc` and `zig c++` as c/c++ compiler
+* [#955](https://github.com/xmake-io/xmake/issues/955#issuecomment-768193083): Support zig cross-compilation
+* [#1177](https://github.com/xmake-io/xmake/issues/1177): Improve to detect terminal and color codes
+* [#1216](https://github.com/xmake-io/xmake/issues/1216): Pass custom configuration scripts to xrepo
+* Add linuxos builtin module to get linux system information
+* [#1217](https://github.com/xmake-io/xmake/issues/1217): Support to fetch remote toolchain package when building project
+* [#1123](https://github.com/xmake-io/xmake/issues/1123): Add `rule("utils.symbols.export_all")` to export all symbols for windows/dll
+* [#1181](https://github.com/xmake-io/xmake/issues/1181): Add `utils.platform.gnu2mslib(mslib, gnulib)` module api to convert mingw/xxx.dll.a to msvc xxx.lib
+* [#1246](https://github.com/xmake-io/xmake/issues/1246): Improve rules and generators to support commands list
+* [#1239](https://github.com/xmake-io/xmake/issues/1239): Add `add_extsources` to improve find external packages
+* [#1241](https://github.com/xmake-io/xmake/issues/1241): Support add .manifest files for windows program
+* Support to use `xrepo remove --all` to remove all packages
+* [#1254](https://github.com/xmake-io/xmake/issues/1254): Support to export packages to parent target
+
+### Change
+
+* [#1226](https://github.com/xmake-io/xmake/issues/1226): Add missing qt include directories
+* [#1183](https://github.com/xmake-io/xmake/issues/1183): Improve c++ lanuages to support Qt6
+* [#1237](https://github.com/xmake-io/xmake/issues/1237): Add qt.ui files for vsxmake plugin
+* Improve vs/vsxmake plugins to support precompiled header and intellisense
+* [#1090](https://github.com/xmake-io/xmake/issues/1090): Simplify integration of custom code generators
+* [#1065](https://github.com/xmake-io/xmake/issues/1065): Improve protobuf rule to support compile_commands generators
+* [#1249](https://github.com/xmake-io/xmake/issues/1249): Improve vs/vsxmake generator to support startproject
+* [#605](https://github.com/xmake-io/xmake/issues/605): Improve to link orders for add_deps/add_packages
+* Remove deprecated `add_defines_h_if_ok` and `add_defines_h` apis for option
+
+### Bugs fixed
+
+* [#1219](https://github.com/xmake-io/xmake/issues/1219): Fix version check and update
+* [#1235](https://github.com/xmake-io/xmake/issues/1235): Fix include directories with spaces

+ 336 - 0
docs/posts/xmake-update-v2.5.3.md

@@ -0,0 +1,336 @@
+---
+title: xmake v2.5.3 Released, Support to build Linux bpf program and integrate Conda packages
+tags: [xmake, lua, C/C++, toolchains, bpf, conda, linux]
+date: 2021-04-08
+author: Ruki
+---
+
+[xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started quickly in a short time, allowing users to focus more on actual project development.
+
+In version 2.5.3, we have been able to build linux and android bpf programs.
+
+Although bpf has certain requirements for the compilation toolchain, such as the newer llvm/clang and android ndk toolchains, xmake can automatically pull a specific version of llvm/ndk for compilation, and it can also automatically pull libbpf dependencies. Library.
+
+In addition, in the new version we have added support for the integration of C/C++ packages from Conda.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+
+
+
+
+
+
+## New feature introduction
+
+### Build a Linux Bpf program
+
+In the new version, we started to support the compilation of bpf programs, as well as linux and android platforms, and can automatically pull the llvm and android ndk toolchains.
+
+For more details, please see: [#1274](https://github.com/xmake-io/xmake/issues/1274)
+
+The build configuration is as follows, it's very simple.
+
+If we do not need to build the android version, we can remove some configuration about android.
+
+```lua
+add_rules("mode.release", "mode.debug")
+add_rules("platform.linux.bpf")
+
+add_requires("linux-tools", {configs = {bpftool = true}})
+add_requires("libbpf")
+if is_plat("android") then
+    add_requires("ndk >=22.x")
+    set_toolchains("@ndk", {sdkver = "23"})
+else
+    add_requires("llvm >=10.x")
+    set_toolchains("@llvm")
+    add_requires("linux-headers")
+end
+
+target("minimal")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("linux-tools", "linux-headers", "libbpf")
+    set_license("GPL-2.0")
+```
+
+Through the above configuration, we can probably see that we have integrated and configured specific versions of llvm and NDK toolchains,
+as well as packages such as libbpf, linux-headers, linux-tools, etc..
+
+xmake will automatically pull them, and then use the corresponding toolchain to integrate and compile these dependent packages, and finally generate the bpf program.
+
+The linux-tools package mainly uses the libtool program inside to generate the bpf skeleton header file, and xmake will automatically run this tool to generate it.
+
+#### Compile linux bpf program
+
+We only need to execute the xmake command to complete the compilation, even if you have not installed llvm/clang.
+
+Of course, if you have already installed them, if it's version is matched, xmake will also be used first.
+
+```bash
+$ xmake
+```
+
+We can also use `xmake -v` to compile and view the complete and detailed compilation commands:
+
+```bash
+$ xmake -v
+[20%]: compiling.bpf src/minimal.bpf.c
+/usr/bin/ccache /usr/bin/clang -c -Qunused-arguments -m64 -fvisibility=hidden -O3 -Ibuild/.gens/minimal/linux/x86_64/release/rules/bpf -isystem /home/ruki/ .xmake/packages/l/linux-tools/5.9.16/0c52e491268946fe9a4bc91d4906d66b/include -isystem /home/ruki/.xmake/packages/z/zlib/1.2.11/3a7e4427eda94fc69fad0009a1629fd8/include -isystem /home/ruki/.xmake /packages/l/libelf/0.8.13/ced4fdd8151a475dafc5f51e2a031997/include -isystem /home/ruki/.xmake/packages/l/libelf/0.8.13/ced4fdd8151a475dafc5f51e2a031997/include/libelf -isystem /home/ruki/.xmake /l/libcap/2.27/c55b28aa3b3745489b93895d0d606ed1/include -isystem /home/ruki/.xmake/packages/l/linux-headers/5.9.16/8e3a440cbe1f42249aef3d89f1528ecb/include -DNDEBUG -target bpf -g -o build/.gens/.gens /linux/x86_64/release/rules/bpf/minimal.bpf.o src/minimal.bpf.c
+llvm-strip -g build/.gens/minimal/linux/x86_64/release/rules/bpf/minimal.bpf.o
+bpftool gen skeleton build/.gens/minimal/linux/x86_64/release/rules/bpf/minimal.bpf.o
+[40%]: ccache compiling.release src/minimal.c
+/usr/bin/ccache /usr/bin/clang -c -Qunused-arguments -m64 -fvisibility=hidden -O3 -Ibuild/.gens/minimal/linux/x86_64/release/rules/bpf -isystem /home/ruki/ .xmake/packages/l/linux-tools/5.9.16/0c52e491268946fe9a4bc91d4906d66b/include -isystem /home/ruki/.xmake/packages/z/zlib/1.2.11/3a7e4427eda94fc69fad0009a1629fd8/include -isystem /home/ruki/.xmake /packages/l/libelf/0.8.13/ced4fdd8151a475dafc5f51e2a031997/include -isystem /home/ruki/.xmake/packages/l/libelf/0.8.13/ced4fdd8151a475dafc5f51e2a031997/include/libelf -isystem /home/ruki/.xmake /l/libcap/2.27/c55b28aa3b3745489b93895d0d606ed1/include -isystem /home/ruki/.xmake/packages/l/linux-headers/5.9.16/8e3a440cbe1f42249aef3d89f1528ecb/include -DNDEBUG -o build/.objs/minimal/linux/x86_64/ release/src/minimal.co src/minimal.c
+[60%]: linking.release minimal
+/usr/bin/clang++ -o build/linux/x86_64/release/minimal build/.objs/minimal/linux/x86_64/release/src/minimal.co -m64 -L/home/ruki/.xmake/packages/l /linux-tools/5.9.16/0c52e491268946fe9a4bc91d4906d66b/lib64 -L/home/ruki/.xmake/packages/z/zlib/1.2.11/3a7e4427eda94fc69fad0009a1629fd8/lib -L/home/ruki/.xmake/packages/l/libelf /0.8.13/ced4fdd8151a475dafc5f51e2a031997/lib -L/home/ruki/.xmake/packages/l/libcap/2.27/c55b28aa3b3745489b93895d0d606ed1/lib -s -lbpf -lz -lelf -lcap
+[100%]: build ok!
+```
+
+#### Compile Android bpf program
+
+If we compile the Android version, we only need to switch to the android platform, which is also very convenient
+
+```bash
+$ xmake f -p android
+$ xmake
+```
+
+xmake will automatically download the ndk tool chain and the corresponding android version libbpf and other libraries to use.
+
+```bash
+$ xmake f -p android -c
+checking for architecture ... armeabi-v7a
+checking for Android SDK directory ... no
+checking for NDK directory ... no
+note: try installing these packages (pass -y to skip confirm)?
+in local-repo:
+  -> libcap 2.27 [linux, x86_64, from:linux-tools]
+  -> libelf 0.8.13 [linux, x86_64, from:linux-tools]
+  -> zlib 1.2.11 [linux, x86_64, from:linux-tools]
+  -> linux-tools 5.9.16 [bpftool:y]
+  -> ndk 22.0
+  -> libelf#1 0.8.13 [toolchains:@ndk, from:libbpf]
+  -> zlib#1 1.2.11 [toolchains:@ndk, from:libbpf]
+  -> libbpf v0.3 [toolchains:@ndk]
+please input: y (y/n)
+
+  => install libcap 2.27 .. ok
+  => install zlib 1.2.11 .. ok
+  => install libelf 0.8.13 .. ok
+  => install ndk 22.0 .. ok
+  => install linux-tools 5.9.16 .. ok
+  => install libelf#1 0.8.13 .. ok
+  => install zlib#1 1.2.11 .. ok
+  => install libbpf v0.3 .. ok
+ruki@010689392c4d:/mnt/bpf_minimal$ xmake
+[20%]: compiling.bpf src/minimal.bpf.c
+[40%]: ccache compiling.release src/minimal.c
+[60%]: linking.release minimal
+[100%]: build ok!
+```
+
+Of course, if you have manually downloaded the corresponding version of the ndk toolchain, we can also specify it to use it instead of automatically pulling it.
+
+
+```bash
+$ xmake f -p android --ndk=/xxx/android-ndk-r22
+$ xmake
+```
+
+However, if you download it yourself, remember to download at least the version above ndk r22, because clang in the lower version of ndk does not support the compilation and generation of bpf programs.
+
+Finally, here is a complete bpf scaffolding project based on xmake, you can refer to: [https://github.com/hack0z/libbpf-bootstrap](https://github.com/hack0z/libbpf-bootstrap)
+
+In addition, there is also a minimal bpf example program: https://github.com/xmake-io/xmake/tree/master/tests/projects/bpf/minimal
+
+### Integrate and use Conda package
+
+Conda is a very powerful third-party package manager that supports binary package pull in various languages. Here we only use the C/C++ package inside.
+
+Its integrated usage is similar to conan/vcpkg, except that the package namespace is changed to `conda::`
+
+```lua
+add_requires("conda::libpng 1.6.37", {alias = "libpng"})
+add_requires("conda::openssl")
+target("testco")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    add_packages("libpng", "conda::openssl")
+```
+
+Note: Although we support many third-party package managers, such as conan/conda/vcpkg/brew, etc., xmake also has its own package repository management.
+
+There are currently nearly 300 commonly used packages that support different platforms, some of which are The package also supports android/ios/mingw and even cross-compilation environment.
+
+Therefore, if the official [xmake-repo](https://github.com/xmake-io/xmake-repo) repository already provides the required package, you can use it directly without specifying the package namespace.
+
+### Get host cpu information
+
+In the current version, we have added a new `core.base.cpu` module and `os.cpuinfo` interface to obtain various information about the cpu, such as: cpu family/model, microarchitecture, core number, features and other information.
+
+This is usually very useful in projects that pursue performance. These projects usually need to be optimized according to the CPU's memory model and extended instruction set. At the same time, if you want to cross-platform, you need to specify the corresponding code according to the current cpu information, (for example, after intel haswell) One set, one set after amd zen, the older ones default to no optimization). This information is also used in many high-performance computing libraries.
+
+Therefore, through this module interface, you can obtain the current host cpu information and feature support when compiling and configuring, so as to enable relevant optimized compilation.
+
+We can quickly obtain all information through `os.cpuinfo()`, or specify `os.cpuinfo("march")` to obtain specific information, such as march, which is microarchitecture
+
+We can also use the `xmake l` command to quickly view the obtained results.
+
+```bash
+$ xmake l os.cpuinfo
+{
+  features = "fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clfsh ds acpi mmx fxsr sse sse2 ss htt tm pbe sse3 pclmulqdq dtes64 mon dscpl vmx tse64 mon dscpl vmx tse tm2 s
+sse4_1 sse4_2 x2apic movbe popcnt aes pcid xsave osxsave seglim64 tsctmr avx1_0 rdrand f16c",
+  vendor = "GenuineIntel",
+  model_name = "Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz",
+  family = 6,
+  march = "Kaby Lake",
+  model = 142,
+  ncpu = 8
+}
+
+$ xmake l os.cpuinfo march
+"Kaby Lake"
+
+$ xmake l os.cpuinfo ncpu
+8
+```
+
+If you want to determine the support of extended features such as `sse`, you need to import the `core.base.cpu` module to get it.
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    on_load(function (target)
+        import("core.base.cpu")
+        local ncpu = os.cpuinfo("ncpu")
+        - local ncpu = cpu.number()
+        if cpu.has_feature("sse") then
+            target:add("defines", "HAS_SSE")
+        end
+    end)
+```
+
+### Added cmake import file rules
+
+If we are developing a library program, after executing `xmake install` to install to the system, only the library file is installed, and there is no import file information such as .cmake/.pc, so the cmake project wants to be integrated and used through find_package, usually by looking for Not in our library.
+
+In order to allow the third-party cmake project to find it normally and use the integration, then we can use the `utils.install.cmake_importfiles` rule to export the .cmake file when installing the target target library file for the library import and search of other cmake projects .
+
+We only need to apply this rule to the specified target library target through the `add_rules` interface.
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_rules("utils.install.cmake_importfiles")
+```
+
+After configuration, the `xmake install` installation command can automatically export the .cmake import file.
+
+### Added pkgconfig import file rules
+
+Similar to the `cmake_importfiles` above, but we can also install the pkgconfig/.pc import file through the `utils.install.pkgconfig_importfiles` rule, which is very useful for library detection by tools such as autotools.
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_rules("utils.install.pkgconfig_importfiles")
+```
+
+### Added Git related built-in configuration variables
+
+xmake has always provided the automatic generation feature of config.h, which can be configured through the [add_configfiles](https://xmake.io/api/description/project-target.html#add-configfiles) interface, and it also supports the replacement of template variables. You can define some variables yourself.
+
+However, xmake also provides some commonly used built-in variable substitutions, such as version information, platform architecture, etc. For details, see: [https://xmake.io/api/description/project-target.html#add-configfiles](https://xmake.io/api/description/project-target.html#add-configfiles)
+
+The template configuration is very simple, just need:
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_configfiles("src/config.h.in")
+```
+
+The config.h file can be automatically generated according to config.h.in.
+
+But the new feature we are going to talk about here is the newly provided Git-related built-in variables to allow users to quickly and conveniently compile the project or the latest tag/branch/commit information of the current git project.
+
+This is very useful for troubleshooting and locating problems in the later stage.
+
+We can use commit to pinpoint the problem library based on which commit submission caused the problem. In this way, we can checkout but the corresponding version to troubleshoot the problem.
+
+We only need to configure and define the following variables in config.h.in.
+
+```c
+#define GIT_COMMIT "${GIT_COMMIT}"
+#define GIT_COMMIT_LONG "${GIT_COMMIT_LONG}"
+#define GIT_COMMIT_DATE "${GIT_COMMIT_DATE}"
+#define GIT_BRANCH "${GIT_BRANCH}"
+#define GIT_TAG "${GIT_TAG}"
+#define GIT_TAG_LONG "${GIT_TAG_LONG}"
+#define GIT_CUSTOM "${GIT_TAG}-${GIT_COMMIT}"
+```
+
+Execute xmake to compile, it will automatically generate the following config.h file.
+
+```c
+#define GIT_COMMIT "8c42b2c2"
+#define GIT_COMMIT_LONG "8c42b2c251793861eb85ffdf7e7c2307b129c7ae"
+#define GIT_COMMIT_DATE "20210121225744"
+#define GIT_BRANCH "dev"
+#define GIT_TAG "v1.6.6"
+#define GIT_TAG_LONG "v1.6.6-0-g8c42b2c2"
+#define GIT_CUSTOM "v1.6.6-8c42b2c2"
+```
+
+We can use them in the program by means of macro definitions.
+
+### Android NDK r22 support and remote pull
+
+The Android NDK has made very big structural changes since r22, removing some obsolete directories, such as the top-level sysroot directory and platforms directory,
+causing the previous detection method of xmake to fail.
+
+Therefore, in the new version, we have made improvements to xmake to better support the full version of the NDK toolchain, including the new version above r22.
+
+At the same time, the official repository of xmae-repo has also added the inclusion of ndk packages, enabling xmake to pull the ndk tool chain remotely for use.
+
+```lua
+add_requires("ndk >=22.x")
+set_toolchains("@ndk", {sdkver = "23"})
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+```
+
+## Changelog
+
+### New features
+
+* [#1259](https://github.com/xmake-io/xmake/issues/1259): Support `add_files("*.def")` to export symbols for windows/dll
+* [#1267](https://github.com/xmake-io/xmake/issues/1267): add `find_package("nvtx")`
+* [#1274](https://github.com/xmake-io/xmake/issues/1274): add `platform.linux.bpf` rule to build linux/bpf program
+* [#1280](https://github.com/xmake-io/xmake/issues/1280): Support fetchonly package to improve find_package
+* Support to fetch remote ndk toolchain package
+* [#1268](https://github.com/xmake-io/xmake/issues/1268): Add `utils.install.pkgconfig_importfiles` rule to install `*.pc` import file
+* [#1268](https://github.com/xmake-io/xmake/issues/1268): Add `utils.install.cmake_importfiles` rule to install `*.cmake` import files
+* [#348](https://github.com/xmake-io/xmake-repo/pull/348): Add `platform.longpaths` policy to support git longpaths
+* [#1314](https://github.com/xmake-io/xmake/issues/1314): Support to install and use conda packages
+* [#1120](https://github.com/xmake-io/xmake/issues/1120): Add `core.base.cpu` module and improve `os.cpuinfo()`
+* [#1325](https://github.com/xmake-io/xmake/issues/1325): Add builtin git variables for `add_configfiles`
+
+### Change
+
+* [#1275](https://github.com/xmake-io/xmake/issues/1275): Support conditionnal targets for vsxmake plugin
+* [#1290](https://github.com/xmake-io/xmake/pull/1290): Improve android ndk to support >= r22
+* [#1311](https://github.com/xmake-io/xmake/issues/1311): Add packages lib folder to PATH for vsxmake project
+
+### Bugs fixed
+
+* [#1266](https://github.com/xmake-io/xmake/issues/1266): Fix relative repo path in `add_repositories`
+* [#1288](https://github.com/xmake-io/xmake/issues/1288): Fix vsxmake generator with option configs

+ 195 - 0
docs/posts/xmake-update-v2.5.4.md

@@ -0,0 +1,195 @@
+---
+title: xmake v2.5.4 Released, Support apt/portage package manager and improve xrepo shell
+tags: [xmake, lua, C/C++, apt, portage, shell, package]
+date: 2021-05-15
+author: Ruki
+---
+
+[xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started quickly in a short time, allowing users to focus more on actual project development.
+
+In version 2.5.4, we added support for Apt and Portage package managers. On Ubuntu/Gentoo, we can also use `add_requires` to quickly integrate the packages they provide.
+
+And we have also improved the support for the Vcpkg package manager, and added support for the installation of arm/arm64 architecture packages.
+
+In addition, we have also enhanced the `xrepo env shell` environment. You can load a shell environment with a specific package configuration by configuring a series of `add_requires` package configurations in `xmake.lua`.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+## New feature introduction
+
+### New package manager support
+
+#### Add dependency package of ubuntu/apt
+
+Now we support the use of apt to integrate dependent packages, and will also automatically find packages that have been installed on the ubuntu system.
+
+```lua
+add_requires("apt::zlib1g-dev", {alias = "zlib"})
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("zlib")
+```
+
+#### Add gentoo/portage dependency package
+
+We also support the use of Portage to integrate dependency packages, and will automatically find packages already installed on the Gentoo system.
+
+```lua
+add_requires("portage::libhandy", {alias = "libhandy"})
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("libhandy")
+```
+
+
+
+
+
+
+
+
+
+
+#### Integrate arm/arm64 architecture package from Vcpkg
+
+```lua
+add_requires("vcpkg::zlib", {alias = "zlib"})
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("zlib")
+```
+
+The configuration method is still the same as before. You only need to switch to the arm/arm64 architecture to compile to automatically pull the arm/arm64 package from Vcpkg.
+
+```console
+$ xmake f -a arm64
+$ xmake
+```
+
+#### Support import and export installation packages
+
+Usually, after we use the xrepo command or xmake to install the package, if the same project is migrated to other machines for compilation, then the installation package must be downloaded again.
+
+In order to improve development efficiency, xrepo can now quickly export installed packages, including corresponding library files, header files, and so on.
+
+```console
+$ xrepo export -o /tmp/output zlib
+```
+
+Then we can also import the previously exported installation package on other machines to implement package migration.
+
+```console
+$ xrepo import -i /xxx/packagedir zlib
+```
+
+After importing, the corresponding project compilation will use them directly, no additional reinstallation of packages is required.
+
+#### Specific package shell environment support
+
+xrepo has a `xrepo env` command, which can specify the environment to load a specific package, and then run a specific program, for example, load the installation environment of the luajit package, and then run luajit:
+
+```console
+$ xrepo env luajit
+```
+
+Or bind a specific luajit version package environment, after loading bash, you can directly run the corresponding lujit.
+```console
+$ xrepo env -b "luajit 5.1" bash
+> luajit --version
+```
+
+However, there is a problem with this. If we install a lot of packages, different package configurations and versions are still different. If we want to load a bash environment with multiple packages at the same time.
+
+Then, the previous method cannot be supported. Therefore, in the new version, we will further improve it. Yes, we can customize some package configurations by adding the xmake.lua file in the current directory, and then enter the specific package shell environment .
+
+xmake.lua
+
+```lua
+add_requires("zlib 1.2.11")
+add_requires("python 3.x", "luajit")
+```
+
+For example, as above, we have configured three packages in xmake.lua and want to use them in the shell at the same time, then just run the following command in the current directory.
+
+```console
+$ xrepo env shell
+> python --version
+> luajit --version
+```
+
+It should be noted that here we used `xrepo env shell` instead of `xrepo env bash`, because bash can only be used on specific platforms, and `xrepo env shell` is a built-in command.
+
+It can automatically detect the current terminal environment, load the corresponding bash, sh, zsh, and cmd or powershell environments under windows, all of which are automatic.
+
+In addition, we also added some auxiliary features, such as prompt prompt, `xrepo env quit` environment exit command, historical input command switching and so on.
+
+#### Set up image acceleration package download
+
+In order to improve the problem of slow downloading of packages in the domestic network environment, xmake supports proxy settings, as well as pac.lua proxy configuration strategies.
+
+In the new version, we have improved the configuration of pac.lua and further support the configuration of mirror proxy rules. For example, access to all github.com domain names is switched to the hub.fastgit.org domain name to achieve accelerated downloading of packages.
+
+pac.lua configuration:
+
+```lua
+function mirror(url)
+     return url:gsub("github.com", "hub.fastgit.org")
+end
+```
+
+Then we set the second pac.lua file, the default path is `~/.xmake/pac.lua`.
+
+```console
+$ xmake g --proxy_pac=/tmp/pac.lua
+```
+
+Then, when we install the package, if we encounter the package source under the github.com domain name, it will automatically switch to the fastgit mirror to accelerate the download when downloading.
+
+```console
+$ xrepo install libpng
+> curl https://hub.fastgit.org/glennrp/libpng/archive/v1.6.37.zip -o v1.6.37.zip
+```
+
+#### Custom switch package storage directory
+
+Before, we could only configure and modify the default package installation directory through `xmake g --pkg_installdir=/tmp/xx`.
+
+Now, we can also modify it through the `XMAKE_PKG_INSTALLDIR` environment variable. The default path is: `~/.xmake/packages`.
+
+In addition, we also added the `XMAKE_PKG_CACHEDIR` environment variable to modify the package cache directory. The default path is: `~/.xmake/cache/packages`.
+
+
+## Changelog
+
+### New features
+
+* [#1323](https://github.com/xmake-io/xmake/issues/1323): Support find and install package from `apt`, `add_requires("apt::zlib1g-dev")`
+* [#1337](https://github.com/xmake-io/xmake/issues/1337): Add environment vars to change package directories
+* [#1338](https://github.com/xmake-io/xmake/issues/1338): Support import and export installed packages
+* [#1087](https://github.com/xmake-io/xmake/issues/1087): Add `xrepo env shell` and support load envs from `add_requires/xmake.lua`
+* [#1313](https://github.com/xmake-io/xmake/issues/1313): Support private package for `add_requires/add_deps`
+* [#1358](https://github.com/xmake-io/xmake/issues/1358): Support to set mirror url to speedup download package
+* [#1369](https://github.com/xmake-io/xmake/pull/1369): Support arm/arm64 packages for vcpkg, thanks @fallending
+* [#1405](https://github.com/xmake-io/xmake/pull/1405): Add portage package manager support, thanks @Phate6660
+
+### Change
+
+* Improve `find_package` and add `package:find_package` for xmake package
+* Remove deprecated `set_config_h` and `set_config_h_prefix` apis
+* [#1343](https://github.com/xmake-io/xmake/issues/1343): Improve to search local package files
+* [#1347](https://github.com/xmake-io/xmake/issues/1347): Improve to vs_runtime configs for binary package
+* [#1353](https://github.com/xmake-io/xmake/issues/1353): Improve del_files() to speedup matching files
+* [#1349](https://github.com/xmake-io/xmake/issues/1349): Improve `xrepo env shell` to support powershell
+
+### Bugs fixed
+
+* [#1380](https://github.com/xmake-io/xmake/issues/1380): Fix add packages errors
+* [#1381](https://github.com/xmake-io/xmake/issues/1381): Fix add local git source for package
+* [#1391](https://github.com/xmake-io/xmake/issues/1391): Fix cuda/nvcc toolchain

+ 430 - 0
docs/posts/xmake-update-v2.5.5.md

@@ -0,0 +1,430 @@
+---
+title: xmake v2.5.5 released, Support to download and install precompiled image packages
+tags: [xmake, lua, C/C++, mirror, package]
+date: 2021-06-30
+author: Ruki
+---
+
+[xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started quickly in a short time, allowing users to focus more on actual project development.
+
+In version 2.5.5, we continue to improve the experience of remote package integration, realize the pre-compiled package in the cloud, and then directly download the integrated pre-compiled binary package. This can greatly reduce the installation time of some packages that are very slow to compile.
+
+In addition, in the new version, we have also re-implemented the new version of the local package generation scheme, which fully supports `add_requires` and `add_packages` seamlessly. From then on, remote packages and local packages can be maintained in a unified way.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+## New feature introduction
+
+### Download and install the pre-compiled package
+
+Each time you install a package by the built-in package manager of xmake, you must download the corresponding package source code, and then perform local compilation and installation integration. This is for some large packages that compile very slowly, and some packages that rely on a lot of compilation tools. It will be very slow.
+
+Especially on windows, not only the dependence of the third party package on the compilation environment is more complicated, but also many packages and compilation are very slow, such as boost, openssl and so on.
+
+To this end, we implement cloud pre-compilation of packages based on github action, and pre-compile all commonly used packages, and then store them in [build-artifacts](https://github.com/xmake-mirror/build- artifacts) under Releases of the repository.
+
+Then, when we install the package, we will automatically download it from the binary image package source to achieve rapid integration (currently only pre-compiled windows packages are supported, and will be gradually released to other platforms in the future).
+
+We will pre-compile various configuration combinations such as plat/arch/MT/MD/static/shared of each package, and accurately pull the packages that users actually need according to the unique buildhash. All compiled products will be compressed and packaged with 7zip, as follows Picture:
+
+![](/assets/img/posts/xmake/build-artifacts.png)
+
+
+
+
+
+
+#### Configure mirror source to accelerate download
+
+Since our pre-compiled products are all placed on github, for Chinese users, considering that access to github is not very stable, we can also use the xmake mirror proxy function to automatically switch the actual download to fastgit and other mirror sites to speed up the download.
+
+
+We can configure mirror proxy rules through a pac.lua file, for example, access to all github.com domain names is switched to the hub.fastgit.org domain name to speed up downloading packages.
+
+pac.lua configuration:
+
+```lua
+function mirror(url)
+     return url:gsub("github.com", "hub.fastgit.org")
+end
+```
+
+Then we set this pac.lua file, the default path is `~/.xmake/pac.lua`, or you can manually configure pac.lua using the specified location.
+
+```console
+$ xmake g --proxy_pac=/tmp/pac.lua
+```
+
+Then, when we install the package, if we encounter the package source under the github.com domain name, it will automatically switch to the fastgit mirror to accelerate the download when downloading.
+
+```console
+$ xrepo install libpng
+> curl https://hub.fastgit.org/glennrp/libpng/archive/v1.6.37.zip -o v1.6.37.zip
+```
+
+Therefore, all downloads of pre-compiled products will also be speeded up. Of course, more than Fastgit provides github mirror acceleration in China, and users can also switch to other mirror sources, such as cnpmjs.org and so on.
+
+#### How to trigger cloud pre-compilation
+
+By default, xmake will not actively perform cloud pre-compilation and caching of all packages, which is too time-consuming and labor-intensive. Currently, only the pr is submitted to [xmake-repo](https://github.com/xmake-io/xmake- repo) The official package repository, when a new package is included or the package version is updated, the cloud pre-compilation behavior of the corresponding package will be automatically triggered.
+
+Therefore, if users want to contribute packages to our warehouse, they can basically be precompiled and cached (except for headeronly libraries), and if users do not want to contribute packages, but also want to get the precompilation acceleration of the corresponding package, it is also possible.
+
+Just submit pr to the build branch of the [build-artifacts](https://github.com/xmake-mirror/build-artifacts) repository, edit [build.txt](https://github.com/xmake-mirror /build-artifacts/blob/build/build.txt) file, just modify the package name and version list that needs to trigger pre-compilation, for example:
+
+build.txt
+
+```lua
+{
+    name = "asmjit",
+    versions = {
+        "2021.06.27"
+    }
+}
+```
+
+As long as pr is merged, it will automatically trigger the pre-compilation behavior, and then generate the final compilation product to releases.
+
+#### Mandatory source code compilation and installation
+
+Although we provide a pre-compilation, download and installation method, if users still want to compile and install from source code, we can also manually pass in the `--build` parameter to the xrepo command to force switch to source code compilation and installation mode.
+
+```console
+$ xrepo install --build openssl
+```
+
+In xmake.lua, we can also support source code compilation and installation.
+
+```lua
+add_requires("openssl", {build = true})
+```
+
+If it is not specified, then xmake will automatically try to download and install the precompiled package first.
+
+#### Add a private pre-compiled package warehouse
+
+Our official pre-compiled package repository is at: [build-artifacts](https://github.com/xmake-mirror/build-artifacts).
+
+Similarly, we can also configure and add our own pre-compiled warehouse, the way to add is similar:
+
+```console
+$ xmake repo --add local-repo [email protected]:xmake-mirror/myrepo-artifacts.git
+```
+
+You can also add in xmake.lua:
+
+```lua
+add_repositories("local-repo [email protected]:xmake-mirror/myrepo-artifacts.git")
+```
+
+### New version of the land package plan
+
+#### Default packaging format
+
+In the new version, we provide a new local package packaging solution that will seamlessly connect `add_requires` and `add_packages`.
+
+We can execute the `xmake package` command to generate the default new version of the packaging format.
+
+```console
+$ xmake package
+package(foo): build/packages/f/foo generated
+```
+
+It will generate the file `build/packages/f/foo/xmake.lua` with the following content:
+
+```lua
+package("foo")
+    set_description("The foo package")
+    set_license("Apache-2.0")
+    add_deps("add", "sub")
+
+    on_load(function (package)
+        package:set("installdir", path.join(os.scriptdir(), package:plat(), package:arch(), package:mode()))
+    end)
+
+    on_fetch(function (package)
+        local result = {}
+        result.links = "foo"
+        result.linkdirs = package:installdir("lib")
+        result.includedirs = package:installdir("include")
+        return result
+    end)
+```
+
+In fact, it uses `package()` to define and describe local packages, just like remote packages.
+
+The generated directory structure is as follows:
+
+```console
+$ tree build/packages/f/foo/
+build/packages/f/foo/
+├── macosx
+│ └── x86_64
+│ └── release
+│ ├── include
+│ │ └── foo.h
+│ └── lib
+│ └── libfoo.a
+└── xmake.lua
+```
+
+We can also use the `add_requires`/`add_repositories` interface to seamlessly integrate this package.
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+add_repositories("local-repo build")
+add_requires("foo")
+
+target("bar")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    add_packages("foo")
+```
+
+Among them, the `add_repositories` configuration specifies the warehouse root directory of the local package, and then this package can be referenced through `add_requires`.
+
+In addition, the generated local package has another feature, which is to support `target/add_deps`, which automatically associates the dependencies of multiple packages, and automatically connects all dependency links during integration.
+
+Here is the complete [test example](https://github.com/xmake-io/xmake/blob/dev/tests/actions/package/localpkg/test.lua).
+
+```console
+"/usr/bin/xcrun -sdk macosx clang++" -o build/macosx/x86_64/release/bar build/.objs/bar/macosx/x86_64/release/src/main.cpp.o -arch x86_64 -mmacosx-version -min=10.15 -isysroot
+/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -stdlib=libc++
+ -L/Users/ruki/projects/personal/xmake/tests/actions/package/localpkg/bar/build/packages/f/foo/macosx/x86_64/release/lib
+ -L/Users/ruki/projects/personal/xmake/tests/actions/package/localpkg/bar/build/packages/s/sub/macosx/x86_64/release/lib
+ -L/Users/ruki/projects/personal/xmake/tests/actions/package/localpkg/bar/build/packages/a/add/macosx/x86_64/release/lib
+ -Wl,-x -lfoo -lsub -ladd -lz
+```
+
+Note: The previous old version of the local packaging format is an early product and will still be retained, but it is not recommended to continue to use. If you want to continue to use it, you can execute the following command to package:
+
+```console
+$ xmake package -f oldpkg
+```
+
+#### Generate remote package
+
+In addition to the local package format, `xmake package` now also supports generating remote packages, so that users can quickly submit them to remote warehouses.
+
+We only need to modify the package format when packaging.
+
+```console
+$ xmake package -f remote
+```
+
+He will also generate packages/f/foo/xmake.lua file.
+
+```lua
+package("foo")
+    set_description("The foo package")
+    set_license("Apache-2.0")
+    add_deps("add", "sub")
+
+    add_urls("https://github.com/myrepo/foo.git")
+    add_versions("1.0", "<shasum256 or gitcommit>")
+
+    on_install(function (package)
+        local configs = {}
+        if package:config("shared") then
+            configs.kind = "shared"
+        end
+        import("package.tools.xmake").install(package, configs)
+    end)
+
+    on_test(function (package)
+        - TODO check includes and interfaces
+        - assert(package:has_cfuncs("foo", {includes = "foo.h"})
+    end)
+```
+
+Compared with the local package, the package definition configuration has more actual installation logic, as well as the settings of urls and versions,
+
+We can also modify urls, versions and other configuration values through additional parameters, for example:
+
+```console
+$ xmake package -f remote --url=https://xxxx/xxx.tar.gz --shasum=xxxxx --homepage=xxxxx`
+```
+
+xmake will also read the relevant configuration information from the target's `set_license` and `set_version` configurations.
+
+### Search for packages from third-party warehouses
+
+The built-in xrepo package manager command of xmake previously supported searching the built-in packages in the xmake-repo repository.
+
+```console
+$ xrepo search zlib "pcr*"
+    zlib:
+      -> zlib: A Massively Spiffy Yet Delicately Unobtrusive Compression Library (in xmake-repo)
+    pcr*:
+      -> pcre2: A Perl Compatible Regular Expressions Library (in xmake-repo)
+      -> pcre: A Perl Compatible Regular Expressions Library (in xmake-repo)
+```
+
+And now, we can also search for their packages from third-party package managers such as vcpkg, conan, conda and apt, just add the corresponding package namespace, for example:
+
+```console
+$ xrepo search vcpkg::pcre
+The package names:
+    vcpkg::pcre:
+      -> vcpkg::pcre-8.44#8: Perl Compatible Regular Expressions
+      -> vcpkg::pcre2-10.35#2: PCRE2 is a re-working of the original Perl Compatible Regular Expressions library
+```
+
+```console
+$ xrepo search conan::openssl
+The package names:
+    conan::openssl:
+      -> conan::openssl/1.1.1g:
+      -> conan::openssl/1.1.1h:
+```
+
+### Modify the target file name
+
+We know that for the modification of the target file name, we can use `set_basename` or use the `set_filename` interface to configure the implementation. The former modifies the name of the `xxx` part of `libxxx.so` and the latter can modify the complete file name.
+
+But in some cases, we just want to modify: extension `.so`, prefix name `lib`, or adding suffix name such as: `libxxx-d.so` will be very troublesome, or use `set_filename` for complete modification.
+
+Now, we newly provide three independent interfaces `set_prefixname`, `set_suffixname` and `set_extension` to configure them more flexibly.
+
+#### Set the leading name of the target file
+
+For example, change the default: `libtest.so` to `test.so`
+
+```lua
+target("test")
+    set_prefixname("")
+```
+
+#### Set the postname of the target file
+
+For example, change the default: `libtest.so` to `libtest-d.so`
+
+```lua
+target("test")
+    set_suffixname("-d")
+```
+
+#### Set the extension of the target file
+
+For example, change the default: `libtest.so` to `test.dll`
+
+```lua
+target("test")
+    set_prefixname("")
+    set_extension(".dll")
+```
+
+### Default target type
+
+In the new version, if the user does not specify the target type in the target setting `set_kind`, then the default is the binary program.
+
+Therefore, we can achieve smaller configurations, such as:
+
+```lua
+target("test")
+    add_files("src/*.c")
+```
+
+Compilation of some small projects can be completed in just two lines, or even shorter:
+
+```lua
+target("test", {files = "src/*.c"})
+```
+
+### New appletvos compilation platform
+
+We have also added a new appletvos compilation platform to support the compilation of programs on Apple's TVOS system. All you need is:
+
+```console
+$ xmake f -p appletvos
+$ xmake
+```
+
+### Import and export compile configuration
+
+We can also import and export the configured configuration set to facilitate the rapid migration of the configuration.
+
+#### Export configuration
+
+```console
+$ xmake f --export=/tmp/config.txt
+$ xmake f -m debug --xxx=y --export=/tmp/config.txt
+```
+
+#### Import configuration
+
+```console
+$ xmake f --import=/tmp/config.txt
+$ xmake f -m debug --xxx=y --import=/tmp/config.txt
+```
+
+#### Export configuration (with menu)
+
+```console
+$ xmake f --menu --export=/tmp/config.txt
+$ xmake f --menu -m debug --xxx=y --export=/tmp/config.txt
+```
+
+
+#### Import configuration (with menu)
+
+```console
+$ xmake f --menu --import=/tmp/config.txt
+$ xmake f --menu -m debug --xxx=y --import=/tmp/config.txt
+```
+
+### vs2022 support
+
+In addition, in the new version, we have also added support for the preview version of vs2020.
+
+### Improve xrepo shell environment
+
+In the last version, we supported customizing some package configurations by adding the xmake.lua file in the current directory, and then entering a specific package shell environment.
+
+```lua
+add_requires("zlib 1.2.11")
+add_requires("python 3.x", "luajit")
+```
+
+```console
+$ xrepo env shell
+> python --version
+> luajit --version
+```
+
+And now, we can also configure and load the corresponding toolchain environment in xmake.lua, for example, load the VS compilation environment.
+
+```lua
+set_toolchains("msvc")
+```
+
+## Changelog
+
+### New features
+
+* [#1421](https://github.com/xmake-io/xmake/issues/1421): Add prefix, suffix and extension options for target names
+* [#1422](https://github.com/xmake-io/xmake/issues/1422): Support search packages from vcpkg, conan
+* [#1424](https://github.com/xmake-io/xmake/issues/1424): Set binary as default target kind
+* [#1140](https://github.com/xmake-io/xmake/issues/1140): Add a way to ask xmake to try to download dependencies from a certain package manager
+* [#1339](https://github.com/xmake-io/xmake/issues/1339): Improve `xmake package` to generate new local/remote packages
+* Add `appletvos` platform support for AppleTV, `xmake f -p appletvos`
+* [#1437](https://github.com/xmake-io/xmake/issues/1437): Add headeronly library type for package to ignore `vs_runtime`
+* [#1351](https://github.com/xmake-io/xmake/issues/1351): Support export/import current configs
+* [#1454](https://github.com/xmake-io/xmake/issues/1454): Support to download and install precompiled image packages from xmake-mirror
+
+### Change
+
+* [#1425](https://github.com/xmake-io/xmake/issues/1425): Improve tools/meson to load msvc envirnoments
+* [#1442](https://github.com/xmake-io/xmake/issues/1442): Support to clone package resources from git url
+* [#1389](https://github.com/xmake-io/xmake/issues/1389): Support to add toolchain envs to `xrepo env`
+* [#1453](https://github.com/xmake-io/xmake/issues/1453): Support to export protobuf includedirs
+* Support vs2022
+
+### Bugs fixed
+
+* [#1413](https://github.com/xmake-io/xmake/issues/1413): Fix hangs on fetching packages
+* [#1420](https://github.com/xmake-io/xmake/issues/1420): Fix config and packages cache
+* [#1445](https://github.com/xmake-io/xmake/issues/1445): Fix WDK driver sign error
+* [#1465](https://github.com/xmake-io/xmake/issues/1465): Fix missing link directory

+ 150 - 0
docs/posts/xmake-update-v2.5.6.md

@@ -0,0 +1,150 @@
+---
+title: xmake v2.5.6 released, Improve compatibility of pre-compiled binary package
+tags: [xmake, lua, C/C++, mirror, package]
+date: 2021-07-26
+author: Ruki
+---
+
+[xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started quickly in a short time, allowing users to focus more on actual project development.
+
+This is a stability fix version, which mainly fixes and improves some compatibility issues related to pre-compiled binary packages. In addition, some useful interfaces have been added to set the default compilation platform, architecture and mode, as well as the allowed compilation platform, architecture list, and so on.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+## New feature introduction
+
+### Fix windows precompiled package compatibility
+
+The previous version provided preliminary support for the installation of pre-compiled packages under Windows, but because the compatibility of the toolset version was not considered, if the user's VS version is too low, link problems will occur when the package is integrated.
+
+According to the official description of ms, the binary library of msvc is backward compatible with the version of toolset. [https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=msvc-160](https://docs.microsoft.com/en-us/cpp/ porting/binary-compat-2015-2017?view=msvc-160)
+
+> You can mix binaries built by different versions of the v140, v141, and v142 toolsets. However, you must link by using a toolset at least as recent as the most recent binary in your app. Here's an example: you can link an app compiled using any 2017 toolset (v141, versions 15.0 through 15.9) to a static library compiled using, say, Visual Studio 2019 version 16.2 (v142), if they're linked using a version 16.2 or later toolset. You can link a version 16.2 library to a version 16.4 app as long as you use a 16.4 or later toolset.
+
+In other words, the cloud uses the library compiled by v141, and the user's msvc toolset can be compatible and supported as long as it is >=141.
+
+Therefore, we have improved the pre-compilation logic of the cloud, and pre-compiled the two toolsets of vs2015/14.16 and vs2019/14.29 respectively, and then xmake will select the best compatible version library to download and integrate according to the user's msvc version of toolset.
+
+
+
+
+
+
+
+
+### set_defaultplat
+
+#### Set the default compilation platform
+
+Only supported by v2.5.6 and above, it is used to set the default compilation platform of the project. If it is not set, the default platform follows the current system platform, which is os.host().
+
+For example, the default compilation platform on macOS is macosx, if the current project is an ios project, you can set the default compilation platform to iphoneos.
+
+```lua
+set_defaultplat("iphoneos")
+```
+
+It is equivalent to `xmake f -p iphoneos`.
+
+### set_defaultarch
+
+#### Set the default compilation architecture
+
+Only supported by v2.5.6 and above, it is used to set the default compilation architecture of the project. If it is not set, the default platform follows the current system architecture, which is os.arch().
+
+```lua
+set_defaultplat("iphoneos")
+set_defaultarch("arm64")
+```
+
+It is equivalent to `xmake f -p iphoneos -a arm64`.
+
+We can also set the default architecture under multiple platforms.
+
+```lua
+set_defaultarch("iphoneos|arm64", "windows|x64")
+```
+
+The arm64 architecture is compiled by default on iphoneos, and the x64 architecture is compiled by default on windows.
+
+### set_defaultmode
+
+#### Set the default compilation mode
+
+Only supported by v2.5.6 and above, it is used to set the default compilation mode of the project. If it is not set, the default is to compile in release mode.
+
+```lua
+set_defaultmode("releasedbg")
+```
+
+It is equivalent to `xmake f -m releasedbg`.
+
+### set_allowedplats
+
+#### Set the list of platforms allowed to compile
+
+It is only supported by v2.5.6 and above. It is used to set the list of compilation platforms supported by the project. If the user specifies other platforms, an error will be prompted. This is usually used to restrict the user from specifying the wrong invalid platform.
+
+If it is not set, then there are no platform restrictions.
+
+```lua
+set_allowedplats("windows", "mingw")
+```
+
+Set the current project to only support windows and mingw platforms.
+
+### set_allowedarchs
+
+#### Set the platform architecture that allows compilation
+
+Only supported by v2.5.6 and above. It is used to set the list of compiled architectures supported by the project. If the user specifies other architectures, an error will be prompted. This is usually used to restrict users from specifying incorrect invalid architectures.
+
+If it is not set, then there are no architectural restrictions.
+
+```lua
+set_allowedarchs("x64", "x86")
+```
+
+The current project only supports x64/x86 platforms.
+
+We can also specify the list of architectures allowed under multiple platforms at the same time.
+
+```lua
+set_allowedarchs("windows|x64", "iphoneos|arm64")
+```
+
+Set the current project to only support x64 architecture on windows, and only support arm64 architecture on iphoneos.
+
+### set_allowedmodes
+
+#### Set the list of allowed compilation modes
+
+It is only supported by v2.5.6 and above. It is used to set the list of compilation modes supported by the project. If the user specifies other modes, an error will be prompted. This is usually used to restrict the user from specifying incorrect invalid modes.
+
+If it is not set, then there is no mode restriction.
+
+```lua
+set_allowedmodes("release", "releasedbg")
+```
+
+Set the current project to only support the two compilation modes release/releasedbg.
+
+## Changelog
+
+### New features
+
+* [#1483](https://github.com/xmake-io/xmake/issues/1483): Add `os.joinenvs()` and improve package tools envirnoments
+* [#1523](https://github.com/xmake-io/xmake/issues/1523): Add `set_allowedmodes`, `set_allowedplats` and `set_allowedarchs`
+* [#1523](https://github.com/xmake-io/xmake/issues/1523): Add `set_defaultmode`, `set_defaultplat` and `set_defaultarch`
+
+### Change
+
+* Improve vs/vsxmake project generator to support vs2022
+* [#1513](https://github.com/xmake-io/xmake/issues/1513): Improve precompiled binary package compatibility on windows/msvc
+* Improve to find vcpkg root directory on windows
+* Improve to support Qt6
+
+### Bugs fixed
+
+* [#489](https://github.com/xmake-io/xmake-repo/pull/489): Fix run os.execv with too long envirnoment value on windows

+ 348 - 0
docs/posts/xmake-update-v2.5.7.md

@@ -0,0 +1,348 @@
+---
+title: xmake v2.5.7 released, Use lockfile to freeze package dependencies and Vala/Metal language support
+tags: [xmake, lua, C/C++, lock, package, vala]
+date: 2021-08-29
+author: Ruki
+---
+
+[xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started quickly in a short time, allowing users to focus more on actual project development.
+
+In this version, we have added a lot of new features. Not only did we increase the compilation support for Vala and Metal languages, we also improved the package dependency management, which can support the locking and updating of dependent packages like npm/package.lock, so The user's project will not be affected by the update and change of the upstream package repository.
+
+In addition, we also provide some more practical rules. For example, `utils.bin2c` allows users to easily and quickly embed some binary resource files into the code, and obtain relevant data in the form of header files.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+## New feature introduction
+
+### Added Vala language support
+
+In this version, we can already initially support the construction of Vala programs, just apply the `add_rules("vala")` rule.
+
+At the same time, we need to add some dependency packages, among which the glib package is necessary because Vala itself will also use it.
+
+`add_values("vala.packages")` is used to tell valac which packages the project needs, it will introduce the vala api of the relevant package, but the dependency integration of the package still needs to be downloaded and integrated through `add_requires("lua")`.
+
+E.g:
+
+```lua
+add_rules("mode.release", "mode.debug")
+
+add_requires("lua", "glib")
+
+target("test")
+    set_kind("binary")
+    add_rules("vala")
+    add_files("src/*.vala")
+    add_packages("lua", "glib")
+    add_values("vala.packages", "lua")
+```
+
+More examples: [Vala examples](https://github.com/xmake-io/xmake/tree/master/tests/projects/vala)
+
+### Added package dependency lock support
+
+This feature is similar to npm's package.lock and cargo's cargo.lock.
+
+
+
+
+
+
+
+
+For example, if we quote some packages, by default, if the version is not specified, xmake will automatically pull the latest version of the package for integrated use each time, for example:
+
+```lua
+add_requires("zlib")
+```
+
+However, if the upstream package repository is updated and changed, for example, zlib adds a new version 1.2.11, or the installation script is changed, the user's dependent packages will change.
+
+This can easily lead to some projects that were originally compiled and passed, and there may be some unstable factors due to changes in dependent packages, and the compilation may fail, etc.
+
+In order to ensure that the package used by the user's project is fixed each time, we can enable the package dependency lock through the following configuration.
+
+```lua
+set_policy("package.requires_lock", true)
+```
+
+This is a global setting and must be set to the global root scope. If enabled, xmake will automatically generate a `xmake-requires.lock` configuration file after executing package pull.
+
+It contains all the packages that the project depends on, as well as the current package version and other information.
+
+```lua
+{
+    __meta__ = {
+        version = "1.0"
+    },
+    ["macosx|x86_64"] = {
+        ["cmake#31fecfc4"] = {
+            repo = {
+                branch = "master",
+                commit = "4498f11267de5112199152ab030ed139c985ad5a",
+                url = "https://github.com/xmake-io/xmake-repo.git"
+            },
+            version = "3.21.0"
+        },
+        ["glfw#31fecfc4"] = {
+            repo = {
+                branch = "master",
+                commit = "eda7adee81bac151f87c507030cc0dd8ab299462",
+                url = "https://github.com/xmake-io/xmake-repo.git"
+            },
+            version = "3.3.4"
+        },
+        ["opengl#31fecfc4"] = {
+            repo = {
+                branch = "master",
+                commit = "94d2eee1f466092e04c5cf1e4ecc8c8883c1d0eb",
+                url = "https://github.com/xmake-io/xmake-repo.git"
+            }
+        }
+    }
+}
+```
+
+Of course, we can also execute the following command to force the upgrade package to the latest version.
+
+```console
+$ xmake require --upgrade
+upgrading packages ..
+  zlib: 1.2.10 -> 1.2.11
+1 package is upgraded!
+```
+
+### option supports runtime detection of code snippets
+
+Option itself provides two interfaces `add_csnippets/add_cxxsnippets`, which are used to quickly detect whether a specific piece of c/c++ code has been compiled, and if the compilation passes, the corresponding option option will be enabled.
+
+But the previous version can only provide compile-time detection, and in the new version, we also added runtime detection support.
+
+We can set the two parameters `{tryrun = true}` and `{output = true}` to try to run detection and capture output.
+
+#### Try to run the test
+
+Set tryrun to try to run to detect
+
+```lua
+option("test")
+    add_cxxsnippets("HAS_INT_4", "return (sizeof(int) == 4)? 0: -1;", {tryrun = true})
+```
+
+If the compile and run pass, the test option will be enabled.
+
+#### Detect and capture output at runtime
+
+Setting output will also try to detect and additionally capture the output content of the run.
+
+```lua
+option("test")
+    add_cxxsnippets("INT_SIZE",'printf("%d", sizeof(int)); return 0;', {output = true, number = true})
+```
+
+If the compile and run pass, the test option will be enabled, and the corresponding output content can be obtained as the value of option.
+
+Note: Set to capture output, the current option cannot set other snippets
+
+We can also get the output bound to the option through `is_config`.
+
+```lua
+if is_config("test", "8") tben
+    - xxx
+end
+```
+
+In addition, we have also improved the auxiliary detection interface of `includes("check_csnippets")` to support runtime detection.
+
+```lua
+includes("check_csnippets.lua")
+
+target("test")
+    set_kind("binary")
+    add_files("*.c")
+    add_configfiles("config.h.in")
+
+    check_csnippets("HAS_INT_4", "return (sizeof(int) == 4)? 0: -1;", {tryrun = true})
+    check_csnippets("INT_SIZE",'printf("%d", sizeof(int)); return 0;', {output = true, number = true})
+    configvar_check_csnippets("HAS_LONG_8", "return (sizeof(long) == 8)? 0: -1;", {tryrun = true})
+    configvar_check_csnippets("PTR_SIZE",'printf("%d", sizeof(void*)); return 0;', {output = true, number = true})
+```
+
+If capture output is enabled, `${define PTR_SIZE}` in `config.h.in` will automatically generate `#define PTR_SIZE 4`.
+
+Among them, the `number = true` setting can be forced as a number instead of a string value, otherwise it will be defined as `#define PTR_SIZE "4"` by default
+
+### Quickly embed binary resource files into code
+
+We can use the `utils.bin2c` rule to introduce some binary files into the project, and see them as c/c++ header files for developers to use to obtain the data of these files.
+
+For example, we can embed some png/jpg resource files into the code in the project.
+
+```lua
+target("console")
+    set_kind("binart")
+    add_rules("utils.bin2c", {extensions = {".png", ".jpg"}})
+    add_files("src/*.c")
+    add_files("res/*.png", "res/*.jpg")
+```
+
+Note: The setting of extensions is optional, the default suffix is ​​.bin
+
+Then, we can import and use it through `#include "filename.png.h"`, xmake will automatically generate the corresponding header file for you, and add the corresponding search directory.
+
+```c
+static unsigned char g_png_data[] = {
+    #include "image.png.h"
+};
+
+int main(int argc, char** argv)
+{
+    printf("image.png: %s, size: %d\n", g_png_data, sizeof(g_png_data));
+    return 0;
+}
+```
+
+The content of the generated header file is similar:
+
+```console
+cat build/.gens/test/macosx/x86_64/release/rules/c++/bin2c/image.png.h
+  0x68, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x78, 0x6D, 0x61, 0x6B, 0x65, 0x21, 0x0A, 0x00
+```
+
+### Added iOS/macOS application Metal compilation support
+
+We know that the `xcode.application` rule can compile iOS/macOS applications, generate .app/.ipa packages, and complete the signature operation at the same time.
+
+However, it did not support the compilation of code with .metal before. In the new version, we have added the `xcode.metal` rule, which is associated with the `xcode.application` rule by default to support metal compilation by default.
+
+xmake will automatically compile .metal and then package to generate the default.metallib file, and it will be built into .app/.ipa automatically.
+
+If the user's metal is accessed through `[_device newDefaultLibrary]`, it can be automatically supported, just like compiling with xcode.
+
+Here is a complete one we provide: [Project Example](https://github.com/xmake-io/xmake/blob/master/tests/projects/objc/metal_app/xmake.lua).
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("HelloTriangle")
+    add_rules("xcode.application")
+    add_includedirs("Renderer")
+    add_frameworks("MetalKit")
+    add_mflags("-fmodules")
+    add_files("Renderer/*.m", "Renderer/*.metal") ------- add metal files
+    if is_plat("macosx") then
+        add_files("Application/main.m")
+        add_files("Application/AAPLViewController.m")
+        add_files("Application/macOS/Info.plist")
+        add_files("Application/macOS/Base.lproj/*.storyboard")
+        add_defines("TARGET_MACOS")
+        add_frameworks("AppKit")
+    elseif is_plat("iphoneos") then
+        add_files("Application/*.m")
+        add_files("Application/iOS/Info.plist")
+        add_files("Application/iOS/Base.lproj/*.storyboard")
+        add_frameworks("UIKit")
+        add_defines("TARGET_IOS")
+```
+
+For example, on macOS, after compiling and running, the desired effect will be rendered through metal.
+
+![](/assets/img/posts/xmake/xmake-metal.png)
+
+If our project does not use the default metal library, we can also use the above-mentioned `utils.bin2c` rule as a source file and embed it into the code library, for example:
+
+```lua
+add_rules("utils.bin2c", {extensions = ".metal"})
+add_files("Renderer/*.metal")
+```
+
+Then in the code, we can access:
+
+```c
+static unsigned char g_metal_data[] = {
+    #include "xxx.metal.h"
+};
+
+id<MTLLibrary> library = [_device newLibraryWithSource:[[NSString stringWithUTF8String:g_metal_data]] options:nil error:&error];
+```
+
+### Improve add_repositories
+
+If we use the local repository built into the project, we used to introduce it through `add_repositories("myrepo repodir")`.
+
+However, it is not based on the relative directory of the current xmake.lua file directory like `add_files()`, and there is no automatic path conversion, so it is easy to encounter the problem of not being able to find the repo.
+
+Therefore, we have improved it, and you can specify the corresponding root directory location through an additional rootdir parameter, such as the script directory relative to the current xmake.lua.
+
+```lua
+add_repositories("myrepo repodir", {rootdir = os.scriptdir()})
+```
+
+### os.cp supports symbolic links
+
+In the previous version, the `os.cp` interface could not handle the copying of symbolic links very well. It would automatically expand the link and copy the actual file content, which would only cause the symbolic link to be lost after copying.
+
+If you want to keep the symbolic link as it is after copying, you only need to set the following parameter: `{symlink = true}`
+
+```lua
+os.cp("/xxx/symlink", "/xxx/dstlink", {symlink = true})
+```
+
+### Compile automatically generated code more easily
+
+Sometimes, we have such a requirement to automatically generate some source files to participate in the later code compilation before compilation. But because the files added by `add_files` are already determined when the compilation is executed, they cannot be added dynamically during the compilation process (because parallel compilation is required).
+
+Therefore, to achieve this requirement, we usually need to customize a rule, and then actively call the compiler module to deal with a series of issues such as compilation of generated code, injection of object files, and dependency updates.
+
+This is not a big problem for the xmake developers themselves, but for users, it is still more cumbersome and difficult to get started.
+
+In the new version, we have improved the support for `add_files` and added the `{always_added = true}` configuration to tell xmake that we always need to add the specified source file, even if it does not exist yet.
+
+In this way, we can rely on the default compilation process of xmake to compile the automatically generated code, like this:
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("autogen_code")
+    set_kind("binary")
+    add_files("$(buildir)/autogen.cpp", {always_added = true})
+    before_build(function (target)
+        io.writefile("$(buildir)/autogen.cpp", [[
+#include <iostream>
+
+using namespace std;
+
+int main(int argc, char** argv)
+{
+    cout << "hello world!" << endl;
+    return 0;
+}
+        ]])
+    end)
+```
+
+There is no need for additional rule definitions, only the compilation order needs to be guaranteed, and the code files are generated at the correct stage.
+
+However, we also need to pay attention that since the currently automatically generated source files may not yet exist, we cannot use pattern matching in `add_files`, and can only explicitly add each source file path.
+
+## Changelog
+
+### New features
+
+* [#1534](https://github.com/xmake-io/xmake/issues/1534): Support to compile Vala lanuage project
+* [#1544](https://github.com/xmake-io/xmake/issues/1544): Add utils.bin2c rule to generate header from binary file
+* [#1547](https://github.com/xmake-io/xmake/issues/1547): Support to run and get output of c/c++ snippets in option
+* [#1567](https://github.com/xmake-io/xmake/issues/1567): Package "lock file" support to freeze dependencies
+* [#1597](https://github.com/xmake-io/xmake/issues/1597): Support to compile *.metal files to generate *.metalib and improve xcode.application rule
+
+### Change
+
+* [#1540](https://github.com/xmake-io/xmake/issues/1540): Better support for compilation of automatically generated code
+* [#1578](https://github.com/xmake-io/xmake/issues/1578): Improve add_repositories to support relative path better
+* [#1582](https://github.com/xmake-io/xmake/issues/1582): Improve installation and os.cp to reserve symlink
+
+### Bugs fixed
+
+* [#1531](https://github.com/xmake-io/xmake/issues/1531): Fix error info when loading targets failed

+ 425 - 0
docs/posts/xmake-update-v2.5.8.md

@@ -0,0 +1,425 @@
+---
+title: xmake v2.5.8 is released, Support Pascal/Swig program and Lua53 runtime
+tags: [xmake, lua, C/C++, pascal, swig, lua5.3]
+date: 2021-10-08
+author: Ruki
+---
+
+[xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started quickly in a short time, allowing users to focus more on actual project development.
+
+In this version, we mainly added support for the construction of Pascal language projects and Swig modules, and for the Vala language support added in the previous version, we have also made further improvements, adding support for the construction of dynamic and static libraries.
+
+In addition, xmake now also supports the optional Lua5.3 runtime, which provides better cross-platform support. At present, xmake has been able to run normally on the LoongArch architecture.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+## New feature introduction
+
+### Pascal language support
+
+Currently, we can use the cross-platform Free Pascal toolchain fpc to compile and build Pascal programs, for example:
+
+#### Console Program
+
+```lua
+add_rules("mode.debug", "mode.release")
+target("test")
+    set_kind("binary")
+    add_files("src/*.pas")
+```
+
+#### Dynamic library program
+
+```lua
+add_rules("mode.debug", "mode.release")
+target("foo")
+    set_kind("shared")
+    add_files("src/foo.pas")
+
+target("test")
+    set_kind("binary")
+    add_deps("foo")
+    add_files("src/main.pas")
+```
+
+We can also add compilation options related to Pascal code through the `add_fcflags()` interface.
+
+For more examples, see: [Pascal examples](https://github.com/xmake-io/xmake/tree/master/tests/projects/pascal)
+
+
+
+
+
+
+
+### Vala library compilation support
+
+In the last version, we added support for the Vala language, but before, we could only support the compilation of console programs, and could not generate library files. In this version, we have added additional compilation support for static libraries and dynamic libraries.
+
+#### Static library program
+
+We can set the exported interface header file name by `add_values("vala.header", "mymath.h")`, and set the exported vapi by `add_values("vala.vapi", "mymath-1.0.vapi")` file name.
+
+```lua
+add_rules("mode.release", "mode.debug")
+
+add_requires("glib")
+
+target("mymath")
+    set_kind("static")
+    add_rules("vala")
+    add_files("src/mymath.vala")
+    add_values("vala.header", "mymath.h")
+    add_values("vala.vapi", "mymath-1.0.vapi")
+    add_packages("glib")
+
+target("test")
+    set_kind("binary")
+    add_deps("mymath")
+    add_rules("vala")
+    add_files("src/main.vala")
+    add_packages("glib")
+```
+
+#### Dynamic library program
+
+```lua
+add_rules("mode.release", "mode.debug")
+
+add_requires("glib")
+
+target("mymath")
+    set_kind("shared")
+    add_rules("vala")
+    add_files("src/mymath.vala")
+    add_values("vala.header", "mymath.h")
+    add_values("vala.vapi", "mymath-1.0.vapi")
+    add_packages("glib")
+
+target("test")
+    set_kind("binary")
+    add_deps("mymath")
+    add_rules("vala")
+    add_files("src/main.vala")
+    add_packages("glib")
+```
+
+For more examples, see: [Vala examples](https://github.com/xmake-io/xmake/tree/master/tests/projects/vala)
+
+### Swig module support
+
+We provide `swig.c` and `swig.cpp` rules, which can call the swig program to generate the c/c++ module interface code for the specified script language, and then cooperate with the xmake package management system to achieve fully automated module and dependency package integration .
+
+Related issues: [#1622](https://github.com/xmake-io/xmake/issues/1622)
+
+#### Lua/C Module
+
+```lua
+add_rules("mode.release", "mode.debug")
+add_requires("lua")
+
+target("example")
+    add_rules("swig.c", {moduletype = "lua"})
+    add_files("src/example.i", {swigflags = "-no-old-metatable-bindings"})
+    add_files("src/example.c")
+    add_packages("lua")
+```
+
+Among them, swigflags can be set to pass some swig-specific flags options.
+
+#### Python/C module
+
+```lua
+add_rules("mode.release", "mode.debug")
+add_requires("python 3.x")
+
+target("example")
+    add_rules("swig.c", {moduletype = "python"})
+    add_files("src/example.i", {scriptdir = "share"})
+    add_files("src/example.c")
+    add_packages("python")
+```
+
+If scriptdir is set, then when we perform the installation, the python wrap script of the corresponding module will be installed to the specified directory.
+
+#### Python/C++ Module
+
+```lua
+add_rules("mode.release", "mode.debug")
+add_requires("python 3.x")
+
+target("example")
+    add_rules("swig.cpp", {moduletype = "python"})
+    add_files("src/example.i", {scriptdir = "share"})
+    add_files("src/example.cpp")
+    add_packages("python")
+```
+
+### Lua5.3 runtime support
+
+Xmake has always used Luajit as the default runtime, because it was considered that Luajit is relatively faster, and the fixed Lua 5.1 syntax is more suitable for the needs of xmake's internal implementation.
+
+However, considering that Luajit's update is not strong, the author's maintenance is not very active, and its cross-platform performance is relatively poor. For some new architectures, such as Loongarch, riscv, etc., the support is not timely, which somewhat limits the platform support of xmake. .
+
+For this reason, in the new version, we also built Lua5.3 as an optional runtime. We only need to compile and install xmake with the following command to switch from Luajit to Lua5.3 runtime:
+
+#### Linux/macOS
+
+```bash
+$ make RUNTIME=lua
+```
+
+#### Windows
+
+```bash
+$ cd core
+$ xmake f --runtime=lua
+$ xmake
+```
+
+At present, the current version is still the default luajit runtime. Users can switch to Lua5.3 runtime according to their needs, but this has almost no compatibility impact on the user's project xmake.lua configuration script.
+
+Because the configuration interface of xmake has already done a layer of abstract encapsulation, some native interfaces with compatibility differences in Luajit/Lua5.3 will not be open to users, so it is completely unaware for project construction.
+
+The only difference is that xmake with Lua5.3 supports more platforms and architectures.
+
+#### Performance comparison
+
+I have done some basic build tests. Whether it is startup time, build performance or memory usage, Lua5.3 and Luajit's xmake are almost the same. Because for the build system, the main performance bottleneck is the compiler, and the loss of its own scripts is very small.
+
+Moreover, some low-level Lua modules inside xmake, such as io, character encoding, string manipulation, etc., have all been rewritten in c code by themselves, and do not rely on a specific Lua runtime engine at all.
+
+#### Will you consider switching to Lua by default?
+
+Since we have just supported Lua5.3, although it is relatively stable after testing, in order to ensure that the user environment is not affected in any way, we still need to observe for a period of time. In the short term, we still use Luajit by default.
+
+When the 2.6.1 version starts, we will start to switch to Lua5.3 as the default runtime environment. If you are interested, you can also help test it online. If you encounter any problems, please feel free to report on issues.
+
+#### LoongArch architecture support
+
+Since we added Lua5.3 runtime support, we can now support running xmake on the LoongArch architecture, and all test examples have been tested.
+
+#### Lua 5.4
+
+At present, we are still on the sidelines of Lua 5.4. If we wait for Lua 5.4 to become stable later, we will also try to consider continuing to upgrade to Lua 5.4.
+
+### Third-party source code mixed compilation support
+
+#### Integrated CMake source library
+
+In the new version, we have been able to directly integrate the source library with CMakeLists.txt in our project through the package mode of xmake, instead of downloading and installing it remotely.
+
+Related issues: [#1714](https://github.com/xmake-io/xmake/issues/1714)
+
+For example, we have the following project structure:
+
+```
+├── foo
+│ ├── CMakeLists.txt
+│ └── src
+│ ├── foo.c
+│ └── foo.h
+├── src
+│ └── main.c
+├── test.lua
+└── xmake.lua
+```
+
+The foo directory is a static library maintained by cmake, and the root directory is maintained by xmake. We can define the `package("foo")` package in xmake.lua to describe how to build the foo code library.
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+package("foo")
+    add_deps("cmake")
+    set_sourcedir(path.join(os.scriptdir(), "foo"))
+    on_install(function (package)
+        local configs = {}
+        table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
+        table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
+        import("package.tools.cmake").install(package, configs)
+    end)
+    on_test(function (package)
+        assert(package:has_cfuncs("add", {includes = "foo.h"}))
+    end)
+package_end()
+
+add_requires("foo")
+
+target("demo")
+    set_kind("binary")
+    add_files("src/main.c")
+    add_packages("foo")
+```
+
+Among them, we set the code directory location of the foo package through `set_sourcedir()`, and then import the auxiliary module of `package.tools.cmake` through import to call cmake to build the code, xmake will automatically obtain the generated libfoo.a and the corresponding header document.
+
+!> If only the local source code is integrated, we don't need to set additional `add_urls` and `add_versions`.
+
+For the configuration description of the package, see: [Package description description](/zh/guide/package-management/package-distribution).
+
+After defining the package, we can integrate it with `add_requires("foo")` and `add_packages("foo")`, just like integrating remote packages.
+
+In addition, `on_test` is optional. If you want to strictly check whether the package is compiled and installed successfully, you can do some tests in it.
+
+For a complete example, see: [Library with CMakeLists](https://github.com/xmake-io/xmake/tree/master/tests/projects/c/library_with_cmakelists)
+
+#### Integrate autoconf source library
+
+We can also use `package.tools.autoconf` to locally integrate third-party code libraries maintained by autoconf.
+
+```lua
+package("pcre2")
+
+    set_sourcedir(path.join(os.scriptdir(), "3rd/pcre2"))
+
+    add_configs("jit", {description = "Enable jit.", default = true, type = "boolean"})
+    add_configs("bitwidth", {description = "Set the code unit width.", default = "8", values = {"8", "16", "32"}})
+
+    on_load(function (package)
+        local bitwidth = package:config("bitwidth") or "8"
+        package:add("links", "pcre2-" .. bitwidth)
+        package:add("defines", "PCRE2_CODE_UNIT_WIDTH=" .. bitwidth)
+        if not package:config("shared") then
+            package:add("defines", "PCRE2_STATIC")
+        end
+    end)
+
+    on_install("macosx", "linux", "mingw", function (package)
+        local configs = {}
+        table.insert(configs, "--enable-shared=" .. (package:config("shared") and "yes" or "no"))
+        table.insert(configs, "--enable-static=" .. (package:config("shared") and "no" or "yes"))
+        if package:debug() then
+            table.insert(configs, "--enable-debug")
+        end
+        if package:config("pic") ~= false then
+            table.insert(configs, "--with-pic")
+        end
+        if package:config("jit") then
+            table.insert(configs, "--enable-jit")
+        end
+        local bitwidth = package:config("bitwidth") or "8"
+        if bitwidth ~= "8" then
+            table.insert(configs, "--disable-pcre2-8")
+            table.insert(configs, "--enable-pcre2-" .. bitwidth)
+        end
+        import("package.tools.autoconf").install(package, configs)
+    end)
+
+    on_test(function (package)
+        assert(package:has_cfuncs("pcre2_compile", {includes = "pcre2.h"}))
+    end)
+```
+
+Both `package.tools.autoconf` and `package.tools.cmake` modules can support cross-compilation platforms and toolchains such as mingw/cross/iphoneos/android, xmake will automatically pass the corresponding toolchain into it, and the user does not need to do Anything else.
+
+#### Integrate with other build systems
+
+We also support the integration of code libraries maintained by other build systems such as Meson/Scons/Make. You only need to import the corresponding build auxiliary modules. I won’t go into details here. We can further check the documentation: [Integrate local third-party source code libraries ](/zh/guide/package-management/using-official-packages)
+
+### Improve compiler feature detection
+
+In the previous version, we can use the `check_features` auxiliary interface to detect specific compiler features, such as:
+
+```lua
+includes("check_features.lua")
+
+target("test")
+    set_kind("binary")
+    add_files("*.c")
+    add_configfiles("config.h.in")
+    configvar_check_features("HAS_CONSTEXPR", "cxx_constexpr")
+    configvar_check_features("HAS_CONSEXPR_AND_STATIC_ASSERT", {"cxx_constexpr", "c_static_assert"}, {languages = "c++11"})
+```
+
+config.h.in
+
+```c
+${define HAS_CONSTEXPR}
+${define HAS_CONSEXPR_AND_STATIC_ASSERT}
+```
+
+config.h
+
+```c
+/* #undef HAS_CONSTEXPR */
+#define HAS_CONSEXPR_AND_STATIC_ASSERT 1
+```
+
+If the current cxx_constexpr feature supports it, the HAS_CONSTEXPR macro will be enabled in config.h.
+
+#### Added C/C++ standard support detection
+
+After 2.5.8, we continue to add support for cstd and c++ std version detection, related issues: [#1715](https://github.com/xmake-io/xmake/issues/1715)
+
+E.g:
+
+```lua
+configvar_check_features("HAS_CXX_STD_98", "cxx_std_98")
+configvar_check_features("HAS_CXX_STD_11", "cxx_std_11", {languages = "c++11"})
+configvar_check_features("HAS_CXX_STD_14", "cxx_std_14", {languages = "c++14"})
+configvar_check_features("HAS_CXX_STD_17", "cxx_std_17", {languages = "c++17"})
+configvar_check_features("HAS_CXX_STD_20", "cxx_std_20", {languages = "c++20"})
+configvar_check_features("HAS_C_STD_89", "c_std_89")
+configvar_check_features("HAS_C_STD_99", "c_std_99")
+configvar_check_features("HAS_C_STD_11", "c_std_11", {languages = "c11"})
+configvar_check_features("HAS_C_STD_17", "c_std_17", {languages = "c17"})
+```
+
+#### New compiler built-in macro detection
+
+We can also detect the existence of some built-in macro definitions in the compiler, such as `__GNUC__`, etc. We can use the `check_macros` and `configvar_check_macros` auxiliary scripts to detect their existence.
+
+Related issues: [#1715](https://github.com/xmake-io/xmake/issues/1715)
+
+```lua
+- Check whether the macro is defined
+configvar_check_macros("HAS_GCC", "__GNUC__")
+- The detection macro is not defined
+configvar_check_macros("NO_GCC", "__GNUC__", {defined = false})
+- Detect macro conditions
+configvar_check_macros("HAS_CXX20", "__cplusplus >= 202002L", {languages = "c++20"})
+```
+
+### Added support for Qt 4.x
+
+In addition to Qt 5.x and 6.x, we have also added support for some old projects based on Qt 4.x.
+
+### Added support for Android NDK r23
+
+Due to some structural changes made by google to the Android NDK, r23 has affected the support of xmake for some compilation features of the android project. In this version, we have also made a repair.
+
+### Fix the Unicode encoding problem of the vsxmake plugin
+
+In addition, if Unicode is used as the project directory, the generated vsxmake project will be affected, causing many problems in the compilation and access of the vs project. We have also fixed it in the new version.
+
+## Changelog
+
+### New features
+
+* [#388](https://github.com/xmake-io/xmake/issues/388): Pascal Language Support
+* [#1682](https://github.com/xmake-io/xmake/issues/1682): Add optional lua5.3 backend instead of luajit to provide better compatibility
+* [#1622](https://github.com/xmake-io/xmake/issues/1622): Support Swig
+* [#1714](https://github.com/xmake-io/xmake/issues/1714): Support build local embed cmake projects
+* [#1715](https://github.com/xmake-io/xmake/issues/1715): Support to detect compiler language standards as features and add `check_macros`
+* Support Loongarch
+
+### Change
+
+* [#1618](https://github.com/xmake-io/xmake/issues/1618): Improve vala to support to generate libraries and bindings
+* Improve Qt rules to support Qt 4.x
+* Improve `set_symbols("debug")` to generate pdb file for clang on windows
+* [#1638](https://github.com/xmake-io/xmake/issues/1638): Improve to merge static library
+* Improve on_load/after_load to support to add target deps dynamically
+* [#1675](https://github.com/xmake-io/xmake/pull/1675): Rename dynamic and import library suffix for mingw
+* [#1694](https://github.com/xmake-io/xmake/issues/1694): Support to define a variable without quotes for configuration files
+* Support Android NDK r23
+* Add `c++latest` and `clatest` for `set_languages`
+* [#1720](https://github.com/xmake-io/xmake/issues/1720): Add `save_scope` and `restore_scope` to fix `check_xxx` apis
+* [#1726](https://github.com/xmake-io/xmake/issues/1726): Improve compile_commands generator to support nvcc
+
+### Bugs fixed
+
+* [#1671](https://github.com/xmake-io/xmake/issues/1671): Fix incorrect absolute path after installing precompiled packages
+* [#1689](https://github.com/xmake-io/xmake/issues/1689): Fix unicode chars bug for vsxmake

+ 798 - 0
docs/posts/xmake-update-v2.5.9.md

@@ -0,0 +1,798 @@
+---
+title: xmake v2.5.9 released, Improve C++20 Modules and support Nim, Keil MDK and Unity Build
+tags: [xmake, lua, C/C++, Nim, Keil, MDK, circle, Unity, Build, C++20, Modules, lua5.4]
+date: 2021-10-30
+author: Ruki
+---
+
+Unity Build', tags: [xmake, lua, C/C++, Nim, Keil, MDK, circle, Unity, Build,]
+---
+
+[xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started quickly in a short time, allowing users to focus more on actual project development.
+
+In this version, we have added a lot of heavyweight new features, such as: Nim language project build support, Keil MDK, Circle and Wasi toolchain support.
+
+In addition, we have made major improvements to C++20 Modules, not only supporting the latest gcc-11, clang and msvc compilers,
+but also automatic analysis of inter-module dependencies to achieve maximum parallel compilation support.
+
+Finally, there is a more useful feature that is Unity Build support, through which we can greatly improve the compilation speed of C++ code.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+## New feature introduction
+
+### Nimlang project construction
+
+Recently, we have added build support for the Nimlang project. For related issues, see: [#1756](https://github.com/xmake-io/xmake/issues/1756)
+
+#### Create an empty project
+
+We can use the `xmake create` command to create an empty project.
+
+```console
+xmake create -l nim -t console test
+xmake create -l nim -t static test
+xmake create -l nim -t shared test
+```
+
+#### Console Program
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("test")
+    set_kind("binary")
+    add_files("src/main.nim")
+```
+
+```console
+$ xmake -v
+[33%]: linking.release test
+/usr/local/bin/nim c --opt:speed --nimcache:build/.gens/test/macosx/x86_64/release/nimcache -o:b
+uild/macosx/x86_64/release/test src/main.nim
+[100%]: build ok!
+```
+
+
+
+
+
+
+#### Static library program
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("foo")
+    set_kind("static")
+    add_files("src/foo.nim")
+
+target("test")
+    set_kind("binary")
+    add_deps("foo")
+    add_files("src/main.nim")
+```
+
+```console
+$ xmake -v
+[33%]: linking.release libfoo.a
+/usr/local/bin/nim c --opt:speed --nimcache:build/.gens/foo/macosx/x86_64/release/nimcache --app
+:staticlib --noMain --passC:-DNimMain=NimMain_B6D5BD02 --passC:-DNimMainInner=NimMainInner_B6D5B
+D02 --passC:-DNimMainModule=NimMainModule_B6D5BD02 --passC:-DPreMain=PreMain_B6D5BD02 --passC:-D
+PreMainInner=PreMainInner_B6D5BD02 -o:build/macosx/x86_64/release/libfoo.a src/foo.nim
+[66%]: linking.release test
+/usr/local/bin/nim c --opt:speed --nimcache:build/.gens/test/macosx/x86_64/release/nimcache --pa
+ssL:-Lbuild/macosx/x86_64/release --passL:-lfoo -o:build/macosx/x86_64/release/test src/main.nim
+[100%]: build ok!
+```
+
+#### Dynamic library program
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("foo")
+    set_kind("shared")
+    add_files("src/foo.nim")
+
+target("test")
+    set_kind("binary")
+    add_deps("foo")
+    add_files("src/main.nim")
+```
+
+```console
+$ xmake -rv
+[33%]: linking.release libfoo.dylib
+/usr/local/bin/nim c --opt:speed --nimcache:build/.gens/foo/macosx/x86_64/release/nimcache --app
+:lib --noMain -o:build/macosx/x86_64/release/libfoo.dylib src/foo.nim
+[66%]: linking.release test
+/usr/local/bin/nim c --opt:speed --nimcache:build/.gens/test/macosx/x86_64/release/nimcache --pa
+ssL:-Lbuild/macosx/x86_64/release --passL:-lfoo -o:build/macosx/x86_64/release/test src/main.nim
+[100%]: build ok!
+```
+
+#### C code mixed compilation
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("foo")
+    set_kind("static")
+    add_files("src/*.c")
+
+target("test")
+    set_kind("binary")
+    add_deps("foo")
+    add_files("src/main.nim")
+```
+
+#### Nimble dependency package integration
+
+For a complete example, see: [Nimble Package Example](https://github.com/xmake-io/xmake/tree/dev/tests/projects/nim/nimble_package)
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+add_requires("nimble::zip >0.3")
+
+target("test")
+    set_kind("binary")
+    add_files("src/main.nim")
+    add_packages("nimble::zip")
+```
+
+main.nim
+
+```nim
+import zip/zlib
+
+echo zlibVersion()
+```
+
+#### Native dependency package integration
+
+For a complete example, see: [Native Package Example](https://github.com/xmake-io/xmake/tree/dev/tests/projects/nim/native_package)
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+add_requires("zlib")
+
+target("test")
+    set_kind("binary")
+    add_files("src/main.nim")
+    add_packages("zlib")
+```
+
+main.nim
+
+```nim
+proc zlibVersion(): cstring {.cdecl, importc}
+
+echo zlibVersion()
+```
+
+### Unity Build acceleration
+
+We know that C++ code compilation speed is usually very slow, because each code file needs to parse the imported header file.
+
+With Unity Build, we accelerate the compilation of the project by combining multiple cpp files into one. The main benefit is to reduce the repetitive work of parsing and compiling the contents of the header files contained in multiple source files. The contents of the header files are usually It accounts for most of the code in the source file after preprocessing.
+
+Unity build also reduces the overhead caused by having a large number of small source files by reducing the number of object files created and processed by the compilation chain, and allows inter-procedural analysis and optimization across files that form a unified build task (similar to optimization during effect linking ).
+
+It can greatly improve the compilation speed of C/C++ code, usually by 30%. However, depending on the complexity of the project, the benefits it brings depend on the situation of the project.
+
+xmake has also supported this build mode in v2.5.9. For related issues, see [#1019](https://github.com/xmake-io/xmake/issues/1019).
+
+#### How to enable?
+
+We provide two built-in rules to handle Unity Build for C and C++ code respectively.
+
+```lua
+add_rules("c.unity_build")
+add_rules("c++.unity_build")
+```
+
+#### Batch mode
+
+By default, as long as the above rules are set, Unity Build in Batch mode will be enabled, that is, xmake will automatically organize and merge according to the project code files.
+
+```lua
+target("test")
+    set_kind("binary")
+    add_includedirs("src")
+    add_rules("c++.unity_build", {batchsize = 2})
+    add_files("src/*.c", "src/*.cpp")
+```
+
+We can additionally specify the size of each merged Batch by setting the `{batchsize = 2}` parameter to the rule, which means that every two C++ files are automatically merged and compiled.
+
+The compilation effect is roughly as follows:
+
+```console
+$ xmake -r
+[11%]: ccache compiling.release build/.gens/test/unity_build/unity_642A245F.cpp
+[11%]: ccache compiling.release build/.gens/test/unity_build/unity_bar.cpp
+[11%]: ccache compiling.release build/.gens/test/unity_build/unity_73161A20.cpp
+[11%]: ccache compiling.release build/.gens/test/unity_build/unity_F905F036.cpp
+[11%]: ccache compiling.release build/.gens/test/unity_build/unity_foo.cpp
+[11%]: ccache compiling.release build/.gens/test/unity_build/main.c
+[77%]: linking.release test
+[100%]: build ok
+```
+
+Since we only enabled the Unity Build of C++, the C code is still compiled one by one normally. In addition, in the Unity Build mode, we can still speed up the parallel compilation as much as possible without conflicting each other.
+
+If the `batchsize` parameter is not set, all files will be merged into one file for compilation by default.
+
+#### Group Mode
+
+If the automatic merging effect of the above Batch mode is not satisfactory, we can also use custom grouping to manually configure which files are merged together to participate in the compilation, which makes users more flexible and controllable.
+
+```lua
+target("test")
+    set_kind("binary")
+    add_rules("c++.unity_build", {batchsize = 0}) - disable batch mode
+    add_files("src/*.c", "src/*.cpp")
+    add_files("src/foo/*.c", {unity_group = "foo"})
+    add_files("src/bar/*.c", {unity_group = "bar"})
+```
+
+We use `{unity_group = "foo"}` to specify the name of each group and which files are included. The files in each group will be merged into one code file separately.
+
+In addition, `batchsize = 0` also forcibly disables the Batch mode, that is, if there is no unity_group grouped code files, we will still compile them separately, and will not automatically turn on automatic merging.
+
+#### Batch and Group mixed mode
+
+As long as we change the above `batchsize = 0` to a value other than 0, we can let the remaining code files continue to open the Batch mode in the grouping mode to automatically merge and compile.
+
+```lua
+target("test")
+    set_kind("binary")
+    add_includedirs("src")
+    add_rules("c++.unity_build", {batchsize = 2})
+    add_files("src/*.c", "src/*.cpp")
+    add_files("src/foo/*.c", {unity_group = "foo"})
+    add_files("src/bar/*.c", {unity_group = "bar"})
+```
+
+#### Ignore the specified file
+
+If it is in Batch mode, because it is an automatic merge operation, all files will be merged by default, but if some code files do not want to participate in the merge, then we can also ignore them through `{unity_ignored = true}`.
+
+```lua
+target("test")
+    set_kind("binary")
+    add_includedirs("src")
+    add_rules("c++.unity_build", {batchsize = 2})
+    add_files("src/*.c", "src/*.cpp")
+    add_files("src/test/*.c", {unity_ignored = true}) - ignore these files
+```
+
+#### Unique ID
+
+Although the benefits of Unity Build are good, we still encounter some unexpected situations. For example, in our two code files, under the global namespace, there are global variables and functions with the same name.
+
+Then, merge compilation will bring about compilation conflicts, and the compiler usually reports global variable redefinition errors.
+
+In order to solve this problem, we need to make some modifications to the user code, and then cooperate with the build tool to solve it.
+
+For example, our foo.cpp and bar.cpp both have global variable i.
+
+foo.cpp
+
+```c
+namespace {
+    int i = 42;
+}
+
+int foo()
+{
+    return i;
+}
+```
+
+bar.cpp
+
+```c
+namespace {
+    int i = 42;
+}
+
+int bar()
+{
+    return i;
+}
+```
+
+Then, our merge compilation will conflict, and we can introduce a Unique ID to isolate the global anonymous space.
+
+
+foo.cpp
+
+```c
+namespace MY_UNITY_ID {
+    int i = 42;
+}
+
+int foo()
+{
+    return MY_UNITY_ID::i;
+}
+```
+
+bar.cpp
+
+```c
+namespace MY_UNITY_ID {
+    int i = 42;
+}
+
+int bar()
+{
+    return MY_UNITY_ID::i;
+}
+```
+
+Next, we also need to ensure that after the code is merged, the definitions of `MY_UNITY_ID` in foo and bar are completely different, and a unique ID value can be calculated according to the file name, which does not conflict with each other, which is to achieve the following merge effect:
+
+```c
+#define MY_UNITY_ID <hash(foo.cpp)>
+#include "foo.c"
+#undef MY_UNITY_ID
+#define MY_UNITY_ID <hash(bar.cpp)>
+#include "bar.c"
+#undef MY_UNITY_ID
+```
+
+This may seem troublesome, but the user does not need to care about these, xmake will automatically process them when merging, the user only needs to specify the name of the Unique ID, for example, the following:
+
+
+```lua
+target("test")
+    set_kind("binary")
+    add_includedirs("src")
+    add_rules("c++.unity_build", {batchsize = 2, uniqueid = "MY_UNITY_ID"})
+    add_files("src/*.c", "src/*.cpp")
+```
+
+Dealing with global variables, as well as global macro definitions with the same name, functions, etc., can be used in this way to avoid conflicts.
+
+### C++20 Modules
+
+xmake uses `.mpp` as the default module extension, but also supports `.ixx`, `.cppm`, `.mxx` and other extensions.
+
+In the early days, xmake experimentally supported C++ Modules TS, but at that time, gcc could not support it well, and the dependencies between modules were not supported either.
+
+Recently, we have made a lot of improvements to xmake. We have fully supported the C++20 Modules construction support of gcc-11/clang/msvc, and can automatically analyze the dependencies between modules to maximize parallel compilation.
+
+At the same time, the new version of clang/msvc has also been better handled.
+
+```lua
+set_languages("c++20")
+target("test")
+    set_kind("binary")
+    add_files("src/*.cpp", "src/*.mpp")
+```
+
+For more examples, see: [C++ Modules](https://github.com/xmake-io/xmake/tree/master/tests/projects/c%2B%2B/modules)
+
+### Lua5.4 runtime support
+
+In the last version, we added support for the Lua5.3 runtime. In this version, we further upgraded the Lua runtime to 5.4. Compared with 5.3, the runtime performance and memory utilization have been greatly improved.
+
+However, the current default runtime of xmake is still luajit, and it is expected that version 2.6.1 (that is, the next version) will officially switch to Lua5.4 as the default runtime.
+
+Although the Lua runtime is switched, it is completely unaware to the user side and fully compatible with the existing project configuration, because xmake originally provides a layer of encapsulation for the exposed api.
+The interfaces that have compatibility issues between Lua versions, such as setfenv, ffi, etc., are hidden internally and are not exposed to users.
+
+### Keil MDK tool chain support
+
+In this version, we also added Keil/MDK embedded compilation tool chain support, related example projects: [Example](https://github.com/xmake-io/xmake/tree/dev/tests/projects /mdk/hello)
+
+xmake will automatically detect the compiler installed by Keil/MDK, related issues [#1753](https://github.com/xmake-io/xmake/issues/1753).
+
+#### Compile with armcc
+
+```console
+$ xmake f -p cross -a cortex-m3 --toolchain=armcc -c
+$ xmake
+```
+
+#### Compile with armclang
+
+```console
+$ xmake f -p cross -a cortex-m3 --toolchain=armclang -c
+$ xmake
+```
+
+#### Console Program
+
+```lua
+target("hello")
+    add_deps("foo")
+    add_rules("mdk.console")
+    add_files("src/*.c", "src/*.s")
+    add_defines("__EVAL", "__MICROLIB")
+    add_includedirs("src/lib/cmsis")
+```
+
+#### Static library program
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("foo")
+    add_rules("mdk.static")
+    add_files("src/foo/*.c")
+```
+
+### Wasi toolchain support
+
+We previously supported the emcc tool chain of the wasm platform to build the wasm program, and here, we added another Wasm tool chain with WASI enabled to replace emcc.
+
+```console
+$ xmake f -p wasm --toolchain=wasi
+$ xmake
+```
+
+### Circle toolchain support
+
+We also added support for the circle compiler, which is a new C++20 compiler with some interesting compile-time meta-programming features. Those who are interested can check it out on the official website: https://www.circle -lang.org/
+
+```console
+$ xmake f --toolchain=circle
+$ xmake
+```
+
+### gcc-8/9/10/11 specific version support
+
+If the user additionally installs a specific version of the gcc tool chain such as gcc-11, gcc-10, the local gcc program may be named `/usr/bin/gcc-11`.
+
+One way is to switch by specifying the configuration one by one through `xmake f --cc=gcc-11 --cxx=gcc-11 --ld=g++-11`, but it is very cumbersome.
+
+Therefore, xmake also provides a faster switching method:
+
+```console
+$ xmake f --toolchain=gcc-11 -c
+$ xmake
+```
+
+You only need to specify the version name corresponding to `gcc-11` to quickly switch the entire gcc tool chain.
+
+### C++17/20 Compiler feature detection
+
+xmake provides the check_features auxiliary interface to detect compiler features.
+
+```lua
+includes("check_features.lua")
+
+target("test")
+    set_kind("binary")
+    add_files("*.c")
+    add_configfiles("config.h.in")
+    configvar_check_features("HAS_CONSTEXPR", "cxx_constexpr")
+    configvar_check_features("HAS_CONSEXPR_AND_STATIC_ASSERT", {"cxx_constexpr", "c_static_assert"}, {languages ​​= "c++11"})
+```
+
+config.h.in
+
+```c
+${define HAS_CONSTEXPR}
+${define HAS_CONSEXPR_AND_STATIC_ASSERT}
+```
+
+config.h
+
+```c
+/* #undef HAS_CONSTEXPR */
+#define HAS_CONSEXPR_AND_STATIC_ASSERT 1
+```
+
+In version 2.5.9, we added c++17 feature detection:
+
+| Feature name |
+| ------------------------------------ |
+| cxx_aggregate_bases |
+| cxx_aligned_new |
+| cxx_capture_star_this |
+| cxx_constexpr |
+| cxx_deduction_guides |
+| cxx_enumerator_attributes |
+| cxx_fold_expressions |
+| cxx_guaranteed_copy_elision |
+| cxx_hex_float |
+| cxx_if_constexpr |
+| cxx_inheriting_constructors |
+| cxx_inline_variables |
+| cxx_namespace_attributes |
+| cxx_noexcept_function_type |
+| cxx_nontype_template_args |
+| cxx_nontype_template_parameter_auto |
+| cxx_range_based_for |
+| cxx_static_assert |
+| cxx_structured_bindings |
+| cxx_template_template_args |
+| cxx_variadic_using |
+
+Also added c++20 feature detection:
+
+| Feature name |
+| ------------------------------------ |
+| cxx_aggregate_paren_init |
+| cxx_char8_t |
+| cxx_concepts |
+| cxx_conditional_explicit |
+| cxx_consteval |
+| cxx_constexpr |
+| cxx_constexpr_dynamic_alloc |
+| cxx_constexpr_in_decltype |
+| cxx_constinit |
+| cxx_deduction_guides |
+| cxx_designated_initializers |
+| cxx_generic_lambdas |
+| cxx_impl_coroutine |
+| cxx_impl_destroying_delete |
+| cxx_impl_three_way_comparison |
+| cxx_init_captures |
+| cxx_modules |
+| cxx_nontype_template_args |
+| cxx_using_enum |
+
+### Xrepo package virtual environment management
+
+#### Enter the virtual environment
+
+The xrepo package management tool that comes with xmake can now well support package virtual machine environment management, similar to nixos' nixpkgs.
+
+We can customize some package configurations by adding the xmake.lua file in the current directory, and then enter the specific package virtual environment.
+
+```lua
+add_requires("zlib 1.2.11")
+add_requires("python 3.x", "luajit")
+```
+
+```console
+$ xrepo env shell
+> python --version
+> luajit --version
+```
+
+We can also configure and load the corresponding toolchain environment in xmake.lua, for example, load the VS compilation environment.
+
+```lua
+set_toolchains("msvc")
+```
+
+#### Manage virtual environments
+
+We can use the following command to register the specified virtual environment configuration globally to the system for quick switching.
+
+```console
+$ xrepo env --add /tmp/base.lua
+```
+
+At this time, we have saved a global virtual environment called base, and we can view it through the list command.
+
+```console
+$ xrepo env --list
+/Users/ruki/.xmake/envs:
+  -base
+envs(1) found!
+```
+
+We can also delete it.
+
+```console
+$ xrepo env --remove base
+```
+
+#### Switch global virtual environment
+
+If we register multiple virtual environments, we can also switch them quickly.
+
+```console
+$ xrepo env -b base shell
+> python --version
+```
+
+Or directly load the specified virtual environment to run specific commands
+
+```console
+$ xrepo env -b base python --version
+```
+
+`xrepo env -b/--bind` is to bind the specified virtual environment. For more details, see: [#1762](https://github.com/xmake-io/xmake/issues/1762)
+
+### Header Only Target Type
+
+For the target, we added the `headeronly` target type. For this type of target program, we will not actually compile them because it has no source files to be compiled.
+
+But it contains a list of header files, which are usually used for the installation of headeronly library projects, the generation of file lists for IDE projects, and the generation of cmake/pkgconfig import files during the installation phase.
+
+E.g:
+
+```lua
+add_rules("mode.release", "mode.debug")
+
+target("foo")
+    set_kind("headeronly")
+    add_headerfiles("src/foo.h")
+    add_rules("utils.install.cmake_importfiles")
+    add_rules("utils.install.pkgconfig_importfiles")
+```
+
+For more details, please see: [#1747](https://github.com/xmake-io/xmake/issues/1747)
+
+### Find packages from CMake
+
+Now cmake is the de facto standard, so the find_package provided by CMake can already find a large number of libraries and modules. We fully reuse this part of cmake's ecology to expand xmake's integration of packages.
+
+We can use `find_package("cmake::xxx")` to find some packages with cmake, xmake will automatically generate a cmake script to call cmake's find_package to find some packages and get the bread information.
+
+E.g:
+
+```console
+$ xmake l find_package cmake::ZLIB
+{
+  links = {
+    "z"
+  },
+  includedirs = {
+    "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.
+15.sdk/usr/include"
+  },
+  linkdirs = {
+    "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.
+15.sdk/usr/lib"
+  }
+}
+$ xmake l find_package cmake::LibXml2
+{
+  links = {
+    "xml2"
+  },
+  includedirs = {
+    "/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/libxml2"
+  },
+  linkdirs = {
+    "/usr/lib"
+  }
+}
+```
+
+#### Specify version
+
+```lua
+find_package("cmake::OpenCV", {required_version = "4.1.1"})
+```
+
+#### Specified components
+
+```lua
+find_package("cmake::Boost", {components = {"regex", "system"}})
+```
+
+#### Default switch
+
+```lua
+find_package("cmake::Boost", {components = {"regex", "system"}, presets = {Boost_USE_STATIC_LIB = true}})
+set(Boost_USE_STATIC_LIB ON) - will be used in FindBoost.cmake
+find_package(Boost REQUIRED COMPONENTS regex system)
+```
+
+#### Set environment variables
+
+```lua
+find_package("cmake::OpenCV", {envs = {CMAKE_PREFIX_PATH = "xxx"}})
+```
+
+#### Specify custom FindFoo.cmake module script directory
+
+mydir/cmake_modules/FindFoo.cmake
+
+```lua
+find_package("cmake::Foo", {moduledirs = "mydir/cmake_modules"})
+```
+
+#### Package dependency integration
+
+```lua
+package("xxx")
+    on_fetch(function (package, opt)
+         return package:find_package("cmake::xxx", opt)
+    end)
+package_end()
+
+add_requires("xxx")
+```
+
+#### Package dependency integration (optional component)
+
+```lua
+package("boost")
+    add_configs("regex", {description = "Enable regex.", default = false, type = "boolean"})
+    on_fetch(function (package, opt)
+         opt.components = {}
+         if package:config("regex") then
+             table.insert(opt.components, "regex")
+         end
+         return package:find_package("cmake::Boost", opt)
+    end)
+package_end()
+
+add_requires("boost", {configs = {regex = true}})
+```
+
+Related issues: [#1632](https://github.com/xmake-io/xmake/issues/1632)
+
+### Add custom commands to CMakelists.txt
+
+We have further improved the cmake generator. Now you can serialize the custom script in rule into a list of commands and generate them together to CMakelists.txt
+
+However, currently only the serialization of batchcmds series scripts can be supported.
+
+```lua
+rule("foo")
+    after_buildcmd(function (target, batchcmds, opt)
+        batchcmds:show("hello xmake!")
+        batchcmds:cp("xmake.lua", "/tmp/")
+        - batchcmds:execv("echo", {"hello", "world!"})
+        - batchcmds:runv("echo", {"hello", "world!"})
+    end)
+
+target("test")
+    set_kind("binary")
+    add_rules("foo")
+    add_files("src/*.c")
+```
+
+It will generate CMakelists.txt similar to the following
+
+```
+# ...
+add_custom_command(TARGET test
+    POST_BUILD
+    COMMAND echo hello xmake!
+    VERBATIM
+)
+add_custom_command(TARGET test
+    POST_BUILD
+    COMMAND cp xmake.lua /tmp/
+    VERBATIM
+)
+target_sources(test PRIVATE
+    src/main.c
+)
+```
+
+However, the actual effect of cmake's `ADD_CUSTOM_COMMAND` PRE_BUILD differs greatly on different generators, which cannot meet our needs, so we have done a lot of processing to support it.
+
+Related issues: [#1735](https://github.com/xmake-io/xmake/issues/1735)
+
+## Changelog
+
+### New features
+
+* [#1736](https://github.com/xmake-io/xmake/issues/1736): Support wasi-sdk toolchain
+* Support Lua 5.4 runtime
+* Add gcc-8, gcc-9, gcc-10, gcc-11 toolchains
+* [#1623](https://github.com/xmake-io/xmake/issues/1632): Support find_package from cmake
+* [#1747](https://github.com/xmake-io/xmake/issues/1747): Add `set_kind("headeronly")` for target to install files for headeronly library
+* [#1019](https://github.com/xmake-io/xmake/issues/1019): Support Unity build
+* [#1438](https://github.com/xmake-io/xmake/issues/1438): Support code amalgamation, `xmake l cli.amalgamate`
+* [#1765](https://github.com/xmake-io/xmake/issues/1756): Support nim language
+* [#1762](https://github.com/xmake-io/xmake/issues/1762): Manage and switch the given package envs for `xrepo env`
+* [#1767](https://github.com/xmake-io/xmake/issues/1767): Support Circle compiler
+* [#1753](https://github.com/xmake-io/xmake/issues/1753): Support armcc/armclang toolchains for Keil/MDK
+* [#1774](https://github.com/xmake-io/xmake/issues/1774): Add table.contains api
+* [#1735](https://github.com/xmake-io/xmake/issues/1735): Add custom command in cmake generator
+
+### Changes
+
+* [#1528](https://github.com/xmake-io/xmake/issues/1528): Check c++17/20 features
+* [#1729](https://github.com/xmake-io/xmake/issues/1729): Improve C++20 modules for clang/gcc/msvc, support inter-module dependency compilation and parallel optimization
+* [#1779](https://github.com/xmake-io/xmake/issues/1779): Remove builtin `-Gd` for ml.exe/x86
+* [#1781](https://github.com/xmake-io/xmake/issues/1781): Improve get.sh installation script to support nixos

+ 306 - 0
docs/posts/xmake-update-v2.6.1.md

@@ -0,0 +1,306 @@
+---
+title: xmake v2.6.1 released, Switch to Lua5.4 runtime, Support Rust and C++ mixed compilation
+tags: [xmake, lua, C/C++, Rust, Lua5.4, C++20, Modules]
+date: 2021-12-03
+author: Ruki
+---
+
+compilation', tags: [xmake, lua, C/C++, Rust, Lua5.4, C++20, Modules], date: '2021-12-03',]
+---
+
+[xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build tool based on Lua. It uses xmake.lua to maintain project builds. Compared with makefile/CMakeLists.txt, the configuration syntax is more Concise and intuitive, it is very friendly to novices, and you can get started quickly in a short time, allowing users to focus more on actual project development.
+
+In this version, we have added a lot of heavyweight new features, such as: Nim language project build support, Keil MDK, Circle and Wasi toolchain support.
+
+In addition, we have made major improvements to C++20 Modules, not only supporting the latest gcc-11, clang and msvc compilers,
+but also automatic analysis of inter-module dependencies to achieve maximum parallel compilation support.
+
+Finally, there is a more useful feature that is Unity Build support, through which we can greatly improve the compilation speed of C++ code.
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+## New feature introduction
+
+### Switch to Lua5.4 runtime by default
+
+After several versions of iterative testing, we officially switched to the Lua5.4 runtime in version 2.6.1.
+
+However, this is completely unaware to users, and basically there is no compatibility problem, because xmake encapsulates most of the interfaces, which completely eliminates the compatibility problem between Lua versions.
+
+In terms of build performance, because the performance bottleneck of the build mainly comes from the compiler, the performance loss of Lua itself is completely negligible, and xmake rewrites all lua native io interfaces with c, and optimizes the time-consuming interfaces with c .
+
+Therefore, through comparative tests, whether it is using Lua or Luajit, the time-consuming to build the project is basically the same, and there is no significant difference.
+
+#### Why switch?
+
+Because Luajit basically does not support some new architectures, such as: riscv, lonngarch, and the author of luajit has basically not maintained it, some new architecture support and stability repair progress is in a stagnant state.
+
+In order to be able to better support more platforms and have obtained faster iterative maintenance, we choose to use Lua will bring many benefits.
+
+### Add Cargo package dependency
+
+In this version, we have added support for the Cargo package dependency manager, but it is currently mainly used in Rust projects.
+
+Example: https://github.com/xmake-io/xmake/tree/dev/tests/projects/rust/cargo_deps
+
+```lua
+add_rules("mode.release", "mode.debug")
+add_requires("cargo::base64 0.13.0")
+add_requires("cargo::flate2 1.0.17", {configs = {features = "zlib"}})
+
+target("test")
+    set_kind("binary")
+    add_files("src/main.rs")
+    add_packages("cargo::base64", "cargo::flate2")
+```
+
+### Rust and C++ mixed compilation
+
+#### Use cxxbridge to call rust in c++
+
+Example: [cxx_call_rust_library](https://github.com/xmake-io/xmake/tree/dev/tests/projects/rust/cxx_call_rust_library)
+
+
+
+
+
+
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+add_requires("cargo::cxx 1.0")
+
+target("foo")
+    set_kind("static")
+    add_files("src/foo.rs")
+    set_values("rust.cratetype", "staticlib")
+    add_packages("cargo::cxx")
+
+target("test")
+    set_kind("binary")
+    add_rules("rust.cxxbridge")
+    add_deps("foo")
+    add_files("src/main.cc")
+    add_files("src/bridge.rsx")
+```
+
+foo.rs
+
+```rust
+#[cxx::bridge]
+mod foo {
+    extern "Rust" {
+        fn add(a: i32, b: i32) -> i32;
+    }
+}
+
+pub fn add(a: i32, b: i32) -> i32 {
+    return a + b;
+}
+```
+
+We also need to add the bridge file bridge.rsx to the c++ project
+
+```rust
+#[cxx::bridge]
+mod foo {
+    extern "Rust" {
+        fn add(a: i32, b: i32) -> i32;
+    }
+}
+```
+
+main.cc
+
+```c++
+#include <stdio.h>
+#include "bridge.rs.h"
+
+int main(int argc, char** argv) {
+    printf("add(1, 2) == %d\n", add(1, 2));
+    return 0;
+}
+```
+
+#### Calling C++ in Rust
+
+Example: [rust_call_cxx_library](https://github.com/xmake-io/xmake/tree/dev/tests/projects/rust/rust_call_cxx_library)
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("foo")
+    set_kind("static")
+    add_files("src/foo.cc")
+
+target("test")
+    set_kind("binary")
+    add_deps("foo")
+    add_files("src/main.rs")
+```
+
+main.rs
+
+```rust
+extern "C" {
+fn add(a: i32, b: i32) -> i32;
+}
+
+fn main() {
+    unsafe {
+println!("add(1, 2) = {}", add(1, 2));
+    }
+}
+```
+
+foo.cc
+
+```c++
+extern "C" int add(int a, int b) {
+    return a + b;
+}
+```
+
+### Added glsl shader compilation rules
+
+We have added a new compilation rule of `utils.glsl2spv`, which can introduce glsl shader files such as `*.vert/*.frag` into the project, and then realize automatic compilation to generate `*.spv` files.
+
+In addition, we also support binary embedding spv file data in the form of C/C++ header file, which is convenient for program use.
+
+#### Compile and generate spv file
+
+xmake will automatically call glslangValidator or glslc to compile shaders to generate .spv files, and then output them to the specified `{outputdir = "build"}` directory.
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+add_requires("glslang", {configs = {binaryonly = true}})
+
+target("test")
+    set_kind("binary")
+    add_rules("utils.glsl2spv", {outputdir = "build"})
+    add_files("src/*.c")
+    add_files("src/*.vert", "src/*.frag")
+    add_packages("glslang")
+```
+
+Note that the `add_packages("glslang")` here is mainly used to import and bind the glslangValidator in the glslang package to ensure that xmake can always use it.
+
+Of course, if you have already installed it on your own system, you don’t need to bind this package additionally, but I still recommend adding it.
+
+#### Compile and generate c/c++ header files
+
+We can also use the bin2c module internally to generate the corresponding binary header file from the compiled spv file, which is convenient for direct import in user code. We only need to enable `{bin2c = true}`. :w
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+add_requires("glslang", {configs = {binaryonly = true}})
+
+target("test")
+    set_kind("binary")
+    add_rules("utils.glsl2spv", {bin2c = true})
+    add_files("src/*.c")
+    add_files("src/*.vert", "src/*.frag")
+    add_packages("glslang")
+```
+
+Then we can introduce in the code like this:
+
+```c
+static unsigned char g_test_vert_spv_data[] = {
+    #include "test.vert.spv.h"
+};
+
+static unsigned char g_test_frag_spv_data[] = {
+    #include "test.frag.spv.h"
+};
+```
+
+Similar to the usage of bin2c rules, see the complete example: [glsl2spv example](https://github.com/xmake-io/xmake/tree/master/tests/projects/other/glsl2spv)
+
+### Improve C++ Modules construction
+
+In the last version, we refactored the C++20 Modules build support, and in this version, we continue to improve it.
+
+For the msvc compiler, we have been able to import the std standard library module in the module. In addition, we have fixed the problem that the module import compilation fails when there are dependencies between multiple targets.
+
+### Improve MDK program build configuration
+
+In the last version, we added support for building MDK programs. It should be noted that when some mdk programs currently use the microlib library to run, it requires the compiler to add the `__MICROLIB` macro definition, and the linker to add `-- library_type=microlib` and other configurations.
+
+In this version, we can directly set to the microlib runtime library through `set_runtimes("microlib")`, and all relevant options can be set automatically.
+
+#### Console Program
+
+```lua
+target("hello")
+    add_deps("foo")
+    add_rules("mdk.console")
+    add_files("src/*.c", "src/*.s")
+    add_includedirs("src/lib/cmsis")
+    set_runtimes("microlib")
+```
+
+#### Static library program
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("foo")
+    add_rules("mdk.static")
+    add_files("src/foo/*.c")
+    set_runtimes("microlib")
+```
+
+### Improve OpenMP project configuration
+
+We have also improved the configuration of the openmp project, which is more simplified and unified. We no longer need to configure additional rules. The same effect can be achieved only through a common openmp package.
+
+```lua
+add_requires("openmp")
+target("loop")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    add_packages("openmp")
+```
+
+In the previous version, we need to configure this way, and by comparison, we can see that the new configuration is more concise.
+
+```lua
+add_requires("libomp", {optional = true})
+target("loop")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    add_rules("c++.openmp")
+     add_packages("libomp")
+```
+
+## Changelog
+
+### New features
+
+* [#1799](https://github.com/xmake-io/xmake/issues/1799): Support mixed rust & c++ target and cargo dependences
+* Add `utils.glsl2spv` rules to compile *.vert/*.frag shader files to spirv file and binary c header file
+
+### Changes
+
+* Switch to Lua5.4 runtime by default
+* [#1776](https://github.com/xmake-io/xmake/issues/1776): Improve system::find_package, support to find package from envs
+* [#1786](https://github.com/xmake-io/xmake/issues/1786): Improve apt:find_package, support to find alias package
+* [#1819](https://github.com/xmake-io/xmake/issues/1819): Add precompiled header to cmake generator
+* Improve C++20 module to support std libraries for msvc
+* [#1792](https://github.com/xmake-io/xmake/issues/1792): Add custom command in vs project generator
+* [#1835](https://github.com/xmake-io/xmake/issues/1835): Improve MDK program supports and add `set_runtimes("microlib")`
+* [#1858](https://github.com/xmake-io/xmake/issues/1858): Improve to build c++20 modules with libraries
+* Add $XMAKE_BINARY_REPO and $XMAKE_MAIN_REPO repositories envs
+* [#1865](https://github.com/xmake-io/xmake/issues/1865): Improve openmp projects
+* [#1845](https://github.com/xmake-io/xmake/issues/1845): Install pdb files for static library
+
+### Bugs Fixed
+
+* Fix semver to parse build string with zero prefix
+* [#50](https://github.com/libbpf/libbpf-bootstrap/issues/50): Fix rule and build bpf program errors
+* [#1610](https://github.com/xmake-io/xmake/issues/1610): Fix `xmake f --menu` not responding in vscode and support ConPTY terminal virtkeys

+ 364 - 0
docs/posts/xmake-update-v2.6.2.md

@@ -0,0 +1,364 @@
+---
+title: Xmake v2.6.2 released, Support building Linux kernel driver module
+tags: [xmake, lua, C/C++, Linux, Driver]
+date: 2021-12-17
+author: Ruki
+---
+
+[Xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build utility based on Lua.
+
+It is very lightweight and has no dependencies because it has a built-in Lua runtime.
+
+It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.
+
+We can use it to build project directly like Make/Ninja, or generate project files like CMake/Meson, and it also has a built-in package management system to help users solve the integrated use of C/C++ dependent libraries.
+
+```
+Xmake = Build backend + Project Generator + Package Manager
+```
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+<img src="https://tboox.org/static/img/xmake/xmake-cmake.jpeg" width="30%" />
+
+## New version changes
+
+There are two major new features in this version:
+
+1. Linux kernel driver module construction support
+2. Support for group building and batch running, which can be used to realize the function of `Run all tests`
+
+The rest are mainly scattered function improvements and bugs fixes. You can see the details of the update content at the end of the following. Some of the larger changes will be explained one by one below.
+
+## New feature introduction
+
+### Build Linux kernel driver module
+
+Xmake may be the first third-party build tool that provides built-in support for Linux kernel driver development.
+
+Although there are also instructions on how CMake configures and builds Linux drivers on the Internet, most of them use `add_custom_command` to customize various commands, and then execute `echo` to splice and generate Linux Makefile files by themselves.
+
+In other words, it is actually a build that relies on the Makefile of the Linux kernel source code to execute, so if you want to add some compilation configuration and macro definitions yourself, it will be very troublesome.
+
+With Xmake, we can provide more flexible configurability, simpler configuration files, and features such as one-click compilation, automatic dependency pull integration, automatic download and integration of Linux kernel source code, and cross-compilation of kernel drivers.
+
+#### Hello World
+
+We intuitively feel it through one of the simplest character drivers.
+
+First, we prepare a Hello World driver code, for example:
+
+```lua
+add_requires("linux-headers", {configs = {driver_modules = true}})
+
+target("hello")
+    add_rules("platform.linux.driver")
+    add_files("src/*.c")
+    add_packages("linux-headers")
+    set_license("GPL-2.0")
+```
+
+Its configuration is very simple. You only need to configure the linux-headers package that supports the module, and then apply the `platform.linux.driver` build rule.
+
+Then directly execute the xmake command, compile with one key, and generate the kernel driver module hello.ko.
+
+```console
+$ xmake
+[20%]: ccache compiling.release src/add.c
+[20%]: ccache compiling.release src/hello.c
+[60%]: linking.release build/linux/x86_64/release/hello.ko
+[100%]: build ok!
+```
+
+
+
+
+
+Is it simple? Maybe you would say that it is not much different from directly configuring with Makefile and then compiling with make.
+
+So the point is here. Xmake will automatically pull the kernel source code for the specified version for you. Make will not, and CMake will not. Users must install them by themselves through `sudo apt install linux-headers-generic`.
+
+But Xmake doesn't need it. In the one-click compilation above, I actually omitted part of the output, which is actually the case.
+
+```console
+$ xmake
+note: install or modify (m) these packages (pass -y to skip confirm)?
+in xmake-repo:
+  -> m4 1.4.19 [from:linux-headers,bison,flex,elfutils]
+  -> flex 2.6.4 [from:bc,linux-headers]
+  -> bison 3.8.2 [from:bc,linux-headers]
+  -> ed 1.17 [from:bc,linux-headers]
+  -> texinfo 6.7 [from:bc,linux-headers]
+  -> bc 1.07.1 [from:linux-headers]
+  -> pkg-config 0.29.2 [from:linux-headers]
+  -> openssl 1.1.1l [private, from:linux-headers]
+  -> elfutils 0.183 [private, from:linux-headers]
+  -> linux-headers 5.10.46 [driver_modules:y]
+please input: y (y/n/m)
+
+  => download https://github.com/xmake-mirror/ed/archive/refs/tags/1.17.tar.gz .. ok
+  => install ed 1.17 .. ok
+  => download https://ftp.gnu.org/gnu/m4/m4-1.4.19.tar.xz .. ok
+  => download https://ftp.gnu.org/gnu/texinfo/texinfo-6.7.tar.xz .. ok
+  => download https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz .. ok
+  => download https://github.com/openssl/openssl/archive/OpenSSL_1_1_1l.zip .. ok
+  => install m4 1.4.19 .. ok
+  => download https://github.com/westes/flex/releases/download/v2.6.4/flex-2.6.4.tar.gz .. ok
+  => install texinfo 6.7 .. ok
+  => install pkg-config 0.29.2 .. ok
+  => download http://ftp.gnu.org/gnu/bison/bison-3.8.2.tar.gz .. ok
+  => install flex 2.6.4 .. ok
+  => download https://sourceware.org/elfutils/ftp/0.183/elfutils-0.183.tar.bz2 .. ok
+  => install elfutils 0.183 .. ok
+  => install bison 3.8.2 .. ok
+  => download https://ftp.gnu.org/gnu/bc/bc-1.07.1.tar.gz .. ok
+  => install bc 1.07.1 .. ok
+  => install openssl 1.1.1l .. ok
+  => download https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.10.46.tar.xz .. ok
+  => install linux-headers 5.10.46 .. ok
+[16%]: ccache compiling.release src/add.c
+[16%]: ccache compiling.release src/hello.c
+[16%]: ccache compiling.release src/hello.mod.c
+[66%]: linking.release build/linux/x86_64/release/hello.ko
+[100%]: build ok!
+```
+
+When compiling for the first time, Xmake will pull all dependencies. If the user has installed them through third-party package management such as apt, Xmake will give priority to the version already installed on the system, saving the download and installation process.
+
+In other words, no matter what environment you are in, users don't need to care about how to build a kernel-driven development environment. They only need one `xmake` command to get everything done.
+
+And these dependency pulls are implemented through the `add_requires("linux-headers", {configs = {driver_modules = true}})` configuration package.
+
+In addition, we can also see the complete build command parameters.
+
+```console
+$ xmake -v
+[20%]: ccache compiling.release src/add.c
+/usr/bin/ccache /usr/bin/gcc -c -m64 -O2 -std=gnu89 -I/usr/src/linux-headers-5.11.0-41-generic/arch/x86/include -I/usr /src/linux-headers-5.11.0-41-generic/arch/x86/include/generated -I/usr/src/linux-headers-5.11.0-41-generic/include -I/usr/src/linux -headers-5.11.0-41-generic/arch/x86/include/uapi -I/usr/src/linux-headers-5.11.0-41-generic/arch/x86/include/generated/uapi -I/usr /src/linux-headers-5.11.0-41-generic/include/uapi -I/usr/src/linux-headers-5.11.0-41-generic/include/generated/uapi -D__KERNEL__ -DMODULE -DKBUILD_MODNAME=\ "hello\" -DCONFIG_X86_X32_ABI -isystem /usr/lib/gcc/x86_64-linux-gnu/10/include -include /usr/src/linux-headers-5.11.0-41-generic/include/linux/kconfig.h -include /usr/src/linux-headers-5.11.0-41-generic/include/linux/compiler_types.h -nostdinc -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno -80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -mindirect-branch=thunk-extern -mindirect -branch-re gister -mrecord-mcount -fmacro-prefix-map=./= -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -fcf-protection=none -falign-jumps=1 -falign-loops= 1 -fno-asynchronous-unwind-tables -fno-jump-tables -fno-delete-null-pointer-checks -fno-allow-store-data-races -fno-reorder-blocks -fno-ipa-cp-clone- fno-partial-inlining -fstack-protector-strong -fno-inline-functions-called-once -falign-functions=32 -fno-strict-overflow -fno-stack-check -fconserve-stack -DKBUILD_BASENAME=\"add\ "-o build/.objs/hello/linux/x86_64/release/src/add.c.o src/add.c
+[20%]: ccache compiling.release src/hello.c
+/usr/bin/ccache /usr/bin/gcc -c -m64 -O2 -std=gnu89 -I/usr/src/linux-headers-5.11.0-41-generic/arch/x86/include -I/usr /src/linux-headers-5.11.0-41-generic/arch/x86/include/generated -I/usr/src/linux-headers-5.11.0-41-generic/include -I/usr/src/linux -headers-5.11.0-41-generic/arch/x86/include/uapi -I/usr/src/linux-headers-5.11.0-41-generic/arch/x86/include/generated/uapi -I/usr /src/linux-headers-5.11.0-41-generic/include/uapi -I/usr/src/linux-headers-5.11.0-41-generic/include/generated/uapi -D__KERNEL__ -DMODULE -DKBUILD_MODNAME=\ "hello\" -DCONFIG_X86_X32_ABI -isystem /usr/lib/gcc/x86_64-linux-gnu/10/include -include /usr/src/linux-headers-5.11.0-41-generic/include/linux/kconfig.h -include /usr/src/linux-headers-5.11.0-41-generic/include/linux/compiler_types.h -nostdinc -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno -80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -mindirect-branch=thunk-extern -mindirect -branch-re gister -mrecord-mcount -fmacro-prefix-map=./= -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -fcf-protection=none -falign-jumps=1 -falign-loops= 1 -fno-asynchronous-unwind-tables -fno-jump-tables -fno-delete-null-pointer-checks -fno-allow-store-data-races -fno-reorder-blocks -fno-ipa-cp-clone- fno-partial-inlining -fstack-protector-strong -fno-inline-functions-called-once -falign-functions=32 -fno-strict-overflow -fno-stack-check -fconserve-stack -DKBUILD_BASENAME=\"hello\ "-o build/.objs/hello/linux/x86_64/release/src/hello.co src/hello.c
+[60%]: linking.release build/linux/x86_64/release/hello.ko
+/usr/bin/ld -m elf_x86_64 -r -o build/.objs/hello/linux/x86_64/release/build/linux/x86_64/release/hello.ko.o build/.objs/hello/linux/x86_64/ release/src/add.co build/.objs/hello/linux/x86_64/release/src/hello.co
+/usr/src/linux-headers-5.11.0-41-generic/scripts/mod/modpost -m -a -o build/.objs/hello/linux/x86_64/release/build/linux/x86_64/release/Module .symvers -e -N -T-
+WARNING: modpost: Symbol info of vmlinux is missing. Unresolved symbol check will be entirely skipped.
+/usr/bin/ccache /usr/bin/gcc -c -m64 -O2 -std=gnu89 -I/usr/src/linux-headers-5.11.0-41-generic/arch/x86/include -I/usr /src/linux-headers-5.11.0-41-generic/arch/x86/include/generated -I/usr/src/linux-headers-5.11.0-41-generic/include -I/usr/src/linux -headers-5.11.0-41-generic/arch/x86/include/uapi -I/usr/src/linux-headers-5.11.0-41-generic/arch/x86/include/generated/uapi -I/usr /src/linux-headers-5.11.0-41-generic/include/uapi -I/usr/src/linux-headers-5.11.0-41-generic/include/generated/uapi -D__KERNEL__ -DMODULE -DKBUILD_MODNAME=\ "hello\" -DCONFIG_X86_X32_ABI -isystem /usr/lib/gcc/x86_64-linux-gnu/10/include -include /usr/src/linux-headers-5.11.0-41-generic/include/linux/kconfig.h -include /usr/src/linux-headers-5.11.0-41-generic/include/linux/compiler_types.h -nostdinc -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno -80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -mindirect-branch=thunk-extern -mindirect -branch-re gister -mrecord-mcount -fmacro-prefix-map=./= -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -fcf-protection=none -falign-jumps=1 -falign-loops= 1 -fno-asynchronous-unwind-tables -fno-jump-tables -fno-delete-null-pointer-checks -fno-allow-store-data-races -fno-reorder-blocks -fno-ipa-cp-clone- fno-partial-inlining -fstack-protector-strong -fno-inline-functions-called-once -falign-functions=32 -fno-strict-overflow -fno-stack-check -fconserve-stack -o build/.objs/ hello/linux/x86_64/release/build/linux/x86_64/release/hello.ko.mod.o build/.objs/hello/linux/x86_64/release/build/linux/x86_64/release/hello.ko.mod. c
+/usr/bin/ld -m elf_x86_64 -r --build-id=sha1 -T /usr/src/linux-headers-5.11.0-41-generic/scripts/module.lds -o build/linux/x86_64/ release/hello.ko build/.objs/hello/linux/x86_64/release/build/linux/x86_64/release/hello.ko.o build/.objs/hello/linux/x86_64/release/build/linux/x86_64/ release/hello.ko.mod.o
+```
+
+#### Use a specific version of the kernel source code
+
+We can also specify version semantic rules and select the kernel source code we need as the build source.
+
+```lua
+add_requires("linux-headers 5.9.x", {configs = {driver_modules = true}})
+```
+
+#### Cross compilation
+
+We also support cross-compilation of kernel driver modules, such as using cross-compilation tool chain on Linux x86_64 to build Linux Arm/Arm64 driver modules.
+
+We only need to prepare our own cross-compilation tool chain, specify its root directory through `--sdk=`, then switch to the `-p cross` platform configuration, and finally specify the architecture arm/arm64 to be built.
+
+Similarly, we don't need to care about how to prepare linux-headers to support cross-compilation. Xmake's dependency package management will help you prepare everything and pull and build the kernel source code that supports the corresponding architecture.
+
+The cross toolchain used here can be downloaded from here: [Download toolchains](https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu/)
+
+For more, cross-compilation configuration documents, see: [Configure cross-compilation](https://xmake.io/#/guide/configuration#common-cross-compilation-configuration)
+
+Note: Currently only arm/arm64 cross-compilation architecture is supported, and more platform architectures will be supported in the future.
+
+##### Build Arm driver module
+
+```console
+$ xmake f -p cross -a arm --sdk=/mnt/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf -c
+$ xmake
+[20%]: ccache compiling.release src/add.c
+[20%]: ccache compiling.release src/hello.c
+[60%]: linking.release build/cross/arm/release/hello.ko
+[100%]: build ok!
+```
+
+##### Build Arm64 driver module
+
+```console
+$ xmake f -p cross -a arm64 --sdk=/mnt/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu -c
+$ xmake
+[20%]: ccache compiling.release src/add.c
+[20%]: ccache compiling.release src/hello.c
+[60%]: linking.release build/cross/arm64/release/hello.ko
+[100%]: build ok!
+```
+
+### Group batch build and run support
+
+In the early days, we have supported the setting of target grouping through `set_group` to realize the management and display of the source file grouping of the vs/vsxmake project under VS.
+
+However, this grouping is limited to this feature and is not used in other places. In the new version, we continue to improve and use the grouping feature to achieve designated construction of a batch of target programs and batch operation of a batch of target programs.
+
+What is this usually useful for, for example, it can be used to provide functions such as `Run all tests` and `Run all benchmarks`.
+
+#### Compile and specify a batch of target programs
+
+We can use `set_group()` to mark a given target as `test/benchmark/...` and use `set_default(false)` to disable to build it by default.
+
+In this way, Xmake will not build them by default, but we can specify to build a batch of target programs through the `xmake -g xxx` command.
+
+For example, we can use this feature to build all tests.
+
+```lua
+target("test1")
+    set_kind("binary")
+    set_default(false)
+    set_group("test")
+    add_files("src/*.cpp")
+
+target("test2")
+    set_kind("binary")
+    set_default(false)
+    set_group("test")
+    add_files("src/*.cpp")
+```
+
+```console
+$ xmake -g test
+$ xmake --group=test
+```
+
+#### Run a specified batch of target programs
+
+We can also specify to run all test programs with the `test` group by setting the group.
+
+This is usually very useful. Before that, if we want to implement the `Run all tests` function, we can only call `os.exec` by defining a `task("tests")` to execute the test targets one by one. The configuration is cumbersome. The requirements for users are relatively high.
+
+And now, we only need to mark the test target programs that need to be executed as `set_group("test")`, and then run them in batches.
+
+```console
+$ xmake run -g test
+$ xmake run --group=test
+```
+
+#### Support group pattern matching
+
+In addition, we can also support grouped pattern matching, which is very flexible:
+
+```
+$ xmake build -g test_*
+$ xmake run -g test/foo_*
+$ xmake build -g bench*
+$ xmake run -g bench*
+```
+
+For more information: [#1913](https://github.com/xmake-io/xmake/issues/1913)
+
+### Improve the search and integration of CMake package sources
+
+In the previous version, we provided `find_package("cmake::xxx")` to find packages inside cmake, but this method is still very cumbersome for users to integrate and use.
+
+Therefore, in the new version, we further improve it, through `add_requires` to achieve a unified and fast cmake package integration.
+
+```lua
+add_requires("cmake::ZLIB", {alias = "zlib", system = true})
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("zlib")
+```
+
+We specify `system = true` to tell xmake to force cmake to find the package from the system. If it cannot be found, the installation logic will not be followed, because cmake does not provide the installation function of package managers such as vcpkg/conan.
+Only the package search feature is provided.
+
+#### Specify version
+
+```lua
+add_requires("cmake::OpenCV 4.1.1", {system = true})
+```
+
+#### Specified components
+
+```lua
+add_requires("cmake::Boost", {system = true, configs = {components = {"regex", "system"}}))
+```
+
+#### Default switch
+
+```lua
+add_requires("cmake::Boost", {system = true, configs = {components = {"regex", "system"},
+                                             presets = {Boost_USE_STATIC_LIB = true}}})
+```
+
+It is equivalent to predefine some configurations in CMakeLists.txt before calling find_package internally to find the package to control the find_package search strategy and status.
+
+```
+set(Boost_USE_STATIC_LIB ON) - will be used in FindBoost.cmake
+find_package(Boost REQUIRED COMPONENTS regex system)
+```
+
+#### Set environment variables
+
+```lua
+add_requires("cmake::OpenCV", {system = true, configs = {envs = {CMAKE_PREFIX_PATH = "xxx"}}})
+```
+
+#### Specify custom FindFoo.cmake module script directory
+
+mydir/cmake_modules/FindFoo.cmake
+
+```lua
+add_requires("cmake::Foo", {system = true, configs = {moduledirs = "mydir/cmake_modules"}})
+```
+
+Related issues: [#1632](https://github.com/xmake-io/xmake/issues/1632)
+
+### xmake-idea plugin update
+
+[xmake-idea](https://github.com/xmake-io/xmake-idea) Due to personal time and energy, this plug-in has not spent time to maintain and update: and IDEA plug-ins have a lot of compatibility issues , As long as it is not used for a period of time, it cannot be used normally on the new Idea/Clion.
+
+Recently, I took some time to fix some compatibility issues, such as the problem of freezing when creating a project on Windows, and problems such as the inability to install the new version of Clion.
+
+At present, the latest version should be able to be used normally on all platforms.
+
+<img src="https://tboox.org/static/img/xmake/xmake-idea-output_panel.png" width="50%" />
+
+## Some other things worth mentioning
+
+### Year-end summary
+
+This is the last version I released in 2021. After a year, Xmake has gradually grown into a more powerful build tool.
+
+By the end of this year, Xmake had a total of 4.2k stars, processed 1.9k issues/pr, and had more than 8k multiple commits.
+
+<img src="https://tboox.org/static/img/xmake/xmake-star-history.png" width="50%" />
+
+The official package management repository [xmake-repo](https://github.com/xmake-io/xmake-repo) has also included nearly 500+ commonly used dependency packages.
+
+### Thanks
+
+Thank you contributors for your contributions to the xmake-repo repository and Xmake. For the complete list of contributors, see: [Contributors](https://github.com/xmake-io/xmake/graphs/contributors).
+
+Thank you very much for your support for Xmake's sponsorship, so that I can have enough motivation to maintain it. For the complete list of donations, please see: [Sponsors](https://xmake.io/#/about/sponsor).
+
+## Changelog
+
+### New features
+
+* [#1902](https://github.com/xmake-io/xmake/issues/1902): Support to build linux kernel driver modules
+* [#1913](https://github.com/xmake-io/xmake/issues/1913): Build and run targets with given group pattern
+
+### Change
+
+* [#1872](https://github.com/xmake-io/xmake/issues/1872): Escape characters for set_configvar
+* [#1888](https://github.com/xmake-io/xmake/issues/1888): Improve windows installer to avoid remove other files
+* [#1895](https://github.com/xmake-io/xmake/issues/1895): Improve `plugin.vsxmake.autoupdate` rule
+* [#1893](https://github.com/xmake-io/xmake/issues/1893): Improve to detect icc and ifort toolchains
+* [#1905](https://github.com/xmake-io/xmake/pull/1905): Add support of external headers without experimental for msvc
+* [#1904](https://github.com/xmake-io/xmake/pull/1904): Improve vs201x generator
+* Add `XMAKE_THEME` envirnoment variable to switch theme
+* [#1907](https://github.com/xmake-io/xmake/issues/1907): Add `-f/--force` to force to create project in a non-empty directory
+* [#1917](https://github.com/xmake-io/xmake/pull/1917): Improve to find_package and configurations
+
+### Bugs fixed
+
+* [#1885](https://github.com/xmake-io/xmake/issues/1885): Fix package:fetch_linkdeps
+* [#1903](https://github.com/xmake-io/xmake/issues/1903): Fix package link order
+

+ 248 - 0
docs/posts/xmake-update-v2.6.3.md

@@ -0,0 +1,248 @@
+---
+title: Xmake v2.6.3 released, Support Vcpkg manifest mode
+tags: [xmake, lua, C/C++, Vcpkg]
+date: 2022-01-22
+author: Ruki
+---
+
+[Xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build utility based on Lua.
+
+It is very lightweight and has no dependencies because it has a built-in Lua runtime.
+
+It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.
+
+We can use it to build project directly like Make/Ninja, or generate project files like CMake/Meson, and it also has a built-in package management system to help users solve the integrated use of C/C++ dependent libraries.
+
+```
+Xmake = Build backend + Project Generator + Package Manager
+```
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+## New version changes
+
+This version mainly adds the following features:
+
+1. Implement version selection of vcpkg package through vcpkg's manifest mode
+2. Python module build support
+3. Support integration of Xrepo/Xmake package management in CMakeLists.txt
+
+The rest are mainly some scattered functional improvements and Bugs fixes. You can see the details of the update at the end of the following. Some major changes will be explained one by one below.
+
+## Introduction of new features
+
+### Support Vcpkg manifest mode
+
+In the new version, Xmake adds vcpkg manifest mode support, through which we can support the version selection of vcpkg package, for example:
+
+```lua
+add_requires("vcpkg::zlib 1.2.11+10")
+add_requires("vcpkg::fmt >=8.0.1", {configs = {baseline = "50fd3d9957195575849a49fa591e645f1d8e7156"}})
+add_requires("vcpkg::libpng", {configs = {features = {"apng"}}})
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    add_packages("vcpkg::zlib", "vcpkg::fmt", "vcpkg::libpng")
+```
+
+However, the version selection of vcpkg is still quite limited. It must be hard-coded to specify the baseline, and version semantic selection such as `<=1.0`, `1.x` is not supported, but it is better than the previous version that cannot be selected.
+
+### Using Xrepo's package management in CMake
+
+CMake wrapper for [Xrepo](https://xrepo.xmake.io/) C and C++ package manager.
+
+This allows using CMake to build your project, while using Xrepo to manage
+dependent packages. This project is partially inspired by
+[cmake-conan](https://github.com/conan-io/cmake-conan).
+
+Example use cases for this project:
+
+- Existing CMake projects which want to use Xrepo to manage packages.
+- New projects which have to use CMake, but want to use Xrepo to manage
+  packages.
+
+#### Use package from official repository
+
+Xrepo official repository: [xmake-repo](https://github.com/xmake-io/xmake-repo)
+
+[xrepo.cmake](https://github.com/xmake-io/xrepo-cmake/blob/main/xrepo.cmake) provides `xrepo_package` function to manage packages.
+
+```cmake
+xrepo_package(
+    "foo 1.2.3"
+    [CONFIGS feature1=true,feature2=false]
+    [MODE debug|release]
+    [OUTPUT verbose|diagnosis|quiet]
+    [DIRECTORY_SCOPE]
+)
+```
+
+
+
+
+
+Some of the function arguments correspond directly to Xrepo command options.
+
+After calling `xrepo_package(foo)`, there are two ways to use `foo` package:
+
+- Call `find_package(foo)` if package provides cmake modules to find it
+  - Refer to CMake [`find_package`](https://cmake.org/cmake/help/latest/command/find_package.html) documentation for more details
+- If the package does not provide cmake modules, `foo_INCLUDE_DIR` and
+  `foo_LINK_DIR` variables will be set to the package include and library paths.
+  Use these variables to setup include and library paths in your CMake code.
+  - If `DIRECTORY_SCOPE` is specified, `xrepo_package` will run following code
+    (so that user only need to specify lib name in `target_link_libraries`)
+  ```cmake
+    include_directories(foo_INCLUDE_DIR)
+    link_directories(foo_LINK_DIR)
+  ```
+
+Here's an example `CMakeLists.txt` that uses `gflags` package version 2.2.2
+managed by Xrepo.
+
+```cmake
+cmake_minimum_required(VERSION 3.13.0)
+
+project(foo)
+
+# Download xrepo.cmake if not exists in build directory.
+if(NOT EXISTS "${CMAKE_BINARY_DIR}/xrepo.cmake")
+    message(STATUS "Downloading xrepo.cmake from https://github.com/xmake-io/xrepo-cmake/")
+    # mirror https://cdn.jsdelivr.net/gh/xmake-io/xrepo-cmake@main/xrepo.cmake
+    file(DOWNLOAD "https://raw.githubusercontent.com/xmake-io/xrepo-cmake/main/xrepo.cmake"
+                  "${CMAKE_BINARY_DIR}/xrepo.cmake"
+                  TLS_VERIFY ON)
+endif()
+
+# Include xrepo.cmake so we can use xrepo_package function.
+include(${CMAKE_BINARY_DIR}/xrepo.cmake)
+
+# Call `xrepo_package` function to use gflags 2.2.2 with specific configs.
+xrepo_package("gflags 2.2.2" CONFIGS "shared=true,mt=true")
+
+# `xrepo_package` sets `gflags_DIR` variable in parent scope because gflags
+# provides cmake modules. So we can now call `find_package` to find gflags
+# package.
+find_package(gflags CONFIG COMPONENTS shared)
+```
+
+#### Use package from 3rd repository
+
+In addition to installing packages from officially maintained repository,
+Xrepo can also install packages from third-party package managers such as vcpkg/conan/conda/pacman/homebrew/apt/dub/cargo.
+
+For the use of the command line, we can refer to the documentation: [Xrepo command usage](https://xrepo.xmake.io/#/getting_started#install-packages-from-third-party-package-manager)
+
+We can also use it directly in cmake to install packages from third-party repositories, just add the repository name as a namespace. e.g. `vcpkg::zlib`, `conan::pcre2`
+
+##### Conan
+
+```cmake
+xrepo_package("conan::gflags/2.2.2")
+```
+
+##### Conda
+
+```cmake
+xrepo_package("conda::gflags 2.2.2")
+```
+
+##### Vcpkg
+
+```cmake
+xrepo_package("vcpkg::gflags")
+```
+
+##### Homebrew
+
+```cmake
+xrepo_package("brew::gflags")
+```
+
+### Python module building support
+
+We can use this rule to generate python library modules with pybind11, which will adjust the module name of the python library.
+
+```lua
+add_rules("mode.release", "mode.debug")
+add_requires("pybind11")
+
+target("example")
+    add_rules("python.library")
+    add_files("src/*.cpp")
+    add_packages("pybind11")
+    set_languages("c++11")
+```
+
+with soabi:
+
+```lua
+add_rules("mode.release", "mode.debug")
+add_requires("pybind11")
+
+target("example")
+    add_rules("python.library", {soabi = true})
+    add_files("src/*.cpp")
+    add_packages("pybind11")
+    set_languages("c++11")
+```
+
+### Added delete header file list interface
+
+Through this interface, the specified file can be removed from the list of header files added by the `add_headerfiles` interface, for example:
+
+```lua
+target("test")
+    add_headerfiles("src/*.h")
+    remove_headerfiles("src/test.h")
+```
+
+In the above example, all header files except `test.h` can be added from the `src` directory, of course, this can also be achieved by `add_headerfiles("src/*.h|test.h")` to achieve the same purpose , but this way is more flexible.
+
+### Added on_config configuration script
+
+After `xmake config` is executed, this script is executed before Build, which is usually used for configuration work before compilation. It differs from on_load in that on_load is executed as soon as the target is loaded, and the execution timing is earlier.
+
+If some configuration cannot be configured prematurely in on_load, it can be configured in on_config.
+
+In addition, its execution time is earlier than before_build, and the approximate execution flow is as follows:
+
+```
+on_load -> after_load -> on_config -> before_build -> on_build -> after_build
+```
+
+### Built-in Github proxy mirror configuration
+
+Xmake provides some built-in mirror configurations that can be used directly, such as github's mirror acceleration:
+
+```console
+$ xmake g --proxy_pac=github_mirror.lua
+```
+
+We don't have to write pac.lua ourselves, we can use it directly to speed up the download of github sources.
+
+## Changelog
+
+### New features
+
+* [#1298](https://github.com/xmake-io/xmake/issues/1928): Support vcpkg manifest mode and select version for package/install
+* [#1896](https://github.com/xmake-io/xmake/issues/1896): Add `python.library` rule to build pybind modules
+* [#1939](https://github.com/xmake-io/xmake/issues/1939): Add `remove_files`, `remove_headerfiles` and mark `del_files` as deprecated
+* Made on_config as the official api for rule/target
+* Add riscv32/64 support
+* [#1970](https://github.com/xmake-io/xmake/issues/1970): Add CMake wrapper for Xrepo C and C++ package manager.
+* Add builtin github mirror pac files, `xmake g --proxy_pac=github_mirror.lua`
+
+### Changes
+
+* [#1923](https://github.com/xmake-io/xmake/issues/1923): Improve to build linux driver, support set custom linux-headers path
+* [#1962](https://github.com/xmake-io/xmake/issues/1962): Improve armclang toolchain to support to build asm
+* [#1959](https://github.com/xmake-io/xmake/pull/1959): Improve vstudio project generator
+* [#1969](https://github.com/xmake-io/xmake/issues/1969): Add default option description
+
+### Bugs fixed
+
+* [#1875](https://github.com/xmake-io/xmake/issues/1875): Fix deploy android qt apk issue
+* [#1973](https://github.com/xmake-io/xmake/issues/1973): Fix merge static archive

+ 272 - 0
docs/posts/xmake-update-v2.6.4.md

@@ -0,0 +1,272 @@
+---
+title: Xmake v2.6.4 released, Improve a lot of package management features
+tags: [xmake, lua, C/C++, Vcpkg]
+date: 2022-03-07
+author: Ruki
+---
+
+[Xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build utility based on Lua.
+
+It is very lightweight and has no dependencies because it has a built-in Lua runtime.
+
+It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.
+
+We can use it to build project directly like Make/Ninja, or generate project files like CMake/Meson, and it also has a built-in package management system to help users solve the integrated use of C/C++ dependent libraries.
+
+```
+Xmake = Build backend + Project Generator + Package Manager
+```
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+## Introduction of new features
+
+### More flexible package extensions
+
+Now, we can inherit all the configuration of an existing package through the `set_base` interface, and then rewrite part of the configuration on this basis.
+
+This is usually in the user's own project, it is more useful to modify the built-in package of the official repository of [xmake-repo](https://github.com/xmake-io/xmake-repo), such as: repairing and changing urls, modifying the version list, Install logic and more.
+
+For example, modify the url of the built-in zlib package to switch to your own zlib source address.
+
+```lua
+package("myzlib")
+    set_base("zlib")
+    set_urls("https://github.com/madler/zlib.git")
+package_end()
+
+add_requires("myzlib", {system = false, alias = "zlib"})
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_packages("zlib")
+```
+
+We can also use it to simply add an alias package.
+
+```lua
+package("onetbb")
+    set_base("tbb")
+```
+
+We can install the tbb package through `add_requires("onetbb")` integration, but the package name is different.
+
+### Package management supports toolchain switching
+
+Previously, we limited the toolchains that can only be installed under the cross platform to switch packages. In the new version, we can support the switchover of toolchains under more platforms.
+
+E.g:
+
+```bash
+$ xrepo install --toolchains=clang zlib
+```
+
+We can quickly switch to the clang toolchain to compile and install the zlib library on platforms such as linux.
+
+We can also switch them in the xmake.lua configuration file.
+
+```lua
+add_requires("zlib", {configs = {toolchains = "gcc-11"}})
+```
+
+The zlib packages installed by different tool chains will be stored in different directories without interfering with each other, and there will be no link compatibility problems caused by compiler differences.
+
+
+
+
+
+
+### Built-in package virtual environment
+
+The Xrepo command has already well supported package virtual environment management, `xrepo env shell`, but for complex package environments, users still need to configure an xmake.lua file to manage their own package environment.
+
+For example, we need a common development environment shell with common development toolchains such as cmake, python and vs/autoconf by default, and we need to create a configuration file devel.lua by ourselves.
+
+```lua
+add_requires("cmake")
+add_requires("python")
+if is_host("linux", "bsd", "macosx") then
+    add_requires("pkg-config", "autoconf", "automake", "libtool")
+elseif is_host("windows") then
+    set_toolchains("msvc")
+end
+```
+
+Then, execute the following command to import into the global configuration.
+
+```bash
+$ xrepo env --add devel.lua
+```
+
+In this way, we can load the shell and bind this environment with the following command:
+
+```bash
+$ xrepo env -b devel shell
+> cmake --version
+cmake version 3.19.3
+```
+
+In the new version, we have built in some commonly used environments, which can be viewed through `xrepo env -l`:
+
+```bash
+$ xrepo env -l
+  - msvc
+  - llvm-mingw
+  - llvm
+  - mingw-w64
+  -devel
+  - python3
+  - depot_tools
+  - python2
+```
+
+Among them, devel is also in it, so we only need to execute `xrepo env -b devel shell` to bring up a devel development environment without configuring them yourself.
+
+Such as python, msvc, etc. are also some of the more commonly used environments, which can be used directly.
+
+Of course, we also support temporarily creating an xmake.lua locally to configure the loading package environment instead of placing it in the global configuration.
+
+### Custom installation package download
+
+We can customize the download logic of the package through the new `on_download` interface, which is usually not used, and it is enough to use Xmake's built-in download.
+
+If the user builds a private repository and has a more complex authentication mechanism and special processing logic for the download of the package, the internal download logic can be rewritten to achieve this.
+
+```lua
+on_download(function (package, opt)
+    -- download packages:urls() to opt.sourcedir
+end)
+```
+
+In the opt parameter, you can get the destination source directory `opt.sourcedir` of the downloaded package. We only need to get the package address from `package:urls()` and download it.
+
+Then, add some custom processing logic as needed. In addition, you can add download cache processing and so on.
+
+### ASN.1 Program Build Support
+
+ASN.1 programs need to use [ASN.1 Compiler](https://github.com/vlm/asn1c) to generate relevant .c files to participate in project compilation.
+
+While Xmake provides built-in `add_rules("asn1c")` rules to process `.c` file generation, `add_requires("asn1c")` automatically pulls and integrates ASN.1 compiler tools.
+
+Here is a basic configuration example:
+
+```lua
+add_rules("mode.debug", "mode.release")
+add_requires("asn1c")
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.c")
+    add_files("src/*.asn1")
+    add_rules("asn1c")
+    add_packages("asn1c")
+```
+
+For details, see [Complete Example Project](https://github.com/xmake-io/xmake/tree/master/tests/projects/c/asn1c).
+
+### Support for building Swift programs on all platforms
+
+Previously, Xmake only supported the construction of Swift programs under macOS with the help of the Xcode toolchain. In the new version, we have also made improvements to allow the swift toolchain to be used independently, and to support the construction of swift programs on linux/windows. The usage is the same as before.
+
+### Supports export of specified symbol list
+
+In previous versions, we provided `utils.symbols.export_all` for automatic full symbol export of dll libraries for windows.
+
+Although this is very convenient, it can only support windows programs, and the full export does not control the size of the generated dll, and there may be many internal symbols that are not needed at all to be exported.
+
+However, the `utils.symbols.export_list` rule provided by our new version can directly define the list of exported symbols in xmake.lua, for example:
+
+```lua
+target("foo")
+    set_kind("shared")
+    add_files("src/foo.c")
+    add_rules("utils.symbols.export_list", {symbols = {
+        "add",
+        "sub"}})
+```
+
+Alternatively, add a list of exported symbols in the `*.export.txt` file.
+
+```lua
+target("foo2")
+    set_kind("shared")
+    add_files("src/foo.c")
+    add_files("src/foo.export.txt")
+    add_rules("utils.symbols.export_list")
+```
+
+For a complete project example, see: [Export Symbol Example](https://github.com/xmake-io/xmake/tree/dev/tests/projects/c/shared_library_export_list)
+
+By specifying symbol export, we can make the generated dynamic library as small as possible, and do not export irrelevant internal symbols at all. In addition, this rule supports linux, macOS and windows, which is more general.
+
+Internally it automatically uses .def, version scripts and `--exported_symbols_list` to handle symbol exports.
+
+### Built-in support for linker scripts
+
+In the new version, we also have built-in support for linker scripts and version scripts files, we can use `add_files` to add them directly without configuring `add_ldflags("-Txxx.lds")`.
+
+
+Currently `.ld` and `.lds` are supported as linker scripts configuration files to add:
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("test")
+    add_deps("foo")
+    set_kind("binary")
+    add_files("src/main.c")
+    add_files("src/main.lds")
+```
+
+We also support `.ver`, `.map` suffix files to be added as version script.
+
+```lua
+target("foo")
+    set_kind("shared")
+    add_files("src/foo.c")
+    add_files("src/foo.map")
+```
+
+The content of the foo.map file is as follows:
+
+```
+{
+    global:
+        foo;
+
+    local:
+        *;
+};
+```
+
+## Changelog
+
+### New features
+
+* [#2011](https://github.com/xmake-io/xmake/issues/2011): Support to inherit base package
+* Support to build and run xmake on sparc, alpha, powerpc, s390x and sh4
+* Add on_download for package()
+* [#2021](https://github.com/xmake-io/xmake/issues/2021): Support Swift for linux and windows
+* [#2024](https://github.com/xmake-io/xmake/issues/2024): Add asn1c support
+* [#2031](https://github.com/xmake-io/xmake/issues/2031): Support linker scripts and version scripts for add_files
+* [#2033](https://github.com/xmake-io/xmake/issues/2033): Catch ctrl-c to get current backtrace for debugging stuck
+* [#2059](https://github.com/xmake-io/xmake/pull/2059): Add `xmake update --integrate` to integrate for shell
+* [#2070](https://github.com/xmake-io/xmake/issues/2070): Add built-in xrepo environments
+* [#2117](https://github.com/xmake-io/xmake/pull/2117): Support to pass toolchains to package for other platforms
+* [#2121](https://github.com/xmake-io/xmake/issues/2121): Support to export the given symbols list
+
+### Changes
+
+* [#2036](https://github.com/xmake-io/xmake/issues/2036): Improve xrepo to install packages from configuration file, e.g. `xrepo install xxx.lua`
+* [#2039](https://github.com/xmake-io/xmake/issues/2039): Improve filter directory for vs generator
+* [#2025](https://github.com/xmake-io/xmake/issues/2025): Support phony and headeronly target for vs generator
+* Improve to find vstudio and codesign speed
+* [#2077](https://github.com/xmake-io/xmake/issues/2077): Improve vs project generator to support cuda
+
+### Bugs fixed
+
+* [#2005](https://github.com/xmake-io/xmake/issues/2005): Fix path.extension
+* [#2008](https://github.com/xmake-io/xmake/issues/2008): Fix windows manifest
+* [#2016](https://github.com/xmake-io/xmake/issues/2016): Fix object filename confict for vs project generator

+ 379 - 0
docs/posts/xmake-update-v2.6.5.md

@@ -0,0 +1,379 @@
+---
+title: Xmake v2.6.5 released, Support remote compilation
+tags: [xmake, lua, C/C++, cargo, rust, remote-compilation]
+date: 2022-04-24
+author: Ruki
+---
+
+[Xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build utility based on Lua.
+
+It is very lightweight and has no dependencies because it has a built-in Lua runtime.
+
+It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.
+
+We can use it to build project directly like Make/Ninja, or generate project files like CMake/Meson, and it also has a built-in package management system to help users solve the integrated use of C/C++ dependent libraries.
+
+```
+Xmake = Build backend + Project Generator + Package Manager
+```
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+## Introduction of new features
+
+### Remote Compilation Support
+
+The new version provides remote compilation support, which allows us to compile code on a remote server, run and debug remotely.
+
+The server can be deployed on Linux/MacOS/Windows to enable cross-platform compilation, e.g. compile and run Windows programs on Linux and macOS/Linux programs on Windows.
+
+It is more stable and smoother to use than ssh remote login compilation, no lagging of ssh terminal input due to network instability, and allows for quick local editing of code files.
+
+We can even seamlessly implement remote compilation in editors and IDEs such as vs/sublime/vscode/idea without relying on the IDE's own support for remote compilation.
+
+#### Start service
+
+```console
+$ xmake service
+<remote_build_server>: listening 0.0.0.0:9096 ...
+```
+
+We can also turn on the service while displaying back detailed log messages.
+
+```console
+$ xmake service -vD
+<remote_build_server>: listening 0.0.0.0:9096 ...
+```
+
+#### Start the service in Daemon mode
+
+```console
+$ xmake service --start
+$ xmake service --restart
+$ xmake service --stop
+```
+
+#### Configure the server
+
+We start by running the `xmake service` command, which automatically generates a default `service.conf` configuration file, stored in `~/.xmake/service.conf`.
+
+Then, we edit it to fix the server's listening port (optional).
+
+```lua
+{
+    logfile = "/Users/ruki/.xmake/service/logs.txt",
+    remote_build = {
+        server = {
+            listen = "0.0.0.0:9096"
+        }
+    }
+}
+```
+
+#### Configure the client
+
+We still edit this file `~/.xmake/service.conf` to configure the address of the server to which the client needs to connect.
+
+```lua
+{
+    logfile = "/Users/ruki/.xmake/service/logs.txt",
+    remote_build = {
+        client = {
+            connect = "192.168.56.101:9096",
+        }
+    }
+}
+```
+
+#### Import the given configuration file
+
+We can also import the given configuration file by using the following command.
+
+```console
+$ xmake service --config=/tmp/service.conf
+```
+
+#### Connect to the remote server
+
+Next, we just need to go into the root directory of the project we need to compile remotely and execute the ``xmake service --connect`` command to make the connection.
+
+```console
+$ xmake create test
+$ cd test
+$ xmake service --connect 
+<remote_build_client>: connect 192.168.56.110:9096 ...
+<remote_build_client>: connected!
+<remote_build_client>: sync files in 192.168.56.110:9096 ...
+Scanning files ...
+Comparing 3 files ...
+    [+]: src/main.cpp
+    [+]: .gitignore
+    [+]: xmake.lua
+3 files has been changed!
+Archiving files .
+Uploading files with 1372 bytes ...
+<remote_build_client>: sync files ok!
+```
+
+#### Remote build project
+
+Once the connection is successful, we can build remotely as if we were building locally as normal.
+
+```console
+$ xmake
+<remote_build_client>: run xmake in 192.168.56.110:9096 ...
+checking for platform ... macosx
+checking for architecture ... ... x86_64
+... checking for Xcode directory ... /Applications/Xcode.app
+checking for Codesign Identity of Xcode ... Apple Development: [email protected] (T3NA4MRVPU)
+... checking for SDK version of Xcode for macosx (x86_64) ... 11.3
+... checking for Minimal target version of Xcode for macosx (x86_64) ... 11.4
+[ 25%]: ccache compiling.release src/main.cpp
+[ 50%]: linking.release test
+[ 100%]: build ok!
+<remote_build_client>: run command ok!
+```''
+
+
+
+
+
+
+
+
+#### Running the target program remotely
+
+We can also run a debug-compiled target program remotely, just as we can run a debug locally.
+
+```console
+$ xmake run
+<remote_build_client>: run xmake run in 192.168.56.110:9096 ...
+hello world!
+<remote_build_client>: run command ok!
+````
+
+#### Rebuild project remotely
+
+```console
+$ xmake -rv
+<remote_build_client>: run xmake -rv in 192.168.56.110:9096 ...
+[ 25% ]: ccache compiling.release src/main.cpp
+/usr/local/bin/ccache /usr/bin/xcrun -sdk macosx clang -c -Qunused-arguments -arch x86_64 -mmacosx-version-min=11.4 -isysroot /Applications/ Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -o build/.objs/test/macosx/x86_64/release/src/main.cpp.o src/main.cpp
+[ 50%]: linking.release test
+"/usr/bin/xcrun -sdk macosx clang++" -o build/macosx/x86_64/release/test build/.objs/test/macosx/x86_64/release/src/main.cpp.o -arch x86_ 64 -mmacosx-version-min=11.4 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3 .sdk -stdlib=libc++ -Wl,-x -lz
+[100%]: build ok!
+<remote_build_client>: run command ok!
+```''
+
+#### Remote configuration of build parameters
+
+```console
+$ xmake f --xxx --yy
+```
+
+#### Manually synchronise project files
+
+When you connect, the code is automatically synchronised once, and you can execute this command to manually synchronise the changed files if the code changes later.
+
+```console
+$ xmake service --sync
+<remote_build_client>: sync files in 192.168.56.110:9096 ...
+Scanning files ...
+Comparing 3 files ...
+    [+]: src/main.cpp
+    [+]: .gitignore
+    [+]: xmake.lua
+3 files has been changed!
+Archiving files .
+Uploading files with 1372 bytes ...
+<remote_build_client>: sync files ok!
+```
+
+#### Disconnect from a remote
+
+This only affects the current project, other projects can still connect and build at the same time.
+
+```console
+$ xmake service --disconnect
+<remote_build_client>: disconnect 192.168.56.110:9096 ...
+<remote_build_client>: disconnected!
+```
+
+#### View server logs
+
+```console
+$ xmake service --logs
+```
+
+#### Clear the remote service cache and build files
+
+We can also manually clean up any cache and build generated files for the remote.
+
+```console
+$ cd projectdir
+$ xmake service --clean
+```
+
+### Improve Cargo package dependencies
+
+In previous versions we have been able to integrate each cargo package individually via ``add_requires("cargo::base64")` for compiling rust projects, and for mixed compilation with C/C++, e.g.
+
+```lua
+add_rules("mode.release", "mode.debug")
+add_requires("cargo::base64 0.13.0")
+add_requires("cargo::flate2 1.0.17", {configs = {features = "zlib"}})
+
+target("test")
+    set_kind("binary")
+    add_files("src/main.rs")
+    add_packages("cargo::base64", "cargo::flate2")
+```
+
+
+But there is a problem with the above approach.
+
+If there are many dependencies and several dependencies all share a dependency on the same child dependency, then there will be a redefinition problem, so if we use the full Cargo.toml to manage the dependencies we won't have this problem.
+
+For example
+
+```lua
+add_rules("mode.release", "mode.debug")
+add_requires("cargo::test", {configs = {cargo_toml = path.join(os.projectdir(), "Cargo.toml")}})
+
+target("test")
+    set_kind("binary")
+    add_files("src/main.rs")
+    add_packages("cargo::test")
+```
+
+We can then integrate all the required dependencies in Cargo.toml, leaving Rust to analyse the dependencies itself and avoid duplicate child dependency conflicts.
+
+For a full example see: [cargo_deps_with_toml](https://github.com/xmake-io/xmake/blob/dev/tests/projects/rust/cargo_deps_with_toml/xmake.lua)
+
+Of course, if the user has a single dependency, then the previous integration approach is still perfectly usable.
+
+#### Why use Xmake to compile Rust?
+
+At this point, one might ask why we need to configure xmake.lua when we are already using Cargo.toml and Cargo, and why not just compile Cargo?
+
+If we are developing a C/C++ project in Xmake, but need to introduce some Rust submodules for use in the C/C++ project, this is a quick and easy way to call Rust libraries and code in C/C++.
+
+For more instructions on calling Rust code libraries in C/C++, see: [Calling Rust in C/C++ using cxxbridge](/zh/guide/project_examples#%e4%bd%bf%e7%94%a8- cxxbridge-%e5%9c%a8-c-%e4%b8%ad%e8%b0%83%e7%94%a8-rust)
+
+### Support for source file grouping
+
+In this new version, we provide a new interface `add_filegroups` for grouping source files for presentation of project files generated by the vs/vsxmake/cmakelists generator.
+
+If you don't set up grouping, Xmake will also display them in a tree-like pattern by default, but there are some extreme cases where the directory hierarchy doesn't display very well, e.g.
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("... /... /... /... /src/**.cpp")
+```
+
+![](/assets/img/manual/filegroup1.png)
+
+Two main presentation modes are currently supported.
+
+- plain: flat mode
+- tree: tree display, this is also the default mode
+
+It also supports the grouping of files added by `add_headerfiles`.
+
+#### Set the file group and specifies the root directory
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files(". /... /... /... /src/**.cpp")
+    add_filegroups("group1/group2", {rootdir = "... /... /... /... /"})
+```
+
+![](/assets/img/manual/filegroup2.png)
+
+#### Set the file group and specifies the file matching pattern
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files("... /... /... /... /src/**.cpp")
+    add_filegroups("group1/group2", {rootdir = "... /... /... /... /", files = {"src/**.cpp"}})
+```
+
+#### Show files as flat mode
+
+In this mode, all source files ignore the nested directory hierarchy and are displayed at the same level under the grouping.
+
+```lua
+target("test")
+    set_kind("binary")
+    add_files(". /... /... /... /src/**.cpp")
+    add_filegroups("group1/group2", {rootdir = "... /... /... /... /", mode = "plain"})
+```
+
+![](/assets/img/manual/filegroup3.png)
+
+### Package versioning support for Git Commit
+
+Xmake's package dependency management interface ``add_requires`` supports versioning semantics, branch selection, e.g.
+
+```lua
+add_requires("tbox 1.6.1")
+add_requires("tbox >= 1.6.1")
+add_requires("tbox master")
+```
+
+However, in previous versions, we didn't support selecting versions from Git Commit, and now we do.
+
+```lua
+add_requires("tbox e807230557aac69e4d583c75626e3a7ebdb922f8")
+```
+
+As long as, this package is configured with a Git url, you can select the version from Commit.
+
+### Better support for iOS simulator compilation
+
+If you want to compile a target application for the iOS platform, you can previously use the following configuration to compile the real and emulator versions of the application separately, simply by switching arch.
+
+```bash
+$ xmake f -p iphoneos [-a armv7|armv7s|arm64|i386|x86_64]
+$ xmake
+```
+
+However, since the emulator on M1 devices also supports the arm64 architecture, it was no longer possible to distinguish an emulator from an arch.
+Therefore, in this new version, we have added a new parameter to distinguish between emulator and emulator targets.
+
+```bash
+$ xmake f -p iphoneos --appledev=simulator
+$ xmake f -p watchos --appledev=simulator
+$ xmake f -p appletvos --appledev=simulator
+```
+
+And if you don't specify the `--appledev=` argument, the default is to compile the real program, but of course the previous modes are fully compatible.
+
+## Changelog
+
+### New features
+
+* [#2138](https://github.com/xmake-io/xmake/issues/2138): Support template package
+* [#2185](https://github.com/xmake-io/xmake/issues/2185): Add `--appledev=simulator` to improve apple simulator support
+* [#2227](https://github.com/xmake-io/xmake/issues/2227): Improve cargo package with Cargo.toml file
+* Improve `add_requires` to support git commit as version
+* [#622](https://github.com/xmake-io/xmake/issues/622): Support remote compilation
+* [#2282](https://github.com/xmake-io/xmake/issues/2282): Add `add_filegroups` to support file group for vs/vsxmake/cmake generator
+
+### Changes
+
+* [#2137](https://github.com/xmake-io/xmake/pull/2137): Improve path module
+* Reduce 50% xmake binary size on macOS
+* Improve tools/autoconf,cmake to support toolchain switching.
+* [#2221](https://github.com/xmake-io/xmake/pull/2221): Improve registry api to support unicode
+* [#2225](https://github.com/xmake-io/xmake/issues/2225): Support to parse import dependencies for protobuf
+* [#2265](https://github.com/xmake-io/xmake/issues/2265): Sort CMakeLists.txt
+* Speed up `os.files`
+
+### Bugs fixed
+
+* [#2233](https://github.com/xmake-io/xmake/issues/2233): Fix c++ modules deps

+ 754 - 0
docs/posts/xmake-update-v2.6.6.md

@@ -0,0 +1,754 @@
+---
+title: Xmake v2.6.6 Released, Support Distributed Compilation and Build Cache
+tags: [xmake, lua, C/C++, remote, ccache, distributed-compilation]
+date: 2022-05-24
+author: Ruki
+---
+
+tags: [xmake, lua, C/C++, remote, ccache, distributed-compilation], date: '2022-05-24',]
+---
+
+[Xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build utility based on Lua.
+
+It is very lightweight and has no dependencies because it has a built-in Lua runtime.
+
+It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.
+
+We can use it to build project directly like Make/Ninja, or generate project files like CMake/Meson, and it also has a built-in package management system to help users solve the integrated use of C/C++ dependent libraries.
+
+```
+Xmake = Build backend + Project Generator + Package Manager + [Remote|Distributed] Build + Cache
+```
+
+Although not very precise, we can still understand Xmake in the following way:
+
+```
+Xmake ~= Make/Ninja + CMake/Meson + Vcpkg/Conan + distcc + ccache/sccache
+```
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+## Introduction of new features
+
+In this version, we have added a lot of heavyweight new features:
+
+- Distributed compilation
+- Local compilation cache
+- Remote compilation cache
+
+With these features, we can compile large C/C++ projects faster.
+
+In addition, they are completely cross-platform, support not only gcc/clang but also msvc,
+and there is no any third-party dependency except the compiler, which is very convenient to use.
+
+Therefore, using Xmake is equivalent to using `distcc/ccache/sccache` at the same time.
+
+Compared with these third-party tools, Xmake fully supports Windows and msvc,
+which eliminates platform differences, independent process calls, and the overhead of additional daemon processes.
+
+In addition to these features, the new version of Xmake also adds support for compiling Keil/C51 projects,
+as well as support for the nvc/nvc++/nvfortran compilers in the nvidia-hpc-sdk toolchain.
+
+### Support user authentication for remote compilation
+
+In the last version, we initially supported remote compilation, but did not provide user authentication support,
+which would bring some security issues. Therefore, in this version, we added user authentication support.
+
+At present, Xmake mainly provides the following authentication mechanisms. In addition, it is also effective for distributed compilation and remote caching.
+
+1. Token authentication
+2. Password authentication
+3. Trusted host verification
+
+#### Token authentication
+
+This is also the default recommended method, which is more secure, more convenient to configure and connect,
+and does not need to enter a password every time you connect.
+
+When we execute the `xmake service` command, a server and client configuration file will be generated by default,
+and a default token will be automatically generated, so the local direct connection does not require any configuration.
+
+
+
+
+
+
+
+
+
+##### Server authentication configuration
+
+The server can configure multiple tokens for authorizing connections to different user hosts.
+
+Of course, we can also share single token.
+
+```bash
+$ cat ~/.xmake/service/server.conf
+{
+    known_hosts = { },
+    logfile = "/Users/ruki/.xmake/service/server/logs.txt",
+    remote_build = {
+        listen = "0.0.0.0:9691",
+        workdir = "/Users/ruki/.xmake/service/server/remote_build"
+    },
+    tokens = {
+        "e438d816c95958667747c318f1532c0f"
+    }
+}
+```
+
+##### Client authentication configuration
+
+The client only needs to add the token on the server to the corresponding client configuration.
+
+```bash
+$ cat ~/.xmake/service/client.conf
+{
+    remote_build = {
+        connect = "127.0.0.1:9691",
+        token = "e438d816c95958667747c318f1532c0f"
+    }
+}
+```
+
+##### Manually generate new token
+
+We can also execute the following command to manually generate a new token and add it to the server configuration ourselves.
+
+```bash
+$ xmake service --gen-token
+New token a7b9fc2d3bfca1472aabc38bb5f5d612 is generated!
+```
+
+#### Password authentication
+
+We also provide password authentication. Compared with token authentication,
+it requires users to enter a password every time they connect, and can only be connected after the verification is passed.
+
+##### Server authentication configuration
+
+For password authentication, we do not need to manually configure the token, just execute the following command to add a user.
+During the adding process, the user will be prompted to enter a password.
+
+```bash
+$ xmake service --add-user=ruki
+Please input user ruki password:
+123456
+Add user ruki ok!
+```
+
+Then, xmake will generate a new token from the username and password and add it to the token list of the server configuration.
+
+```bash
+$ cat ~/.xmake/service/server.conf
+{
+    known_hosts = { },
+    logfile = "/Users/ruki/.xmake/service/server/logs.txt",
+    remote_build = {
+        listen = "0.0.0.0:9691",
+        workdir = "/Users/ruki/.xmake/service/server/remote_build"
+    },
+    tokens = {
+        "e438d816c95958667747c318f1532c0f",
+        "7889e25402413e93fd37395a636bf942"
+    }
+}
+```
+
+Of course, we can also delete the specified user and password.
+
+```bash
+$xmake service --rm-user=ruki
+Please input user ruki password:
+123456
+Remove user ruki ok!
+```
+
+##### Client authentication configuration
+
+For the client, we no longer need to set the token of the server.
+We only need to add the user name that needs to be connected in the connection configuration to enable password authentication.
+
+The format is: `user@address:port`
+
+```bash
+$ cat ~/.xmake/service/client.conf
+{
+    remote_build = {
+        connect = "[email protected]:9691"
+  }
+}
+```
+
+If the username is removed and the token is not configured, it is anonymous mode.
+If the server is not configured with a token, the authentication is completely disabled and the connection is made directly.
+
+#### Trusted host verification
+
+In addition, in order to further improve security, we also provide server-side trusted host verification.
+
+If the server-configured known_hosts list is configured with the ip address of the client host that can be connected.
+
+Then only these hosts can successfully connect to this server, and other hosts' connections to it will be prompted to be untrusted and refuse the connection,
+even if token and password authentication are OK.
+
+```bash
+$ cat ~/.xmake/service/server.conf
+{
+    logfile = "/Users/ruki/.xmake/service/logs.txt",
+    server = {
+        tokens = {
+            "4b928c7563a0cba10ff4c3f5ca0c8e24"
+        },
+        known_hosts = { "127.0.0.1", "xx.xx.xx.xx"}
+    }
+}
+```
+
+#### Connect to remote server
+
+Next, we only need to enter the root directory of the project that needs to be compiled remotely,
+and execute the `xmake service --connect` command to connect.
+
+If it is the token authentication mode, then no additional password input is required, and the connection is directly connected.
+
+```console
+$ xmake create test
+$ cd test
+$ xmake service --connect
+<remote_build_client>: connect 192.168.56.110:9091 ..
+<remote_build_client>: connected!
+<remote_build_client>: sync files in 192.168.56.110:9091 ..
+Scanning files ..
+Comparing 3 files ..
+    [+]: src/main.cpp
+    [+]: .gitignore
+    [+]: xmake.lua
+3 files has been changed!
+Archiving files ..
+Uploading files with 1372 bytes ..
+<remote_build_client>: sync files ok!
+```
+
+If it is password authentication, the user will be prompted to enter the password to continue the connection.
+
+```bash
+$ xmake service --connect
+Please input user root password:
+000000
+<remote_build_client>: connect 127.0.0.1:9691 ..
+<remote_build_client>: connected!
+<remote_build_client>: sync files in 127.0.0.1:9691 ..
+Scanning files ..
+Comparing 3 files ..
+    [+]: xmake.lua
+    [+]: .gitignore
+    [+]: src/main.cpp
+3 files has been changed!
+Archiving files ..
+Uploading files with 1591 bytes ..
+<remote_build_client>: sync files ok!
+```
+
+If the password is incorrect, an error message will be displayed.
+
+```bash
+$ xmake service --connect
+Please input user root password:
+123
+<remote_build_client>: connect 127.0.0.1:9691 ..
+<remote_build_client>: connect 127.0.0.1:9691 failed, user and password are incorrect!
+```
+
+### Distributed compilation support
+
+Xmake provides a built-in distributed compilation service,
+usually it can cooperate with local compilation cache and remote compilation cache to achieve optimal compilation acceleration.
+
+Also, it is fully cross-platform supported, we not only support gcc/clang, but also Windows and msvc well.
+
+For cross-compilation, as long as the cross-toolchain supports, we do not require the system environment of the server.
+Even if the server resources of linux, macOS and Windows are mixed, distributed compilation can be well realized.
+
+#### Start service
+
+We can specify the `--distcc` parameter to enable the distributed compilation service.
+Of course, if this parameter is not specified, xmake will enable all server-configured services by default.
+
+```console
+$ xmake service --distcc
+<distcc_build_server>: listening 0.0.0.0:9093 ..
+```
+
+We can also start the service and echo detailed log information.
+
+```console
+$ xmake service --distcc -vD
+<distcc_build_server>: listening 0.0.0.0:9093 ..
+```
+
+#### Start the service in daemon mode
+
+```console
+$ xmake service --distcc --start
+$ xmake service --distcc --restart
+$ xmake service --distcc --stop
+```
+
+#### Configure the server
+
+We first, run the `xmake service` command, it will automatically generate a default `server.conf` configuration file,
+stored in `~/.xmake/service/server.conf`.
+
+```bash
+$ xmake service
+generating the config file to /Users/ruki/.xmake/service/server.conf ..
+an token(590234653af52e91b9e438ed860f1a2b) is generated, we can use this token to connect service.
+generating the config file to /Users/ruki/.xmake/service/client.conf ..
+<distcc_build_server>: listening 0.0.0.0:9693 ..
+```
+
+Then, we edit it, fixing the server's listening port (optional).
+
+```bash
+$ cat ~/.xmake/service/server.conf
+{
+    distcc_build = {
+        listen = "0.0.0.0:9693",
+        workdir = "/Users/ruki/.xmake/service/server/distcc_build"
+    },
+    known_hosts = { },
+    logfile = "/Users/ruki/.xmake/service/server/logs.txt",
+    tokens = {
+        "590234653af52e91b9e438ed860f1a2b"
+    }
+}
+```
+
+#### Configure the client
+
+The client configuration file is in `~/.xmake/service/client.conf`, where we can configure the server address that the client needs to connect to.
+
+We can configure multiple server addresses and corresponding tokens in the hosts list.
+
+For distributed compilation, it is recommended to use the token authentication mode,
+because the password mode requires a password to be entered for each server connection, which is very cumbersome.
+
+```console
+$cat ~/.xmake/service/client.conf
+{
+    distcc_build = {
+        hosts = {
+            {
+                connect = "127.0.0.1:9693",
+                token = "590234653af52e91b9e438ed860f1a2b"
+            }
+        }
+    }
+}
+```
+
+#### Connect to the server
+
+After configuring the authentication and server address, you can enter the following command to connect the current project to the configured server.
+
+We need to enter `--distcc` when connecting to specify that only distributed services are connected.
+
+```bash
+$ cd projectdir
+$ xmake service --connect --distcc
+<client>: connect 127.0.0.1:9693 ..
+<client>: 127.0.0.1:9693 connected!
+```
+
+We can also connect to multiple services at the same time, such as distributed compilation and remote compilation cache services.
+
+```hash
+$ xmake service --connect --distcc --ccache
+```
+
+!> If there is no parameter, the default connection is the remote compilation service.
+
+#### Distributed compilation project
+
+After connecting to the server, we can perform distributed compilation like normal local compilation, for example:
+
+```bash
+$ xmake
+...
+[ 93%]: ccache compiling.release src/demo/network/unix_echo_client.c ----> local job
+[ 93%]: ccache compiling.release src/demo/network/ipv6.c
+[ 93%]: ccache compiling.release src/demo/network/ping.c
+[ 93%]: distcc compiling.release src/demo/network/unix_echo_server.c. ----> distcc job
+[93%]: distcc compiling.release src/demo/network/http.c
+[ 93%]: distcc compiling.release src/demo/network/unixaddr.c
+[ 93%]: distcc compiling.release src/demo/network/ipv4.c
+[ 94%]: distcc compiling.release src/demo/network/ipaddr.c
+[94%]: distcc compiling.release src/demo/math/fixed.c
+[94%]: distcc compiling.release src/demo/libm/float.c
+[ 95%]: ccache compiling.release src/demo/libm/double.c
+[ 95%]: ccache compiling.release src/demo/other/test.cpp
+[ 98%]: archiving.release libtbox.a
+[99%]: linking.release demo
+[100%]: build ok!
+```
+
+Among them, the words with distcc are remote compilation tasks, and the others are local compilation tasks.
+By default, xmake also enables local compilation caching to cache distributed compilation results to avoid frequent requests to the server.
+
+In addition, we can also open the remote compilation cache and share the compilation cache with others to further accelerate the compilation of multi-person collaborative development.
+
+#### Disconnect server
+
+```bash
+$ xmake service --disconnect --distcc
+```
+
+#### Specify the number of parallel compilation tasks
+
+Let's briefly introduce the number of parallel tasks currently calculated by default based on the number of host cpu cores:
+
+```lua
+local default_njob = math.ceil(ncpu * 3 / 2)
+```
+
+Therefore, if distributed compilation is not enabled, the default maximum number of parallel compilation tasks is this `default_njob`.
+
+If distributed compilation is enabled, the default number of parallel compilation tasks is:
+
+```lua
+local maxjobs = default_njob + server_count * server_default_njob
+```
+
+##### Modify the number of local parallel tasks
+
+We only need to pass `-jN` to specify the number of local parallel tasks, but it will not affect the number of parallel tasks on the server side.
+
+```bash
+$ xmake -jN
+```
+
+##### Modify the number of parallel tasks on the server side
+
+If you want to modify the number of parallel tasks on the server, you need to modify the configuration file of the client.
+
+```bash
+$cat ~/.xmake/service/client.conf
+{
+    distcc_build = {
+        hosts = {
+            {
+                connect = "127.0.0.1:9693",
+                token = "590234653af52e91b9e438ed860f1a2b",
+                njob = 8 <------- modify here
+            },
+            {
+                connect = "192.168.01:9693",
+                token = "590234653af52e91b9e438ed860f1a2b",
+                njob = 4
+            }
+        }
+    }
+}
+```
+
+For each server host, add the `njob = N` parameter configuration to specify the number of parallel jobs that this server can provide.
+
+#### Distributed compilation of Android projects
+
+The distributed compilation service provided by xmake is completely cross-platform
+and supports Windows, Linux, macOS, Android, iOS and even cross-compilation.
+
+If you want to compile the Android project, you only need to add the `toolchains` toolchain configuration in the server configuration,
+and provide the path of the NDK.
+
+```bash
+$ cat ~/.xmake/service/server.conf
+{
+    distcc_build = {
+        listen = "0.0.0.0:9693",
+        toolchains = {
+            ndk = {
+                ndk = "~/files/android-ndk-r21e" <------------ here
+            }
+        },
+        workdir = "/Users/ruki/.xmake/service/server/distcc_build"
+    },
+    known_hosts = { },
+    logfile = "/Users/ruki/.xmake/service/server/logs.txt",
+    tokens = {
+        "590234653af52e91b9e438ed860f1a2b"
+    }
+}
+```
+
+Then, we can compile the Android project in a distributed way like normal local compilation,
+and even configure multiple Windows, macOS, Linux and other different server hosts as resources of the distributed compilation service to compile it.
+
+Just download the NDK for the corresponding platform.
+
+```bash
+$ xmake f -p android --ndk=~/files/xxxx
+$ xmake
+```
+
+#### Distributed compilation of iOS projects
+
+Compiling iOS projects is easier, because Xmake can usually automatically detect Xcode, so just switch the platform to ios like a normal local.
+
+```bash
+$ xmake f -p iphoneos
+$ xmake
+```
+
+#### Distributed cross compilation configuration
+
+If we want to distribute cross-compilation, we need to configure the toolchain sdk path on the server, for example:
+
+```bash
+$ cat ~/.xmake/service/server.conf
+{
+    distcc_build = {
+        listen = "0.0.0.0:9693",
+        toolchains = {
+            cross = {
+                sdkdir = "~/files/arm-linux-xxx" <------------ here
+            }
+        },
+        workdir = "/Users/ruki/.xmake/service/server/distcc_build"
+    },
+    known_hosts = { },
+    logfile = "/Users/ruki/.xmake/service/server/logs.txt",
+    tokens = {
+        "590234653af52e91b9e438ed860f1a2b"
+    }
+}
+```
+
+Among them, under toolchains, each item corresponds to a toolchain,
+here is configured as `cross = {}` cross toolchain, corresponding to `toolchain("cross")`.
+
+In the toolchain, we can configure `sdkdir`, `bindir`, `cross`, etc.,
+corresponding to the interface configuration of `set_sdkdir`, `set_bindir` and `set_cross` in `toolchain("cross")`.
+
+If cross toolchain comparisonSpecification, we usually only need to configure `sdkdir`, xmake can automatically detect it.
+
+And client-side compilation only needs to specify the sdk directory.
+
+```bash
+$ xmake f -p cross --sdk=/xxx/arm-linux-xxx
+$ xmake
+```
+
+#### Clean server cache
+
+The compilation of each project on the server side will generate some cache files,
+which are stored separately according to the project granularity.
+
+We can use the following command to clear the cache corresponding to each server for the current project.
+
+```bash
+$ xmake service --clean --distcc
+```
+
+#### Some optimizations
+
+1. Cache server-side compilation results to avoid repeated compilation
+2. Local cache, remote cache optimization, avoid unnecessary server communication
+3. Server load balancing scheduling, rational allocation of server resources
+4. Small files are compiled directly locally after preprocessing, which is usually faster
+5. Real-time compression and transmission of large files, based on lz4 fast compression
+6. Internal state maintenance, compared to independent tools such as distcc, avoids frequent independent process loading and time-consuming, and avoids additional communication with the daemon process
+
+### Local compilation cache support
+
+By default, Xmake will enable the local cache. The version before 2.6.5 uses the external ccache by default,
+and after 2.6.6, Xmake provides a built-in cross-platform local cache solution.
+
+Compared with third-party independent processes such as ccache, xmake's internal state maintenance is easier to optimize,
+and it also avoids frequent independent process loading and time-consuming, and avoids additional communication with the daemon process.
+
+In addition, the built-in cache can better support cross-platform, and msvc on Windows can also support well, while ccache only supports gcc/clang.
+
+Of course, we can also disable the cache with the following command.
+
+```bash
+$ xmake f --ccache=n
+```
+
+Note: Regardless of whether the built-in local cache is used, the configuration name is `--ccache=`,
+which means the c/c++ build cache, not just the name of the ccache tool.
+
+If we want to continue to use other external caching tools, we can also configure it in the following way.
+
+```bash
+$ xmake f --ccache=n --cxx="ccache gcc" --cc="ccache gcc"
+$ xmake
+```
+
+### Remote compilation cache support
+
+In addition to local caching, we also provide remote caching services, similar to mozilla's sscache,
+which is usually not used if it is only for personal development.
+
+However, if a large-scale project is developed collaboratively by multiple people within the company,
+distributed compilation and local caching alone are not enough. We also need to cache the compiled object files to a separate server for sharing.
+
+In this way, even if other people compile it for the first time,
+they do not need to compile it distributedly every time, and directly pull the cache from the remote to speed up the compilation.
+
+In addition, the remote cache service provided by Xmake is also supported by all platforms, not only gcc/clang but also msvc.
+
+#### Start service
+
+We can specify the `--ccache` parameter to enable the remote compilation cache service.
+
+Of course, if this parameter is not specified, xmake will enable all server-configured services by default.
+
+```console
+$ xmake service --ccache
+<remote_cache_server>: listening 0.0.0.0:9092 ..
+```
+
+We can also start the service and echo detailed log information.
+
+```console
+$ xmake service --ccache -vD
+<remote_cache_server>: listening 0.0.0.0:9092 ..
+```
+
+#### Start the service in daemon mode
+
+```console
+$ xmake service --ccache --start
+$ xmake service --ccache --restart
+$ xmake service --ccache --stop
+```
+
+#### Configure the server
+
+We first, run the `xmake service` command, it will automatically generate a default `server.conf` configuration file,
+stored in `~/.xmake/service/server.conf`.
+
+```bash
+$ xmake service
+generating the config file to /Users/ruki/.xmake/service/server.conf ..
+an token(590234653af52e91b9e438ed860f1a2b) is generated, we can use this token to connect service.
+generating the config file to /Users/ruki/.xmake/service/client.conf ..
+<remote_cache_server>: listening 0.0.0.0:9692 ..
+```
+
+Then, we edit it, fixing the server's listening port (optional).
+
+```bash
+$ cat ~/.xmake/service/server.conf
+{
+    distcc_build = {
+        listen = "0.0.0.0:9692",
+        workdir = "/Users/ruki/.xmake/service/server/remote_cache"
+    },
+    known_hosts = { },
+    logfile = "/Users/ruki/.xmake/service/server/logs.txt",
+    tokens = {
+        "590234653af52e91b9e438ed860f1a2b"
+    }
+}
+```
+
+#### Configure the client
+
+The client configuration file is in `~/.xmake/service/client.conf`, where we can configure the server address that the client needs to connect to.
+
+We can configure multiple server addresses and corresponding tokens in the hosts list.
+
+```console
+$cat ~/.xmake/service/client.conf
+{
+    remote_cache = {
+            connect = "127.0.0.1:9692,
+            token = "590234653af52e91b9e438ed860f1a2b"
+        }
+    }
+}
+```
+
+#### Connect to the server
+
+After configuring the authentication and server address, you can enter the following command to connect the current project to the configured server.
+
+We need to enter `--ccache` when connecting to specify that only the remote compilation cache service is connected.
+
+```bash
+$ cd projectdir
+$ xmake service --connect --ccache
+<client>: connect 127.0.0.1:9692 ..
+<client>: 127.0.0.1:9692 connected!
+```
+
+We can also connect to multiple services at the same time, such as distributed compilation and remote compilation cache services.
+
+```hash
+$ xmake service --connect --distcc --ccache
+```
+
+!> If there is no parameter, the default connection is the remote compilation service.
+
+#### Disconnect server
+
+```bash
+$ xmake service --disconnect --ccache
+```
+
+#### Clean server cache
+
+We can also use the following command to clear the cache on the remote server corresponding to the current project.
+
+```bash
+$ xmake service --clean --ccache
+```
+
+And if we execute `xmake clean --all`, when the remote service is connected, all caches will be automatically cleaned up.
+
+#### Some optimizations
+
+1. Pull the snapshot of the remote cache and send it back to the local through bloom filter + lz4,
+    which is used to quickly determine whether the cache exists and avoid frequently querying the server cache information
+2. With the local cache, you can avoid frequent requests to the remote server and pull the cache.
+3. Internal state maintenance, compared with independent tools such as sscache,
+    avoids frequent independent process loading and time-consuming, and avoids additional communication with the daemon process
+
+### Keil/C51 project support
+
+We only need to bind to the c51 toolchain, Xmake can automatically detect the Keil/C51 SDK toolchain environment installed on the system,
+and then use it to compile.
+
+```lua
+target("hello")
+    add_rules("c51.binary")
+    set_toolchains("c51")
+    add_files("src/main.c")
+```
+
+Of course, if you don't set the toolchain through `set_toolchains("c51")`,
+we can also manually switch to the c51 toolchain through `xmake f --toolchain=c51`.
+
+## Changelog
+
+### New features
+
+* [#2327](https://github.com/xmake-io/xmake/issues/2327): Support nvc/nvc++/nvfortran in nvidia-hpc-sdk
+* Add path instance interfaces
+* [#2334](https://github.com/xmake-io/xmake/pull/2334): Add lz4 compress module
+* [#2349](https://github.com/xmake-io/xmake/pull/2349): Add keil/c51 project support
+* [#274](https://github.com/xmake-io/xmake/issues/274): Distributed compilation support
+* Use builtin local cache instead of ccache
+
+### Changes
+
+* [#2309](https://github.com/xmake-io/xmake/issues/2309): Support user authorization for remote compilation
+* Improve remote compilation to support lz4 compression
+
+### Bugs fixed
+
+* Fix lua stack when select package versions

+ 325 - 0
docs/posts/xmake-update-v2.7.1.md

@@ -0,0 +1,325 @@
+---
+title: Xmake v2.7.1 Released, Better C++ Modules Support
+tags: [xmake, lua, C/C++, remote, ccache, C++20, Modules, headerunits, fs-watcher]
+date: 2022-08-25
+author: Ruki
+---
+
+author: Ruki}
+---
+
+[Xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build utility based on Lua.
+
+It is very lightweight and has no dependencies because it has a built-in Lua runtime.
+
+It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.
+
+We can use it to build project directly like Make/Ninja, or generate project files like CMake/Meson, and it also has a built-in package management system to help users solve the integrated use of C/C++ dependent libraries.
+
+```
+Xmake = Build backend + Project Generator + Package Manager + [Remote|Distributed] Build + Cache
+```
+
+Although not very precise, we can still understand Xmake in the following way:
+
+```
+Xmake ~= Make/Ninja + CMake/Meson + Vcpkg/Conan + distcc + ccache/sccache
+```
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+## Introduction of new features
+
+In this release, we have refactored and improved the C++20 Modules implementation, improved the dependency graph parsing of module files, added support for STL and User HeaderUnits, and made the CMakelists/compile_commands generator support C++ Modules.
+
+In addition, we've added an `xmake watch` plugin that can monitor current project file updates in real time, automatically trigger incremental builds, or run some custom commands.
+
+<img src="/assets/img/posts/xmake/xmake-watch.gif">
+
+
+
+
+### C++ Modules Improvements
+
+Xmake has long supported C++ Modules build support, and can automatically analyze dependencies between modules to maximize parallel compilation.
+In addition, Xmake uses `.mpp` as the default module extension, but also supports `.ixxx`, `.cppm`, `.mxx` and so on.
+
+For example
+
+```lua
+set_languages("c++20")
+target("class")
+    set_kind("binary")
+    add_files("src/*.cpp", "src/*.mpp")
+```
+
+For more examples see: [C++ Modules](https://github.com/xmake-io/xmake/tree/master/tests/projects/c%2B%2B/modules)
+
+However, the previous implementation has many shortcomings.
+
+1. no support for HeaderUnits, so you can't use modules like stl
+2. the module dependency graph parsing is done by scanning the source code itself, and does not support the dependency scanning provided by the compiler, so it is not fully reliable
+3. do not support CMakelists generation
+4. compile_commands.json generation is not supported
+
+In the new version, we have refactored and upgraded the implementation of C++20 module, and we support all the points mentioned above, and added support for Headerunits, so we can introduce STL and user header modules in the module.
+
+Also, since higher versions of msvc and gcc have built-in scan analysis of module dependency graphs, Xmake prioritizes module dependency graph analysis with the compiler, and if the compiler does not support it (clang), then Xmake will degrade to its own source code scan implementation.
+
+A related patch is available at [#2641](https://github.com/xmake-io/xmake/pull/2641), with many thanks to [@Arthapz](https://github.com/Arthapz) for their contribution.
+
+Here is an example of a module that uses STL HeaderUnits, e.g.
+
+```bash
+stl_headerunit$ xmake
+[ 0%]: generating.cxx.module.deps src/main.cpp
+[ 0%]: generating.cxx.module.deps src/hello.mpp
+[ 20%]: generating.cxx.headerunit.bmi iostream
+[ 60%]: generating.cxx.module.bmi hello
+[ 70%]: cache compiling.release src/main.cpp
+[ 80%]: linking.release stl_headerunit
+[100%]: build ok!
+```
+
+For the first compilation, we scan the module code for dependencies and then precompile stl libraries like iostream as headerunit.
+
+Any subsequent recompilation will directly reuse them for compilation acceleration.
+
+Note: Usually we need to add at least one `.mpp` file to enable C++20 modules compilation, if there is only a cpp file, module compilation will not be enabled by default.
+
+However, if we just want to use the module's Headerunits feature in the cpp file, for example, by introducing some STL Headerunits in the cpp, then we can also set the `.mpp` to `.mpp`.
+then we can also force C++ Modules compilation by setting `set_policy("build.c++.modules", true)`, e.g.
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+target("test")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    set_languages("c++20")
+    set_policy("build.c++.modules", true)
+```
+
+
+### Project file monitoring and auto-build
+
+In this release, we have added the `xmake watch` plugin command to automatically monitor project files for updates and then trigger automatic builds or run some custom commands.
+
+This is often used for personal development to enable fast real-time incremental builds without the need to manually execute the build command each time, improving development efficiency.
+
+#### Auto-build after project update
+
+The default behavior is to monitor the entire project root, and any file changes will trigger an incremental build of the project.
+
+```bash
+$ xmake watch
+watching /private/tmp/test/src/** .
+watching /private/tmp/test/* ...
+/private/tmp/test/src/main.cpp modified
+[ 25%]: ccache compiling.release src/main.cpp
+[ 50%]: linking.release test
+[ 100%]: build ok!
+```
+
+#### Monitoring a specific directory
+
+We can also monitor specific code directories to narrow down the scope of monitoring and improve performance.
+
+```bash
+$ xmake watch -d src
+$ xmake watch -d "src;tests/*"
+```
+
+The above command will recursively watch all subdirectories. If you want to only watch the files in the current directory without recursive monitoring, you can use the following command.
+
+```bash
+$ xmake watch -p src
+$ xmake watch -p "src;tests/*"
+```
+
+#### Watch and run the specified command
+
+If you want to run the build automatically even after the automatic build, we can use a custom command set.
+
+```bash
+$ xmake watch -c "xmake; xmake run"
+```
+
+The above command list is passed as a string, which is not flexible enough for complex command arguments that require escaping to be more cumbersome, so we can use the following for arbitrary commands.
+
+```bash
+$ xmake watch -- echo hello xmake!
+$ xmake watch -- xmake run --help
+```
+
+#### Watching and running the target program
+
+Although we can automate the running of the target program with custom commands, we also provide more convenient arguments to achieve this behavior.
+
+```bash
+$ xmake watch -r
+$ xmake watch --run
+[100%]: build ok!
+hello world!
+```
+
+<img src="/assets/img/posts/xmake/xmake-watch.gif">
+
+#### Watching and running lua scripts
+
+We can also watch for file updates and run the specified lua script for more flexible and complex command customization.
+
+```bash
+$ xmake watch -s /tmp/test.lua
+```
+
+We can also get a list of all updated file paths and events in the script again.
+
+```lua
+function main(events)
+    -- TODO handle events
+end
+```
+
+### Mac Catalyst Support
+
+MAc Catalyst is Apple's new solution for bringing iPad apps to the Mac. Mac apps built with Mac Catalyst share code with your iPad apps, and you can add more features to your Mac separately.
+
+With this new version, we've added support for building Mac Catalyst targets, and on macOS platforms, we just need to add the `-appledev=catalyst` configuration option to support compiling existing iOS code and getting it up and running on macOS without making any changes.
+
+```bash
+$ xmake f --appledev=catalyst
+$ xmake
+```
+
+We can experience the Mac in the test project [iosapp_with_framework](https://github.com/xmake-io/xmake/tree/master/tests/projects/objc/iosapp_with_framework) Catalyst program compile and run.
+
+```bash
+$ xmake
+[ 36%]: processing.xcode.release src/framework/Info.plist
+[ 40%]: cache compiling.release src/framework/test.m
+[ 44%]: linking.release test
+[ 48%]: generating.xcode.release test.framework
+[ 56%]: compiling.xcode.release src/app/Assets.xcassets
+[ 56%]: processing.xcode.release src/app/Info.plist
+[ 60%]: cache compiling.release src/app/ViewController.m
+[ 60%]: cache compiling.release src/app/SceneDelegate.m
+[ 60%]: cache compiling.release src/app/main.m
+[ 60%]: cache compiling.release src/app/AppDelegate.m
+[ 60%]: compiling.xcode.release src/app/Base.lproj/LaunchScreen.storyboard
+[ 60%]: compiling.xcode.release src/app/Base.lproj/Main.storyboard
+[ 88%]: linking.release demo
+[ 92%]: generating.xcode.release demo.app
+[100%]: build ok!
+$ xmake run
+2022-08-26 15:11:03.581 demo[86248:9087199] add(1, 2): 3
+2022-08-26 15:11:03.581 demo[86248:9087199] hello xmake!
+```
+
+<img src="/assets/img/posts/xmake/mac-catalyst.png">
+
+### Improving remote builds
+
+#### Pulling remote build files
+
+For remote builds, we have added a new pull remote file command, which can usually be used to download remote target build files, library files locally after the remote build is complete.
+
+```bash
+$ xmake service --pull 'build/**' outputdir
+```
+
+We can match the files to be downloaded with the `-pull 'build/**'` pattern, either build files or other files.
+
+Note: Files are segregated by project, only files under the current project can be specified for download, and will not let users download files from other directories on the server to avoid some security risks.
+
+#### Real-time echo output
+
+In the previous version, when using remote compilation, the client could not output the compilation information of the server in real time, because the cache existed, the compilation progress information seen locally was refreshed piece by piece, which was not a good experience.
+
+Therefore, we added line buffer refresh support to improve the real-time output display and make the user experience closer to the local compilation when compiling remotely.
+
+### Improve distributed compile scheduling algorithm
+
+We have also further improved the server node scheduling for xmake's distributed compilation by adding weight to cpu load and memory resources, rather than just assigning tasks by the number of cpu cores.
+
+Thus, if some nodes are overloaded, we will prioritize the compilation tasks to the nodes that are quite free and take advantage of all compilation resources.
+
+### More flexible cmake package lookup
+
+#### Specify links
+
+For cmake packages, we have added the ``link_libraries`` configuration option to allow users to customize the configuration of package dependencies and even support for target links when searching for packages to use with cmake.
+
+```lua
+add_requires("cmake::xxx", {configs = {link_libraries = {"abc::lib1", "abc::lib2"}}})
+```
+
+xmake automatically appends the following configuration when looking for cmake packages, improving the extraction of links libraries.
+
+```cmake
+target_link_libraries(test PRIVATE ABC::lib1 ABC::lib2)
+```
+
+#### Specify the search mode
+
+In addition, we add the following search mode configuration.
+
+```lua
+add_requires("cmake::xxx", {configs = {search_mode = "config"}})
+add_requires("cmake::xxx", {configs = {search_mode = "module"}})
+add_requires("cmake::xxx") -- both
+```
+
+Specify config search mode, for example, to tell cmake to look for packages from `XXXConfig.cmake`.
+
+xmake will automatically append the following configuration internally when it looks for cmake packages.
+
+```cmake
+find_package(ABC CONFIG REQUIRED)
+```
+
+### armcc/armclang/rc incremental compilation support
+
+In the new version, we also perform header dependency analysis for keil's armcc/armclang compiler to support incremental compilation.
+
+In addition, msvc's rc.exe resource compiler itself cannot provide header dependency analysis, but cl.exe's preprocessor can handle resource files.
+Therefore, we can use `cl.exe /E test.rc` to preprocess resource files and extract dependency information from them to achieve incremental compilation support for resource files.
+
+So far, it works pretty well, and we also have support for internal ICON/BITMAP resource reference dependencies.
+
+### Other issue fixes
+
+We've also made a number of fixes to the build cache, which will be more stable than the previous version. We have also streamlined the generation of CMakelists.
+
+More detailed improvements can be found in the following changelog.
+
+## Changelog
+
+### New features
+
+* [#2555](https://github.com/xmake-io/xmake/issues/2555): Add fwatcher module and `xmake watch` plugin command
+* Add `xmake service --pull 'build/**' outputdir` to pull the given files in remote server
+* [#2641](https://github.com/xmake-io/xmake/pull/2641): Improve C++20 modules, support headerunits and project generators
+* [#2679](https://github.com/xmake-io/xmake/issues/2679): Support Mac Catalyst
+
+### Changes
+
+* [#2576](https://github.com/xmake-io/xmake/issues/2576): More flexible package fetching from cmake
+* [#2577](https://github.com/xmake-io/xmake/issues/2577): Improve add_headerfiles(), add `{install = false}` support
+* [#2603](https://github.com/xmake-io/xmake/issues/2603): Disable `-fdirectives-only` for ccache by default
+* [#2580](https://github.com/xmake-io/xmake/issues/2580): Set stdout to line buffering
+* [#2571](https://github.com/xmake-io/xmake/issues/2571): Improve task scheduling for parallel and distributed compilation based on memory/cpu usage
+* [#2410](https://github.com/xmake-io/xmake/issues/2410): Improve cmakelists generator
+* [#2690](https://github.com/xmake-io/xmake/issues/2690): Improve to pass toolchains to packages
+* [#2686](https://github.com/xmake-io/xmake/issues/2686): Support for incremental compilation and parse header file deps for keil/armcc/armclang
+* [#2562](https://github.com/xmake-io/xmake/issues/2562): Improve include deps for rc.exe
+* Improve the default parallel building jobs number
+
+### Bugs fixed
+
+* [#2614](https://github.com/xmake-io/xmake/issues/2614): Fix building submodules2 tests for msvc
+* [#2620](https://github.com/xmake-io/xmake/issues/2620): Fix build cache for incremental compilation
+* [#2177](https://github.com/xmake-io/xmake/issues/2177): Fix python.library segmentation fault for macosx
+* [#2708](https://github.com/xmake-io/xmake/issues/2708): Fix link error for mode.coverage rule
+* Fix rpath for macos/iphoneos frameworks and application

+ 472 - 0
docs/posts/xmake-update-v2.7.2.md

@@ -0,0 +1,472 @@
+---
+title: Xmake v2.7.2 released, build third-party libraries more intelligently
+tags: [xmake, lua, C/C++, trybuild, rule, cmake, autoconf]
+date: 2022-10-09
+author: Ruki
+---
+
+[Xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build utility based on Lua.
+
+It is very lightweight and has no dependencies because it has a built-in Lua runtime.
+
+It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.
+
+We can use it to build project directly like Make/Ninja, or generate project files like CMake/Meson, and it also has a built-in package management system to help users solve the integrated use of C/C++ dependent libraries.
+
+```
+Xmake = Build backend + Project Generator + Package Manager + [Remote|Distributed] Build + Cache
+```
+
+Although not very precise, we can still understand Xmake in the following way:
+
+```
+Xmake ~= Make/Ninja + CMake/Meson + Vcpkg/Conan + distcc + ccache/sccache
+```
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+## Introduction of new features
+
+### Building third party libraries more intelligently
+
+In previous versions, Xmake provided a TryBuild mode that allowed you to use Xmake to try to build third-party projects maintained by autoconf/cmake/meson etc. directly without xmake.lua.
+
+In effect, this means that Xmake detects the corresponding build system and invokes commands such as cmake to do so, but it will help the user to simplify the configuration operation, plus it will interface with xmake's cross-compilation toolchain configuration.
+
+However, this mode has a certain failure rate, which can lead to build failure if, for example
+
+1. the project code itself is flawed, resulting in a compilation error
+2. the project code does not support the current platform
+3. the build script is flawed
+4. specific configuration parameters are missing
+5. a missing dependency library that needs to be installed by the user
+6. the compiler version is too low and does not support some of the code
+
+The TryBuild mode usually handles these cases, but in this new version we have introduced a new mechanism to the TryBuild mode to improve the build logic by reusing build scripts from the [xmake-repo](https://github.com/xmake-io/xmake-repo) repository.
+
+It roughly handles the process in the following way.
+
+1. execute the xmake command in the third-party source repository directory
+2. xmake gets the directory name and tries to resolve the project name and version
+3. try to match an existing package from the xmake-repo repository
+4. If the match is successful, build directly using the build logic in the package
+5. if no match is made, fall back to the original TryBuild logic
+
+What is the benefit of this, if the match is successful, we can solve all the problems mentioned above.
+
+Even if the current project source code does not support a given platform, or if the source code and build script are flawed in some way, Xmake will automatically patch in a specific patch to fix it and bring in the required dependencies to ensure that it will definitely compile in one click.
+
+Let's take a look at the libjpeg library as an example.
+
+#### The first step is to download the corresponding source code package
+
+```bash
+$ wget https://jaist.dl.sourceforge.net/project/libjpeg-turbo/2.1.4/libjpeg-turbo-2.1.4.tar.gz
+$ tar -xvf libjpeg-turbo-2.1.4.tar.gz
+$ cd libjpeg-turbo-2.1.4
+```
+
+#### Enter the directory and execute the Xmake command
+
+Xmake will prompt the user if it detects that it is the libjpeg library, and whether to build it as libjpeg 2.1.4.
+
+```bash
+ruki-2:libjpeg-turbo-2.1.4 ruki$ xmake
+note: libjpeg-turbo 2.1.4 in xmake-repo found, try building it or you can run ``xmake f --trybuild=` to set buildsystem (pass -y or --confirm=y/n/d to skip confirm)?
+please input: y (y/n)
+```
+
+We hit enter to confirm to continue the build.
+
+
+
+
+
+
+
+```bash
+checking for cmake ... /usr/local/bin/cmake
+/usr/local/bin/cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_SHARED=OFF -DENABLE_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_ INSTALL_LIBDIR:PATH=lib -DCMAKE_INSTALL_PREFIX=/Users/ruki/.xmake/packages/l/libjpeg-turbo/2.1.4/646b795702e34be89c5745333d052aa2 -G "Unix Makefiles" -DCMAKE_POSITION_INDEPENDENT_CODE=ON /Users/ruki/Downloads/libjpeg-turbo-2.1.4
+-- CMAKE_BUILD_TYPE = Release
+-- VERSION = 2.1.4, BUILD = 20220923
+-- 64-bit build (x86_64)
+-- CMAKE_INSTALL_PREFIX = /Users/ruki/.xmake/packages/l/libjpeg-turbo/2.1.4/646b795702e34be89c5745333d052aa2
+-- CMAKE_INSTALL_BINDIR = bin (/Users/ruki/.xmake/packages/l/libjpeg-turbo/2.1.4/646b795702e34be89c5745333d052aa2/bin)
+-- CMAKE_INSTALL_DATAROOTDIR = share (/Users/ruki/.xmake/packages/l/libjpeg-turbo/2.1.4/646b795702e34be89c5745333d052aa2/share)
+-- CMAKE_INSTALL_DOCDIR = share/doc/libjpeg-turbo (/Users/ruki/.xmake/packages/l/libjpeg-turbo/2.1.4/646b795702e34be89c5745333d052aa2/ share/doc/libjpeg-turbo)
+-- CMAKE_INSTALL_INCLUDEDIR = include (/Users/ruki/.xmake/packages/l/libjpeg-turbo/2.1.4/646b795702e34be89c5745333d052aa2/include)
+-- CMAKE_INSTALL_LIBDIR = lib (/Users/ruki/.xmake/packages/l/libjpeg-turbo/2.1.4/646b795702e34be89c5745333d052aa2/lib)
+-- CMAKE_INSTALL_MANDIR = share/man (/Users/ruki/.xmake/packages/l/libjpeg-turbo/2.1.4/646b795702e34be89c5745333d052aa2/share/man)
+-- Shared libraries disabled (ENABLE_SHARED = 0)
+-- Static libraries enabled (ENABLE_STATIC = 1)
+-- 12-bit JPEG support disabled (WITH_12BIT = 0)
+-- Arithmetic decoding support enabled (WITH_ARITH_DEC = 1)
+-- Arithmetic encoding support enabled (WITH_ARITH_ENC = 1)
+-- TurboJPEG API library enabled (WITH_TURBOJPEG = 1)
+-- TurboJPEG Java wrapper disabled (WITH_JAVA = 0)
+-- In-memory source/destination managers enabled (WITH_MEM_SRCDST = 1)
+-- Emulating libjpeg API/ABI v6.2 (WITH_JPEG7 = 0, WITH_JPEG8 = 0)
+-- libjpeg API shared library version = 62.3.0
+-- Compiler flags = -O3 -DNDEBUG
+-- Linker flags =
+-- INLINE = __inline__ __attribute__((always_inline)) (FORCE_INLINE = 1)
+-- THREAD_LOCAL = __thread
+-- CMAKE_EXECUTABLE_SUFFIX =
+-- CMAKE_ASM_NASM_COMPILER = /usr/local/bin/nasm
+-- CMAKE_ASM_NASM_OBJECT_FORMAT = macho64
+-- CMAKE_ASM_NASM_FLAGS = -DMACHO -D__x86_64__ -DPIC
+-- SIMD extensions: x86_64 (WITH_SIMD = 1)
+-- FLOATTEST = sse
+-- Configuring done
+-- Generating done
+-- Build files have been written to: /Users/ruki/Downloads/libjpeg-turbo-2.1.4/build_646b7957
+make -j10
+[ 2%] Built target md5cmp
+[ 19%] Built target wrjpgcom
+[ 20%] Built target simd
+[ 21%] Built target strtest
+[ 22%] Built target rdjpgcom
+[ 80%] Built target jpeg-static
+[ 84%] Built target turbojpeg-static
+[ 90%] Built target tjbench-static
+[ 90%] Built target tjunittest-static
+[ 91%] Built target jpegtran-static
+[ 98%] Built target djpeg-static
+[ 100%] Built target cjpeg-static
+make install
+[ 1%] Built target strtest
+[ 3%] Built target wrjpgcom
+[ 19%] Built target simd
+[ 52%] Built target turbojpeg-static
+[ 53%] Built target rdjpgcom
+[ 82%] Built target jpeg-static
+[ 85%] Built target jpegtran-static
+[ 90%] Built target djpeg-static
+[ 93%] Built target tjunittest-static
+[ 97%] Built target cjpeg-static
+[ 98%] Built target tjbench-static
+[100%] Built target md5cmp
+Install the project...
+exporting libjpeg-turbo-2.1.4
+  -> /Users/ruki/Downloads/libjpeg-turbo-2.1.4/build/artifacts/l/libjpeg-turbo/2.1.4/646b795702e34be89c5745333d052aa2
+output to /Users/ruki/Downloads/libjpeg-turbo-2.1.4/build/artifacts
+build ok!
+```
+
+As long as the match is detected, the build will usually complete with a near 100% success rate, and Xmake will output the build product to the current directory under `build/artifacts`.
+
+#### Interfacing with cross-compilation toolchains
+
+This smart build mode allows us to not only build native applications, but also to interface with the cross-compilation toolchain to support ios/android and any cross-compilation platform.
+
+For example, to build on Android, we simply pass the `--trybuild=xrepo` argument and switch to Android, and Xmake will pass all the ndk toolchain information.
+
+``bash
+$ xmake f -p android --trybuild=xrepo --ndk=~/files/android-ndk-r20b -c
+$ xmake
+xmake f -c --require=n -v -p android -a armeabi-v7a -m release -k static --ndk=/Users/ruki/files/android-ndk-r20b
+checking for Android SDK directory ... ~/Library/Android/sdk
+checking for Build Tools Version of Android SDK ... 33.0.0
+checking for NDK directory ... /Users/ruki/files/android-ndk-r20b
+checking for SDK version of NDK ... ... 21
+checking for clang++ ... /Users/ruki/files/android-ndk-r20b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
+checking for the shared library linker (sh) ... clang++
+checking for clang++ ... /Users/ruki/files/android-ndk-r20b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++
+checking for the linker (ld) ... clang++
+...
+exporting libjpeg-turbo-2.1.4
+  -> /Users/ruki/Downloads/libjpeg-turbo-2.1.4/build/artifacts/l/libjpeg-turbo/2.1.4/79c2e21f436b4ab08a3c23a6cbae8c0e
+output to /Users/ruki/Downloads/libjpeg-turbo-2.1.4/build/artifacts
+build ok!
+```
+
+#### fallback to direct compilation
+
+If we don't want to use the xmake-repo build scripts, we can fall back to cmake/autoconf and try to build them directly.
+
+However, this may have a certain failure rate and may compile additional binary targets that are not needed. The build script in xmake-repo is optimised to streamline a lot of unnecessary build parameters, such as disabling the tests/examples build.
+
+We just need to hit n to cancel the smart build mode based on package scripts, and Xmake will give a new prompt to let the user choose whether to continue with the cmake/autoconf build attempt.
+
+```bash
+$ xmake
+note: libjpeg-turbo 2.1.4 in xmake-repo found, try building it or you can run ``xmake f --trybuild=` to set buildsystem (pass -y or --confirm=y/n/d to skip confirm)?
+please input: y (y/n)
+n
+note: CMakeLists.txt found, try building it or you can run `xmake f --trybuild=` to set buildsystem (pass -y or --confirm=y/n/d to skip confirm)?
+please input: y (y/n)
+```
+
+### Support for Windows Arm64
+
+We have also improved our Windows build support with the addition of Windows Arm64 platform support, simply by switching to the arm64 architecture.
+
+```bash
+$ xmake f -a arm64
+$ xmake
+```
+
+### Improved rule support for sequential execution of dependencies
+
+Associated dependencies can be bound to a batch of rules, i.e. instead of having to add rules to target one by one using `add_rules()`, just apply a rule that will take effect for it and all its dependencies.
+
+For example
+
+```lua
+rule("foo")
+    add_deps("bar")
+
+rule("bar")
+   ...
+```
+
+We only need `add_rules("foo")` to apply both foo and bar rules.
+
+However, by default there is no order of execution between dependencies, and scripts such as `on_build_file` for foo and bar are executed in parallel, in an undefined order.
+
+To tightly control the order of execution, in newer versions we can configure `add_deps("bar", {order = true})` to tell xmake that we need to execute scripts at the same level according to the order of dependencies.
+
+Example.
+
+```lua
+rule("foo")
+    add_deps("bar", {order = true})
+    on_build_file(function (target, sourcefile)
+    end)
+
+rule("bar")
+    on_build_file(function (target, sourcefile)
+    end)
+```
+
+bar's `on_build_file` will be executed first.
+
+### Better dynamic configuration of targets and rules
+
+The above way of controlling rule dependencies only works if both foo and bar rules are custom rules, which doesn't work if you want to insert your own rules to be executed before xmake's built-in rules.
+
+In this case, we need to use a more flexible dynamic rule creation and injection approach to modify the built-in rules.
+
+For example, if we want to execute the `on_build_file` script for a custom cppfront rule before the built-in `c++.build` rule, we can do this in the following way.
+
+```lua
+rule("cppfront")
+    set_extensions(".cpp2")
+    on_load(function (target)
+        local rule = target:rule("c++.build"):clone()
+        rule:add("deps", "cppfront", {order = true})
+        target:rule_add(rule)
+    end)
+    on_build_file(function (target, sourcefile, opt)
+        print("build cppfront file")
+    end)
+
+target("test")
+    set_kind("binary")
+    add_rules("cppfront")
+    add_files("src/*.cpp")
+    add_files("src/*.cpp2")
+```
+
+### Support for introducing custom rules from packages
+
+Now, we can also add custom build rule scripts to the package management repository to enable dynamic distribution and installation following the package.
+
+We need to put the custom rules into the `packages/x/xxx/rules` directory of the repository and it will follow the package as it is installed.
+
+It does, of course, have some limitations.
+
+- In package rules, we cannot add `on_load`, `after_load` scripts, but we can usually use `on_config` instead.
+
+#### Adding package rules
+
+We need to add the rules script to the rules fixed directory, for example: packages/z/zlib/rules/foo.lua
+
+```lua
+rule("foo")
+    on_config(function (target)
+        print("foo: on_config %s", target:name())
+    end)
+```
+
+#### Applying package rules
+
+The rules are used in a similar way as before, the only difference being that we need to specify which package's rules to access by prefixing them with `@packagename/`.
+
+The exact format: ``add_rules("@packagename/rulename")`, for example: ``add_rules("@zlib/foo")`.
+
+``lua
+add_requires("zlib", {system = false})
+target("test")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    add_packages("zlib")
+    add_rules("@zlib/foo")
+```
+
+#### Referencing rules by package alias
+
+If a package alias exists, xmake will give preference to the package alias to get the rules.
+
+``` lua
+add_requires("zlib", {alias = "zlib2", system = false})
+target("test")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    add_packages("zlib2")
+    add_rules("@zlib2/foo")
+```
+
+#### Adding package rule dependencies
+
+We can use `add_deps("@bar")` to add additional rules relative to the current package directory.
+
+However, we cannot add rule dependencies from other packages, they are completely isolated and we can only refer to rules from other packages imported by `add_requires` in the user project.
+
+packages/z/zlib/rules/foo.lua
+
+```lua
+rule("foo")
+    add_deps("@bar")
+    on_config(function (target)
+        print("foo: on_config %s", target:name())
+    end)
+```
+
+packages/z/zlib/rules/bar.lua
+
+```lua
+rule("bar")
+    on_config(function (target)
+        print("bar: on_config %s", target:name())
+    end)
+```
+
+### Stricter package dependency compatibility support
+
+Two new package related policies have been added to enable stricter package dependency compatibility control.
+
+This is to address the fact that some packages may have abi incompatibilities or break other packages that depend on them every time they are updated, and by default Xmake will not recompile and install them unless their versions and configurations are also updated.
+
+There is a chance that the compilation compatibility will be broken and the link will fail.
+
+#### package.librarydeps.strict_compatibility
+
+is disabled by default, if enabled then strict compatibility is maintained between the current package and all its library dependencies, and any version update of a dependent package will force a recompile install of the current package.
+
+This ensures that all packages are binary compatible and that no linking and runtime errors occur when linking with other installed packages due to changes to the interface of a dependent package.
+
+```lua
+package("foo")
+    add_deps("bar", "zoo")
+    set_policy("package.librarydeps.strict_compatibility", true)
+```
+
+For example, if there is an updated version of bar or zoo, then foo will also be recompiled and installed.
+
+#### package.strict_compatibility
+
+is disabled by default, if it is enabled then strict compatibility is maintained between the current package and all other packages that depend on it, and any version update of this package will force a recompile and install of the other parent packages.
+
+This ensures that all packages are binary compatible and that no linking and runtime errors occur when linking with other installed packages due to changes in the interface of a dependent package.
+
+```lua
+package("foo")
+    set_policy("package.strict_compatibility", true)
+
+package("bar")
+    add_deps("foo")
+
+package("zoo")
+    add_deps("foo")
+```
+
+For example, if there is an updated version of foo, then both bar and zoo will be forced to recompile and install.
+
+#### package.install_always
+
+This is useful for local integration of third-party source packages,
+as the package will always be reinstalled each time `xmake f -c` is run to reconfigure it.
+
+As the user may at any time need to modify the third party source code and recompile it for integration.
+
+Previously it was only possible to trigger a recompile by changing the package version number each time,
+but with this strategy it is possible to trigger a recompile each time.
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+package("foo")
+    add_deps("cmake")
+    set_sourcedir(path.join(os.scriptdir(), "foo"))
+    set_policy("package.install_always", true)
+    on_install(function (package)
+        local configs = {}
+        table.insert(configs, "-DCMAKE_BUILD_TYPE=" . (package:debug() and "Debug" or "Release"))
+        table.insert(configs, "-DBUILD_SHARED_LIBS=" ... (package:config("shared") and "ON" or "OFF"))
+        import("package.tools.cmake").install(package, configs)
+    end)
+    on_test(function (package)
+        assert(package:has_cfuncs("add", {includes = "foo.h"}))
+    end)
+package_end()
+
+add_requires("foo")
+
+target("demo")
+    set_kind("binary")
+    add_files("src/main.c")
+    add_packages("foo")
+```
+
+### Adding the clang-cl toolchain
+
+Although we did support switching to the clang-cl compiler in previous versions, the switch was cumbersome and had to be set up one by one.
+
+```bash
+$ xmake f --cxx=clang-cl --cc=clang-cl -c
+$ xmake
+```
+
+And you have to add the directory where clang-cl.exe is located to %PATH% to make it work.
+
+Now that vs comes with the clang-cl toolchain, Xmake is fully capable of detecting it and using it automatically.
+
+So, in this new version, we have added the clang-cl toolchain, and all it takes is `xmake f --toolchain=clang-cl` to quickly switch to the clang-cl toolchain without any PATH settings.
+
+## Changelog
+
+### New features
+
+* [#2140](https://github.com/xmake-io/xmake/issues/2140): Support Windows Arm64
+* [#2719](https://github.com/xmake-io/xmake/issues/2719): Add `package.librarydeps.strict_compatibility` to strict compatibility for package linkdeps
+* [#2810](https://github.com/xmake-io/xmake/pull/2810): Support os.execv to run shell script file
+* [#2817](https://github.com/xmake-io/xmake/pull/2817): Improve rule to support dependence order
+* [#2824](https://github.com/xmake-io/xmake/pull/2824): Pass cross-file to meson.install and trybuild
+* [#2856](https://github.com/xmake-io/xmake/pull/2856): Improve to debug package using the debug source directory
+* [#2859](https://github.com/xmake-io/xmake/issues/2859): Improve trybuild to build 3rd source library using xmake-repo scripts
+* [#2879](https://github.com/xmake-io/xmake/issues/2879): Support for dynamic creation and injection of rules and targets in script scope
+* [#2374](https://github.com/xmake-io/xmake/issues/2374): Allow xmake package to embed rules and scripts
+* Add clang-cl toolchain
+
+### Changes
+
+* [#2745](https://github.com/xmake-io/xmake/pull/2745): Improve os.cp to support symlink
+* [#2773](https://github.com/xmake-io/xmake/pull/2773): Improve vcpkg packages to support freebsd
+* [#2778](https://github.com/xmake-io/xmake/pull/2778): Improve Improve xrepo.env for target
+* [#2783](https://github.com/xmake-io/xmake/issues/2783): Add digest algorithm option for wdk signtool
+* [#2787](https://github.com/xmake-io/xmake/pull/2787): Improve json to support empty array
+* [#2782](https://github.com/xmake-io/xmake/pull/2782): Improve to find matlab and runtime
+* [#2793](https://github.com/xmake-io/xmake/issues/2793): Improve mconfdialog
+* [#2804](https://github.com/xmake-io/xmake/issues/2804): Support macOS arm64/x86_64 cross-compilation for installing packages
+* [#2809](https://github.com/xmake-io/xmake/issues/2809): Improve cl optimization option
+* Improve trybuild for meson/cmake/autoconf
+* [#2846](https://github.com/xmake-io/xmake/discussions/2846): Improve to generate config files
+* [#2866](https://github.com/xmake-io/xmake/issues/2866): Better control over the order of execution of rules
+
+### Bugs fixed
+
+* [#2740](https://github.com/xmake-io/xmake/issues/2740): Fix build c++ modules stuck and slower for msvc
+* [#2875](https://github.com/xmake-io/xmake/issues/2875): Fix build linux driver error
+* [#2885](https://github.com/xmake-io/xmake/issues/2885): Fix pch not found with msvc/ccache

+ 557 - 0
docs/posts/xmake-update-v2.7.3.md

@@ -0,0 +1,557 @@
+---
+title: Xmake v2.7.3 Released, Package Components and C++ Modules Incremental Build Support
+tags: [xmake, lua, C/C++, package, components]
+date: 2022-11-08
+author: Ruki
+---
+
+Support', tags: [xmake, lua, C/C++, package, components], date: '2022-11-08',]
+---
+
+[Xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build utility based on Lua.
+
+It is very lightweight and has no dependencies because it has a built-in Lua runtime.
+
+It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.
+
+We can use it to build project directly like Make/Ninja, or generate project files like CMake/Meson, and it also has a built-in package management system to help users solve the integrated use of C/C++ dependent libraries.
+
+```
+Xmake = Build backend + Project Generator + Package Manager + [Remote|Distributed] Build + Cache
+```
+
+Although not very precise, we can still understand Xmake in the following way:
+
+```
+Xmake ~= Make/Ninja + CMake/Meson + Vcpkg/Conan + distcc + ccache/sccache
+```
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+<img src="https://github.com/xmake-io/xmake-docs/raw/master/assets/img/index/package.gif" width="650px" />
+
+## Introduction of new features
+
+### Package component support
+
+#### Introduction
+
+This new feature is intended to enable the integration of specific sub-libraries from a C/C++ package, and is generally used for library component integration in larger packages.
+
+This is because such packages provide a number of sub-libraries, not all of which are required by the user, and linking them all may be problematic.
+
+Although, previous versions were able to support the feature of sublibrary selection, e.g.
+
+```lua
+add_requires("sfml~foo", {configs = {graphics = true, window = true}})
+add_requires("sfml~bar", {configs = {network = true}})
+
+target("foo")
+    set_kind("binary")
+    add_packages("sfml~foo")
+
+target("bar")
+    set_kind("binary")
+    add_packages("sfml~bar")
+```
+
+This is done by custom configuration of each package, but there are some problems with this approach.
+
+1. `sfml~foo` and `sfml~bar` will be installed repeatedly as two separate packages, taking up double the disk space
+2. some common code will be compiled repeatedly, which will affect the efficiency of the installation
+3. if a target depends on both `sfml~foo` and `sfml~bar`, there will be link conflicts
+
+The impact of double-compilation and disk usage can be very high for very large package integrations such as boost, and can even lead to more than N times the disk usage if there are a large number of sub-library combinations.
+
+To solve this problem, Xmake has added a package component mode, which offers some of the following benefits.
+
+1. fast integration of any number of components in just one compile, greatly improving installation efficiency and reducing disk footprint
+2. component abstraction, across compilers and platforms, so users don't need to worry about configuring link order dependencies between each sub library
+3. easier to use
+
+For more background details see: [#2636](https://github.com/xmake-io/xmake/issues/2636)
+
+#### Use package components
+
+For the user, using package components is very convenient because the user is not required to maintain the package, as long as the package is used, it is configured with the relevant set of components and we can quickly integrate and use it, e.g.
+
+```lua
+add_requires("sfml")
+
+target("foo")
+    set_kind("binary")
+    add_packages("sfml", {components = "graphics"})
+
+target("bar")
+    set_kind("binary")
+    add_packages("sfml", {components = "network"})
+```
+
+
+
+
+
+
+
+#### View package components
+
+So how do we know what components are provided by a given package? We can check by executing the following command.
+
+```bash
+$ xrepo info sfml
+The package info of project:
+    require(sfml):
+      -> description: Simple and Fast Multimedia Library
+      -> version: 2.5.1
+      ...
+      -> components:
+         -> system:
+         -> graphics: system, window
+         -> window: system
+         -> audio: system
+         -> network: system
+```
+
+#### Package component configuration
+
+If you are a package maintainer and want to add component support to a package, then you need to configure the package components via the following two interfaces.
+
+- add_components: adds a list of package components
+- on_component: Configures each package component
+
+##### Link configuration for package components
+
+In most cases, a package component only needs to be configured with some of its own sub-link information, e.g.
+
+```lua
+package("sfml")
+    add_components("graphics")
+    add_components("audio", "network", "window")
+    add_components("system")
+
+    on_component("graphics", function (package, component)
+        local e = package:config("shared") and "" or "-s"
+        component:add("links", "sfml-graphics" ... e)
+        if package:is_plat("windows", "mingw") and not package:config("shared") then
+            component:add("links", "freetype")
+            component:add("syslinks", "opengl32", "gdi32", "user32", "advapi32")
+        end
+    end)
+
+    on_component("window", function (package, component)
+        local e = package:config("shared") and "" or "-s"
+        component:add("links", "sfml-window" ... e)
+        if package:is_plat("windows", "mingw") and not package:config("shared") then
+            component:add("syslinks", "opengl32", "gdi32", "user32", "advapi32")
+        end
+    end)
+
+    ...
+```
+
+The above is an incomplete package configuration, I have only extracted a part of the configuration related to the package components.
+
+A full example of the configuration and use of package components can be found at: [components example](https://github.com/xmake-io/xmake/blob/master/tests/projects/package/components/xmake.lua)
+
+##### Configure compilation information for components
+
+We can configure not only the linking information for each component, but also the compilation information for includedirs, defines etc. We can also configure each component individually.
+
+```lua
+package("sfml")
+    on_component("graphics", function (package, component)
+        package:add("defines", "TEST")
+    end)
+```
+
+##### Configure component dependencies
+
+```lua
+package("sfml")
+    add_components("graphics")
+    add_components("audio", "network", "window")
+    add_components("system")
+
+    on_component("graphics", function (package, component)
+          component:add("deps", "window", "system")
+    end)
+```
+
+The above configuration tells the package that our graphics component will have additional dependencies on the `window` and `system` components.
+
+So, on the user side, our use of the graphics component can be done from the
+
+```lua
+add_packages("sfml", {components = {"graphics", "window", "system"})
+```
+
+Simplified to.
+
+```lua
+add_packages("sfml", {components = "graphics")
+```
+
+Because, as soon as we turn on the graphics component, it will also automatically enable the dependent window and system components and automatically ensure that the links are in the right order.
+
+Alternatively, we can configure component dependencies with `add_components("graphics", {deps = {"window", "system"}})`.
+
+##### Find components from the system library
+
+We know that configuring `add_extsources` in the package configuration can improve package discovery on the system, for example by finding libraries from system package managers such as apt/pacman.
+
+Of course, we can also make it possible for each component to prioritise finding them from the system repositories via the `extsources` configuration as well.
+
+For example, the sfml package, which is actually also componentized in homebrew, can be made to find each component from the system repository without having to install them in source each time.
+
+```bash
+$ ls -l /usr/local/opt/sfml/lib/pkgconfig
+-r--r--r-- 1 ruki admin 317 10 19 17:52 sfml-all.pc
+-r--r--r-- 1 ruki admin 534 10 19 17:52 sfml-audio.pc
+-r--r--r-- 1 ruki admin 609 10 19 17:52 sfml-graphics.pc
+-r--r--r-- 1 ruki admin 327 10 19 17:52 sfml-network.pc
+-r--r--r-- 1 ruki admin 302 10 19 17:52 sfml-system.pc
+-r--r--r-- 1 ruki admin 562 10 19 17:52 sfml-window.pc
+````
+
+We just need, for each component, to configure its extsources: the
+
+```lua
+if is_plat("macosx") then
+    add_extsources("brew::sfml/sfml-all")
+end
+
+on_component("graphics", function (package, component)
+    -- ...
+    component:add("extsources", "brew::sfml/sfml-graphics")
+end)
+```
+
+##### Default Global Component Configuration
+
+In addition to configuring specific components by specifying component names, if we do not specify a component name, the default is to globally configure all components.
+
+```lua
+package("sfml")
+    on_component(function (package, component)
+        -- configure all components
+    end)
+```
+
+Of course, we could also specify the configuration of the graphics component and the rest of the components would be configured via the default global configuration interface in the following way.
+
+```lua
+package("sfml")
+    add_components("graphics")
+    add_components("audio", "network", "window")
+    add_components("system")
+
+    on_component("graphics", function (package, component)
+        -- configure graphics
+    end)
+
+    on_component(function (package, component)
+        -- component audio, network, window, system
+    end)
+```
+
+### C++ module build improvements
+
+#### Incremental build support
+
+I thought that Xmake already had good support for C++ modules, but then I realised that its incremental builds don't work properly yet.
+
+So this version of Xmake also does a good job of supporting incremental builds of C++ modules, although the support process still took a lot of effort.
+
+My analysis shows that the format of the include dependency information (`*.d`) generated with modules varies considerably between the compilers.
+
+The gcc format is the most complex, but I got it to support it anyway.
+
+```
+build/.objs/dependence/linux/x86_64/release/src/foo.mpp.o: src/foo.mpp\
+build/.objs/dependence/linux/x86_64/release/src/foo.mpp.o gcm.cache/foo.gcm: bar.c++m cat.c++m\
+foo.c++m: gcm.cache/foo.gcm\
+.PHONY: foo.c++m\
+gcm.cache/foo.gcm:| build/.objs/dependence/linux/x86_64/release/src/foo.mpp.o\
+CXX_IMPORTS += bar.c++m cat.c++m\
+```
+
+clang has the best format compatibility and supports it without any special changes.
+
+```
+build//hello.pcm: /usr/lib/llvm-15/lib/clang/15.0.2/include/module.modulemap src/hello.mpp\
+```
+
+The msvc format is more extensible and easier to parse and support: the
+
+```
+{
+    "Version": "1.2",
+    "Data": {
+        "Source": "c:\users\ruki\desktop\user_headerunit\src\main.cpp",
+        "ProvidedModule": "",
+        "Includes": [],
+        "ImportedModules": [
+            {
+                "Name": "hello",
+                "BMI": "c:\users\ruki\desktop\user_headerunit\src\hello.ifc"
+            }
+        ],
+        "ImportedHeaderUnits": [
+            {
+                "Header": "c:\users\ruki\desktop\user_headerunit\src\header.hpp",
+                "BMI": "c:\users\ruki\desktop\user_headerunit\src\header.hpp.ifc"
+            }
+        ]
+    }
+}
+```
+
+#### Circular Dependency Detection Support
+
+As there are dependencies between modules, it is not possible to compile if there are circular dependencies between several modules.
+
+However, in previous versions Xmake was unable to detect this, and when a circular dependency was encountered, the compilation would get stuck without any message, which was very unfriendly to the user.
+
+In this new version, we have improved this situation by adding the detection of cyclic dependencies for modules, and the following error message will appear when compiling to make it easier for the user to locate the problem.
+
+```bash
+$ xmake
+[ 0%]: generating.cxx.module.deps Foo.mpp
+[ 0%]: generating.cxx.module.deps Foo2.mpp
+[ 0%]: generating.cxx.module.deps Foo3.mpp
+[ 0%]: generating.cxx.module.deps main.cpp
+error: circular modules dependency(Foo2, Foo, Foo3, Foo2) detected!
+  -> module(Foo2) in Foo2.mpp
+  -> module(Foo) in Foo.mpp
+  -> module(Foo3) in Foo3.mpp
+  -> module(Foo2) in Foo2.mpp
+```
+
+### A more LSP friendly syntax format
+
+Our default convention of domain configuration syntax, although very clean, is not very friendly to auto-formatted indentation and IDEs, and if you format your configuration, the indentation is completely misplaced.
+
+```lua
+target("foo")
+    set_kind("binary")
+    add_files("src/*.cpp")
+```
+
+Also, if some global configuration is configured between two targets, it does not automatically end the current target scope and the user needs to explicitly call ``target_end()`.
+
+```lua
+target("foo")
+    set_kind("binary")
+    add_files("src/*.cpp")
+target_end()
+
+add_defines("ROOT")
+
+target("bar")
+    set_kind("binary")
+    add_files("src/*.cpp")
+```
+
+Although, as we mentioned above, you can use the `do end` mode to solve the auto-indentation problem, the problem of needing `target_end()` still exists.
+
+``` lua
+target("foo") do
+    set_kind("binary")
+    add_files("src/*.cpp")
+end
+target_end()
+
+add_defines("ROOT")
+
+target("bar") do
+    set_kind("binary")
+    add_files("src/*.cpp")
+end
+```
+
+Therefore, in this new version, we provide a better optional domain configuration syntax to solve the auto-indentation, target domain isolation problem, e.g.
+
+```lua
+target("foo", function ()
+    set_kind("binary")
+    add_files("src/*.cpp")
+end)
+
+add_defines("ROOT")
+
+target("bar", function ()
+    set_kind("binary")
+    add_files("src/*.cpp")
+end)
+```
+
+The foo and bar fields are completely isolated, so we can configure other settings between them without affecting them, plus it's very LSP friendly and won't cause indentation confusion, even with one-click formatting.
+
+Note: This is only an optional extension syntax, the existing configuration syntax is still fully supported and the user can choose the right one according to their needs preferences.
+
+### Add flags to specific compilers
+
+Values configured using interfaces such as `add_cflags`, `add_cxxflags`, etc. are usually compiler specific, although Xmake does provide automatic detection and mapping mechanisms.
+Even if a flags is set that is not supported by the current compiler, Xmake can automatically ignore it, but there will still be a warning.
+
+In this new version, we have improved the interface for adding all flags to avoid additional warnings by specifying flags only for specific compilers, e.g.
+
+```lua
+add_cxxflags("clang::-stdlib=libc++")
+add_cxxflags("gcc::-stdlib=libc++")
+```
+
+Or
+
+```lua
+add_cxxflags("-stdlib=libc++", {tools = "clang"})
+add_cxxflags("-stdlib=libc++", {tools = "gcc"})
+```
+
+Note: Not just compile flags, but also for link flags such as add_ldflags, which also work.
+
+### renderdoc debugger support
+
+Thanks to [@SirLynix](https://github.com/SirLynix) for contributing this great feature which allows Xmake to load renderdoc directly to debug some graphics renderers.
+
+It's very simple to use, we first make sure renderdoc is installed, then configure the debugger to renderdoc and load the debug run as follows
+
+```bash
+$ xmake f --debugger=renderdoc
+$ xmake run -d
+```
+
+The concrete usage effect is as follows.
+
+<img src="/assets/img/posts/xmake/renderdoc.gif">
+
+### New C++ exception interface configuration
+
+Xmake has added a new `set_exceptions` abstraction configuration interface, which allows us to configure C++/Objc exceptions to be enabled and disabled.
+
+Normally, if we configure them via the add_cxxflags interface, it would be cumbersome for the compiler to handle them separately, depending on the platform.
+
+For example
+
+```lua
+on_config(function (target)
+    if (target:has_tool("cxx", "cl")) then
+        target:add("cxflags", "/EHsc", {force = true})
+        target:add("defines", "_HAS_EXCEPTIONS=1", {force = true})
+    elseif(target:has_tool("cxx", "clang") or target:has_tool("cxx", "clang-cl")) then
+        target:add("cxflags", "-fexceptions", {force = true})
+        target:add("cxflags", "-fcxx-exceptions", {force = true})
+    end
+end)
+```
+
+And with this interface, we can abstract to configure them in a compiler-independent way.
+
+Enabling C++ exceptions:
+
+```lua
+set_exceptions("cxx")
+```
+
+Disable C++ exceptions:
+
+```lua
+set_exceptions("no-cxx")
+```
+
+We can also configure to turn on objc exceptions at the same time.
+
+```lua
+set_exceptions("cxx", "objc")
+```
+
+or disable them.
+
+```lua
+set_exceptions("no-cxx", "no-objc")
+```
+
+Xmake automatically adapts the flags internally to the different compilers.
+
+### Support for ispc compilation rules
+
+Xmake has added support for built-in rules for the ipsc compiler, thanks to [@star-hengxing](https://github.com/star-hengxing), which is used in the following way.
+
+```lua
+target("test")
+    set_kind("binary")
+    add_rules("utils.ispc", {header_extension = "_ispc.h"})
+    set_values("ispc.flags", "--target=host")
+    add_files("src/*.ispc")
+    add_files("src/*.cpp")
+```
+
+### Support for msvc's armasm compiler
+
+Previous versions of Xmake added initial support for Windows ARM, but did not yet have good support for asm compilation, so in this version we have continued to improve Windows ARM support.
+
+Support for msvc's `armasm.exe` and `armasm64.exe` is now available.
+
+In addition, we have also improved package cross-compilation support for the Windows ARM platform.
+
+### New gnu-rm build rules
+
+Xmake has also added a new rule and example project for building embedded projects using the gnu-rm toolchain, thanks to [@JacobPeng](https://github.com/JacobPeng) for this.
+
+```lua
+add_rules("mode.debug", "mode.release")
+
+add_requires("gnu-rm")
+set_toolchains("@gnu-rm")
+set_plat("cross")
+set_arch("armv7")
+
+target("foo")
+    add_rules("gnu-rm.static")
+    add_files("src/foo/*.c")
+
+target("hello")
+    add_deps("foo")
+    add_rules("gnu-rm.binary")
+    add_files("src/*.c", "src/*.S")
+    add_files("src/*.ld")
+    add_includedirs("src/lib/cmsis")
+```
+
+For the full project see: [Embed GNU-RM Example](https://github.com/xmake-io/xmake/blob/master/tests/projects/embed/gnu-rm/hello/xmake.lua)
+
+### Add OpenBSD system support
+
+In previous versions, Xmake only supported FreeBSD, and OpenBSD had a number of differences that prevented Xmake from compiling and installing on it.
+
+The new version now fully supports running Xmake on OpenBSD.
+
+## Changelog
+
+### New features
+
+* A new optional configuration syntax. It is LSP friendly, automatically calls target_end() to achieve scope isolation.
+* [#2944](https://github.com/xmake-io/xmake/issues/2944): Add `gnu-rm.binary` and `gnu-rm.static` rules and tests for embed project
+* [#2636](https://github.com/xmake-io/xmake/issues/2636): Support package components
+* Support armasm/armasm64 for msvc
+* [#3023](https://github.com/xmake-io/xmake/pull/3023): Add support for debugging with renderdoc
+* [#3022](https://github.com/xmake-io/xmake/issues/3022): Add flags for specific compilers and linkers
+* [#3025](https://github.com/xmake-io/xmake/pull/3025): C++ exception enabled/disabled switch method
+* [#3017](https://github.com/xmake-io/xmake/pull/3017): Support ispc compiler
+
+### Changes
+
+* [#2925](https://github.com/xmake-io/xmake/issues/2925): Improve doxygen plugin
+* [#2948](https://github.com/xmake-io/xmake/issues/2948): Support OpenBSD
+* Add `xmake g --insecure-ssl=y` option to disable ssl certificate when downloading packages
+* [#2971](https://github.com/xmake-io/xmake/pull/2971): Stabilize vs and vsxmake project generation
+* [#3000](https://github.com/xmake-io/xmake/issues/3000): Incremental compilation support for modules
+* [#3016](https://github.com/xmake-io/xmake/pull/3016): Improve clang/msvc to better support std modules
+
+### Bugs fixed
+
+* [#2949](https://github.com/xmake-io/xmake/issues/2949): Fix vs group
+* [#2952](https://github.com/xmake-io/xmake/issues/2952): Fix armlink for long args
+* [#2954](https://github.com/xmake-io/xmake/issues/2954): Fix c++ module partitions path issue
+* [#3033](https://github.com/xmake-io/xmake/issues/3033): Detect circular modules dependency

+ 375 - 0
docs/posts/xmake-update-v2.7.6.md

@@ -0,0 +1,375 @@
+---
+title: Xmake v2.7.6 Released, Add Verilog and C++ Module Distribution Support
+date: 2023-01-22
+author: Ruki
+---
+
+[Xmake](https://github.com/xmake-io/xmake) is a lightweight cross-platform build utility based on Lua.
+
+It is very lightweight and has no dependencies because it has a built-in Lua runtime.
+
+It uses xmake.lua to maintain project builds and its configuration syntax is very simple and readable.
+
+We can use it to build project directly like Make/Ninja, or generate project files like CMake/Meson, and it also has a built-in package management system to help users solve the integrated use of C/C++ dependent libraries.
+
+```
+Xmake = Build backend + Project Generator + Package Manager + [Remote|Distributed] Build + Cache
+```
+
+Although not very precise, we can still understand Xmake in the following way:
+
+```
+Xmake ≈ Make/Ninja + CMake/Meson + Vcpkg/Conan + distcc + ccache/sccache
+```
+
+* [Github](https://github.com/xmake-io/xmake)
+* [Document](https://xmake.io/)
+
+<img src="https://github.com/xmake-io/xmake-docs/raw/master/assets/img/index/package.gif" width="650px" />
+
+## Introduction of new features
+
+### Support Verilog Program
+
+#### iVerilog Simulator
+
+Through `add_requires("iverilog")` configuration, we can automatically pull the iverilog toolchain package, and then use `set_toolchains("@iverilog")` to automatically bind the toolchain to compile the project.
+
+```lua
+add_requires("iverilog")
+target("hello")
+     add_rules("iverilog. binary")
+     set_toolchains("@iverilog")
+     add_files("src/*.v")
+```
+
+##### Set abstract configuration
+
+```Lua
+add_requires("iverilog")
+target("hello")
+     add_rules("iverilog. binary")
+     set_toolchains("@iverilog")
+     add_files("src/*.v")
+     add_defines("TEST")
+     add_includedirs("inc")
+     set_languages("v1800-2009")
+```
+
+We can use `set_languages("v1800-2009")` to set the language standard for switching Verilog.
+
+Currently supported values and mappings are as follows:
+
+```lua
+["v1364-1995"] = "-g1995"
+["v1364-2001"] = "-g2001"
+["v1364-2005"] = "-g2005"
+["v1800-2005"] = "-g2005-sv"
+["v1800-2009"] = "-g2009"
+["v1800-2012"] = "-g2012"
+```
+
+##### Set custom flags
+
+
+```lua
+add_requires("iverilog")
+target("hello")
+     add_rules("iverilog. binary")
+     set_toolchains("@iverilog")
+     add_files("src/*.v")
+     add_values("iverilogs.flags", "-DTEST")
+```
+
+##### Build the project
+
+```console
+$ xmake
+check iverilog... iverilog
+check vvp... vvp
+[50%]: linking.iverilog hello.vvp
+[100%]: build ok!
+```
+
+##### Run the program
+
+```console
+$ xmake run
+hello world!
+LXT2 INFO: dumpfile hello.vcd opened, ready for output.
+src/main.v:6: $finish called at 0 (1s)
+```
+
+More complete examples: [iVerilog Examples](https://github.com/xmake-io/xmake/tree/master/tests/projects/embed/iverilog)
+
+
+
+
+
+
+
+#### Verilator Simulator
+
+Through `add_requires("verilator")` configuration, we can automatically pull the verilator toolchain package, and then use `set_toolchains("@verilator")` to automatically bind to the toolchain to compile the project.
+
+```lua
+add_requires("verilator")
+target("Hello")
+     add_rules("verilator. binary")
+     set_toolchains("@verilator")
+     add_files("src/*.v")
+     add_files("src/*.cpp")
+```
+
+verilator project, we need an additional `sim_main.cpp` file to participate in the compilation, as the entry code of the program.
+
+```c
+#include "hello.h"
+#include "verilated.h" (Simplified Chinese)
+
+int main(int argc, char** argv) {
+     VerilatedContext* contextp = new VerilatedContext;
+     contextp->commandArgs(argc, argv);
+     hello* top = new hello{contextp};
+     while (!contextp->gotFinish()) { top->eval(); }
+     remove top.
+     Remove contextp.
+     returns 0.
+}
+```
+
+##### Set abstract configuration
+
+```lua
+add_requires("verilator")
+target("Hello")
+     add_rules("verilator. binary")
+     set_toolchains("@verilator")
+     add_files("src/*.v")
+     add_defines("TEST")
+     add_includedirs("inc")
+     set_languages("v1800-2009")
+```
+
+We can use `set_languages("v1800-2009")` to set the language standard for switching Verilog.
+
+Currently supported values and mappings are as follows.
+
+```lua
+--Verilog
+["v1364-1995"] = "+1364-1995ext+v".
+["v1364-2001"] = "+1364-2001ext+v".
+["v1364-2005"] = "+1364-2005ext+v".
+--system-Verilog
+["v1800-2005"] = "+1800-2005ext+v".
+["v1800-2009"] = "+1800-2009ext+v".
+["v1800-2012"] = "+1800-2012ext+v",
+["v1800-2017"] = "+1800-2017ext+v".
+```
+
+##### Set custom flags
+
+```lua
+add_requires("verilator")
+target("Hello")
+     add_rules("verilator. binary")
+     set_toolchains("@verilator")
+     add_files("src/*.v")
+     add_files("src/*.cpp")
+     add_values("verilator.flags", "--trace", "--timing")
+```
+
+##### Build the project
+
+```console
+$ xmake
+[ 0%]: compiling.verilog src/main.v
+[ 15%]: cache compiling.release /Users/ruki/.xmake/packages/v/verilator/2023.1.10/cd2268409c1d44799288c7759b3cbd56/share/verilator/include/verilated.cpp
+[ 15%]: cache compiling.release build/.gens/hello/macosx/x86_64/release/rules/verilator/hello___024root__Slow.cpp
+[ 15%]: cache compiling.release build/.gens/hello/macosx/x86_64/release/rules/verilator/hello___024root__DepSet_h9053a130__0__Slow.cpp
+[ 15%]: cache compiling.release build/.gens/hello/macosx/x86_64/release/rules/verilator/hello.cpp
+[ 15%]: cache compiling.release /Users/ruki/.xmake/packages/v/verilator/2023.1.10/cd2268409c1d44799288c7759b3cbd56/share/verilator/include/verilated_threads.cpp
+[ 15%]: cache compiling.release build/.gens/hello/macosx/x86_64/release/rules/verilator/hello__Syms.cpp
+[ 15%]: cache compiling.release build/.gens/hello/macosx/x86_64/release/rules/verilator/hello___024root__DepSet_h07139e86__0.cpp
+[15%]: cache compiling.release src/sim_main.cpp
+[ 15%]: cache compiling.release build/.gens/hello/macosx/x86_64/release/rules/verilator/hello___024root__DepSet_h9053a130__0.cpp
+[84%]: linking. release hello
+[100%]: build ok!
+```
+
+##### Run the program
+
+```console
+$ xmake run
+ruki-2:hello ruki$ xmake run
+hello world!
+- src/main.v:4:Verilog $finish
+```
+
+A more complete example: [Verilator](https://github.com/xmake-io/xmake/tree/master/tests/projects/embed/verilator)
+
+### Support for C++ Module distribution
+
+Many thanks to [Arthapz](https://github.com/Arthapz) for continuing to help improve xmake's support for C++ Modules in this new release.
+
+We can now distribute C++ Modules as packages for quick integration and reuse in other projects.
+
+This is a prototype implementation based on the draft design for module distribution in [p2473r1](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2473r1.pdf).
+
+#### Creating a C++ Modules package for distribution
+
+We start by maintaining a build of the modules using xmake.lua and telling xmake which module files to install for external distribution by specifying ``{install = true}`''.
+
+```lua
+add_rules("mode.release", "mode.debug")
+set_languages("c++20")
+
+target("foo")
+    set_kind("static")
+    add_files("*.cpp")
+    add_files("*.mpp", { install = true })
+```
+
+We then make it into a package that we can commit to the [xmake-repo](https://github.com/xmake-io/xmake-repo) repository, or of course directly into a local package, or a private repository package.
+
+Here, for testing purposes, we just make it a local package via ``set_sourcedir``.
+
+```lua
+package("foo")
+    set_sourcedir(path.join(os.scriptdir(), "src"))
+    on_install(function(package)
+        import("package.tools.xmake").install(package, {})
+    end)
+````
+
+#### Integrating the C++ Modules package
+
+We then quickly integrate the C++ Modules package for use via the package integration interface with `add_requires("foo")`.
+
+Since the modules packages for foo are defined in a private repository, we introduce our own package repository via `add_repositories("my-repo my-repo")`.
+
+If the package has already been committed to the official xmake-repo repository, there is no need to configure it additionally.
+
+```lua
+add_rules("mode.release", "mode.debug")
+set_languages("c++20")
+
+add_repositories("my-repo my-repo")
+add_requires("foo", "bar")
+
+target("packages")
+    set_kind("binary")
+    add_files("src/*.cpp")
+    add_packages("foo", "bar")
+    set_policy("build.c++.modules", true)
+```
+
+Once the packages are integrated, we can run the ``xmake`'' command to download, compile and integrate the C++ Modules package for use with one click.
+
+```bash
+$ xmake
+checking for platform ... linux
+checking for architecture ... x86_64
+note: install or modify (m) these packages (pass -y to skip confirm)?
+in my-repo:
+  -> foo latest
+  -> bar latest
+please input: y (y/n/m)
+
+  => install bar latest ... ok
+  => install foo latest ... ok
+[ 0%]: generating.module.deps src/main.cpp
+[ 0%]: generating.module.deps /mnt/xmake/tests/projects/c++/modules/packages/build/.packages/b/bar/latest/ 4e0143c97b65425b855ad5fd03038b6a/modules/bar/bar.mpp
+[ 0%]: generating.module.deps /mnt/xmake/tests/projects/c++/modules/packages/build/.packages/f/foo/latest/ 4e0143c97b65425b855ad5fd03038b6a/modules/foo/foo.mpp
+[ 14%]: compiling.module.release bar
+[ 14%]: compiling.module.release foo
+[ 57%]: compiling.release src/main.cpp
+[ 71%]: linking.release packages
+[ 100%]: build ok!
+```''
+
+Note: After each package is installed, a meta-info file for the maintenance module is stored in the package path, this is a format specification agreed in ``p2473r1.pdf``, it may not be the final standard, but this does not affect our ability to use the distribution of the module now.
+
+```bash
+$ cat . /build/.packages/f/f/foo/latest/4e0143c97b65425b855ad5fd03038b6a/modules/foo/foo.mpp.meta-info
+{"_VENDOR_extension":{"xmake":{"name": "foo", "file": "foo.mpp"}}, "definitions":{}, "include_paths":{}}
+```
+
+The full example project is available at: [C++ Modules package distribution example project](https://github.com/xmake-io/xmake/tree/master/tests/projects/c%2B%2B/modules/packages)
+
+### Support for C++23 Std Modules
+
+[Arthapz](https://github.com/Arthapz) has also helped to improve support for C++23 Std Modules.
+
+It is currently supported by three compilers in progress.
+
+#### Msvc
+
+The latest Visual Studio 17.5 preview already supports it, and the non-standard ifc std modules will be deprecated.
+
+For the standard C++23 std modules, this is how we introduced them.
+
+```c
+import std;
+```
+
+Whereas for ifc std modules, we need to write it like this.
+
+```
+import std.core;
+```
+
+This is not a C++23 standard, it is only provided by msvc, it is not compatible with other compilers and will be deprecated in new versions of msvc.
+Therefore the new version of Xmake will only support C++23 std modules and not the deprecated ifc std modules.
+
+#### Clang
+
+It seems that the latest clang does not yet fully support C++23 std modules either, and is still in draft patch status, [#D135507](https://reviews.llvm.org/D135507).
+
+However, Xmake does support it, so if you want to try it out, you can merge in the patch and test it with xmake.
+
+There is also experimental support for non-standard std modules in lower versions of clang.
+
+It is still possible to experiment with xmake to build std modules in lower versions of clang, even though it is probably still a toy (and will encounter many problems).
+
+For a discussion see: [#3255](https://github.com/xmake-io/xmake/pull/3255)
+
+#### Gcc
+
+It is not currently supported.
+
+### Xrepo auto-completion support
+
+Previously, we only supported the incomplete xmake command. In this new version, we also support the incomplete `xrepo install` command, which
+This will automatically search the [xmake-repo](https://github.com/xmake-io/xmake-repo) repository for packages to incomplete our install command.
+
+Many thanks to @glcraft for this contribution.
+
+```bash
+$ xrepo install libp
+libpaper libpfm libpng libpqxx libpthread-stubs
+libpcap libplist libpq libpsl
+```
+
+## Changelog
+
+### New features
+
+* [#3228](https://github.com/xmake-io/xmake/pull/3228): Add support of importing modules from packages
+* [#3257](https://github.com/xmake-io/xmake/issues/3257): Add support for iverilog and verilator
+* Support for xp and vc6.0
+* [#3214](https://github.com/xmake-io/xmake/pull/3214): Completion on xrepo install packages
+
+### Changes
+
+* [#3255](https://github.com/xmake-io/xmake/pull/3225): Improve clang libc++ module support
+* Support for compiling xmake using mingw
+* Improve compatibility issues with xmake running on win xp
+* Add pure lua json implementation instead of lua-cjson if the external dependencies are enabled
+
+### Bugs fixed
+
+* [#3229](https://github.com/xmake-io/xmake/issues/3229): Fix find rc.exe for vs2015
+* [#3271](https://github.com/xmake-io/xmake/issues/3271): Fix macro defines with spaces
+* [#3273](https://github.com/xmake-io/xmake/issues/3273): Fix nim link error
+* [#3286](https://github.com/xmake-io/xmake/issues/3286): Fix compile_commands for clangd

+ 232 - 0
docs/posts/xmake-update-v2.7.7.md

@@ -0,0 +1,232 @@
+---
+title: Xmake v2.7.7 released, Support Haiku, Improve API check and C++ Modules
+date: 2023-02-23
+author: Ruki
+---
+
+title: Xmake v2.7.7 released, Support Haiku, Improve API check and C++ Modules
+date: 2023-02-23
+author: Ruki
+
+Checks:          'clang-diagnostic-*,clang-analyzer-*,*'
+WarningsAsErrors: ''
+HeaderFilterRegex: ''
+AnalyzeTemporaryDtors: false
+FormatStyle:     none
+User:            ruki
+CheckOptions:
+  - key:             readability-suspicious-call-argument.PrefixSimilarAbove
+    value:           '30'
+  - key:             cppcoreguidelines-no-malloc.Reallocations
+    value:           '::realloc'
+
+```
+
+### Improve target configuration source analysis
+
+We have improved the presentation of target information in the `xmake show -t target` command by adding a new configuration source analysis and streamlining some of the relatively redundant information.
+
+We can use it to better troubleshoot where some of the flags we configure actually come from.
+
+The display looks like this.
+
+```bash
+$ xmake show -t tbox
+The information of target(tbox):
+    at: /Users/ruki/projects/personal/tbox/src/tbox/xmake.lua
+    kind: static
+    targetfile: build/macosx/x86_64/release/libtbox.a
+    rules:
+      -> mode.release -> ./xmake.lua:26
+      -> mode.debug -> ./xmake.lua:26
+      -> utils.install.cmake_importfiles -> ./src/tbox/xmake.lua:15
+      -> utils.install.pkgconfig_importfiles -> ./src/tbox/xmake.lua:16
+    options:
+      -> object -> ./src/tbox/xmake.lua:53
+      -> charset -> ./src/tbox/xmake.lua:53
+      -> database -> ./src/tbox/xmake.lua:53
+    packages:
+      -> mysql -> ./src/tbox/xmake.lua:43
+      -> sqlite3 -> ./src/tbox/xmake.lua:43
+    links:
+      -> pthread -> option(__keyword_thread_local) -> @programdir/includes/check_csnippets.lua:100
+    syslinks:
+      -> pthread -> ./xmake.lua:71
+      -> dl -> ./xmake.lua:71
+      -> m -> ./xmake.lua:71
+      -> c -> ./xmake.lua:71
+    defines:
+      -> __tb_small__ -> ./xmake.lua:42
+      -> __tb_prefix__="tbox" -> ./src/tbox/xmake.lua:19
+      -> _GNU_SOURCE=1 -> option(__systemv_semget) -> @programdir/includes/check_cfuncs.lua:104
+    cxflags:
+      -> -Wno-error=deprecated-declarations -> ./xmake.lua:22
+      -> -fno-strict-aliasing -> ./xmake.lua:22
+      -> -Wno-error=expansion-to-defined -> ./xmake.lua:22
+      -> -fno-stack-protector -> ./xmake.lua:51
+    frameworks:
+      -> CoreFoundation -> ./src/tbox/xmake.lua:38
+      -> CoreServices -> ./src/tbox/xmake.lua:38
+    mxflags:
+      -> -Wno-error=deprecated-declarations -> ./xmake.lua:23
+      -> -fno-strict-aliasing -> ./xmake.lua:23
+      -> -Wno-error=expansion-to-defined -> ./xmake.lua:23
+    includedirs:
+      -> src -> ./src/tbox/xmake.lua:26
+      -> build/macosx/x86_64/release -> ./src/tbox/xmake.lua:27
+    headerfiles:
+      -> src/(tbox/**.h)|**/impl/**.h -> ./src/tbox/xmake.lua:30
+      -> src/(tbox/prefix/**/prefix.S) -> ./src/tbox/xmake.lua:31
+      -> build/macosx/x86_64/release/tbox.config.h -> ./src/tbox/xmake.lua:34
+    files:
+      -> src/tbox/*.c -> ./src/tbox/xmake.lua:56
+      -> src/tbox/hash/bkdr.c -> ./src/tbox/xmake.lua:57
+      -> src/tbox/hash/fnv32.c -> ./src/tbox/xmake.lua:57
+    compiler (cc): /usr/bin/xcrun -sdk macosx clang
+      -> -Qunused-arguments -target x86_64-apple-macos12.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk
+    linker (ar): /usr/bin/xcrun -sdk macosx ar
+      -> -cr
+    compflags (cc):
+      -> -Qunused-arguments -target x86_64-apple-macos12.6 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk -Wall -Werror -Oz -std=c99 -Isrc -Ibuild/macosx/x86_64/release -D__tb_small__ -D__tb_prefix__=\"tbox\" -D_GNU_SOURCE=1 -framework CoreFoundation -framework CoreServices -Wno-error=deprecated-declarations -fno-strict-aliasing -Wno-error=expansion-to-defined -fno-stack-protector
+    linkflags (ar):
+      -> -cr
+```
+
+### Improve package download configuration
+
+If there are packages whose url downloads require specific http headers to be set to authenticate them before they can be downloaded, this policy can be specified.
+
+This is often used for the maintenance of private repository packages within some companies.
+
+```lua
+package("xxx")
+    set_policy("package.download.http_headers", "TEST1: foo", "TEST2: bar")
+```
+
+We can also set the http headers for the specified urls: ```
+
+```lua
+package("zlib")
+    add_urls("https://github.com/madler/zlib/archive/$(version).tar.gz", {
+        http_headers = {"TEST1: foo", "TEST2: bar"}
+    })
+```
+
+### Improve dlang toolchain support
+
+In previous versions, Xmake only provided a toolchain for dlang, which automatically looked up dmd, ldc2, gdc to adapt to the dlang compiler that was available to compile the project.
+
+However, this approach does not allow the user more flexibility in selecting a specific compiler, and if both dmd and ldc2 are installed, Xmake will always use dmd as the compiler for dlang.
+
+Therefore, in this new version, xmake provides three separate toolchains to select the required dlang compiler.
+
+For example, you can quickly switch to the ldc2 compiler to compile your project by running the following command
+
+```bash
+$ xmake f --toolchain=ldc
+$ xmake
+```
+
+In addition to the ldc toolchain, two other toolchains, dmd, and gdc, can be used separately.
+
+And we have also improved the configuration of the dmd/ldc2 build optimisation options to make the production dlang binaries even smaller and faster.
+
+### Support for external working directory configuration
+
+#### The default build directory mode
+
+Xmake currently provides a build directory model that is a built-in build directory, which means that if we run the xmake command in the root of the current project, the build directory is automatically generated and .xmake is used to store some configuration cache.
+
+```
+- projectdir (workdir)
+  - build (generated)
+  - .xmake (generated)
+  - src
+  - xmake.lua
+```
+
+```bash
+$ cd projectdir
+$ xmake
+```
+
+Of course, we can configure the build directory with `xmake f -o . /build` to configure the build directory, but the .xmake directory will still be in the project source directory.
+
+```bash
+$ cd projectdir
+$ xmake f -o ... /build
+```
+
+This may not be to the liking of some users who like their complete code directories to remain intact and clean.
+
+#### The new external build directory mode
+
+Therefore, with this new version, Xmake offers an alternative way of configuring build directories, namely external directory builds (similar to CMake).
+
+For example, we would like to use a directory structure like the following to build a project, always keeping the source directory clean.
+
+```
+- workdir
+  - build (generated)
+  - .xmake (generated)
+- projectdir
+  - projectdir
+  - xmake.lua
+```
+
+We just need to go into the working directory where we need to store the build/.xmake directory and then use the ``xmake f -P [projectdir]` configuration command to specify the source root directory.
+
+```bash
+$ cd workdir
+$ xmake f -P ... /projectdir
+$ xmake
+```
+
+Once the configuration is complete, the source code root is completely remembered and there is no need to set it up again for any subsequent build commands.
+
+For example, the commands to build, rebuild, run or install are exactly the same as before and the user will not feel any difference.
+
+```bash
+$ xmake
+$ xmake run
+$ xmake --rebuild
+$ xmake clean
+$ xmake install
+```
+
+We can also use the `-o/--buildir` argument to set the build directory separately to another location, for example to the following structure.
+
+```
+- build (generated)
+- workdir
+  - .xmake (generated)
+- projectdir
+  - src
+  - xmake.lua
+```
+
+```bash
+$ cd workdir
+$ xmake f -P ... /projectdir -o ... /build
+```
+## Changelog
+
+### New features
+
+* Add Haiku support
+* [#3326](https://github.com/xmake-io/xmake/issues/3326): Add `xmake check` to check project code (clang-tidy) and configuration
+* [#3332](https://github.com/xmake-io/xmake/pull/3332): add custom http headers when downloading packages
+
+### Changes
+
+* [#3318](https://github.com/xmake-io/xmake/pull/3318): Improve dlang toolchains
+* [#2591](https://github.com/xmake-io/xmake/issues/2591): Improve target analysis
+* [#3342](https://github.com/xmake-io/xmake/issues/3342): Improve to configure working and build directories
+* [#3373](https://github.com/xmake-io/xmake/issues/3373): Improve std modules support for clang-17
+* Improve to strip/optimization for dmd/ldc2
+
+### Bugs fixed
+
+* [#3317](https://github.com/xmake-io/xmake/pull/3317): Fix languages for qt project.
+* [#3321](https://github.com/xmake-io/xmake/issues/3321): Fix dependfile when generating configiles
+* [#3296](https://github.com/xmake-io/xmake/issues/3296): Fix build error on macOS arm64

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor