commit ad9b11cdbd572feef13cdddd47a107ff5dd94a52 Author: Ваше Имя Date: Thu Sep 25 13:01:43 2025 +0400 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4f54e98 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.cache +.xmake +build +compile_commands.json diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..0a84ea3 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,16 @@ +#include +#include + +int main() +{ + std::cout << "Hello, Boost + C++23 + xmake!\n"; + + boost::asio::io_context io; + boost::asio::steady_timer timer(io, std::chrono::seconds(1)); + timer.async_wait([](const boost::system::error_code &) { + std::cout << "Timer fired after 1 second!\n"; + }); + + io.run(); + return 0; +} diff --git a/xmake.lua b/xmake.lua new file mode 100644 index 0000000..fc0928b --- /dev/null +++ b/xmake.lua @@ -0,0 +1,17 @@ +set_languages "c++23" + +add_rules("plugin.compile_commands.autoupdate", { outputdir = "." }) + +add_requires("boost", { + system = true, -- sudo pacman -S boost + + configs = { + all = false, + system = true, -- asio + }, +}) + +target "app" +set_kind "binary" +add_files "src/*.cpp" +add_links "boost_system"