Update to use Auxid
Some checks failed
CI / build-linux-and-wasm (x64-linux) (push) Has been cancelled

This commit is contained in:
2026-01-26 07:24:00 +05:30
parent 117f0eadf7
commit 5a56871ae5
11 changed files with 39 additions and 39 deletions

View File

@ -15,8 +15,8 @@ set(ZLIB_ENABLE_TESTS OFF CACHE BOOL "" FORCE)
set(WITH_GZFILEOP ON CACHE BOOL "" FORCE)
FetchContent_Declare(
Oxide
GIT_REPOSITORY https://github.com/I-A-S/Oxide
Auxid
GIT_REPOSITORY https://github.com/I-A-S/Auxid
GIT_TAG main
OVERRIDE_FIND_PACKAGE
)
@ -133,7 +133,7 @@ if(NOT TARGET zstd::libzstd)
add_library(zstd::libzstd ALIAS libzstd_static)
endif()
FetchContent_MakeAvailable(Oxide httplib pugixml nlohmann_json glaze simdjson unordered_dense mimalloc highway)
FetchContent_MakeAvailable(Auxid httplib pugixml nlohmann_json glaze simdjson unordered_dense mimalloc highway)
if(NOT TARGET simdjson::simdjson)
add_library(simdjson::simdjson ALIAS simdjson)

View File

@ -20,7 +20,7 @@
IACore is a high-performance C++20 foundation library bundling essential systems (IPC, Logging, Networking, Compression, and Async Scheduling) into a single, coherent API.
IACore strictly follows the coding style and philosophy of [Oxide](https://github.com/I-A-S/Oxide).
IACore strictly follows the coding style and philosophy of [Auxid](https://github.com/I-A-S/Auxid).
Originally developed as the internal core for IASoft (PVT) LTD., it is now open-source to provide a standardized bedrock for C++ applications where performance matters.
@ -43,12 +43,12 @@ IACore provides a manager/node architecture using shared memory.
#include <IACore/IPC.hpp>
// Spawns a child process and connects via Shared Memory
auto nodeID = manager.spawn_node("MyChildNodeExe");
manager.wait_till_node_is_online(*nodeID);
auto node_id = manager.spawn_node("MyChildNodeExe");
manager.wait_till_node_is_online(*node_id);
// Send data with zero-copy overhead
String msg = "Hello Node";
manager.send_packet(*nodeID, 100, {(PCUINT8)msg.data(), msg.size()});
manager.send_packet(*node_id, 100, {(PCUINT8)msg.data(), msg.size()});
```
#### Node:

View File

@ -30,7 +30,7 @@ target_include_directories(IACore PRIVATE imp/hpp/)
target_link_libraries(IACore PUBLIC
hwy
zlib
Oxide
Auxid
zstd::libzstd
glaze::glaze
httplib::httplib

View File

@ -86,11 +86,11 @@ auto IpcNode::connect(Const<const char *> connection_string) -> Result<void> {
Ref<IpcConnectionDescriptor> desc = *desc_opt;
m_shm_name = desc.shared_mem_path;
m_socket = OX_TRY(SocketOps::create_unix_socket());
OX_TRY_PURE(
m_socket = AU_TRY(SocketOps::create_unix_socket());
AU_TRY_PURE(
SocketOps::connect_unix_socket(m_socket, desc.socket_path.c_str()));
Mut<u8 *> mapped_ptr = OX_TRY(FileOps::map_shared_memory(
Mut<u8 *> mapped_ptr = AU_TRY(FileOps::map_shared_memory(
desc.shared_mem_path, desc.shared_mem_size, false));
m_shared_memory = mapped_ptr;
@ -108,11 +108,11 @@ auto IpcNode::connect(Const<const char *> connection_string) -> Result<void> {
Mut<u8 *> moni_ptr = m_shared_memory + layout->moni_data_offset;
Mut<u8 *> mino_ptr = m_shared_memory + layout->mino_data_offset;
m_moni = OX_TRY(RingBufferView::create(
m_moni = AU_TRY(RingBufferView::create(
&layout->moni_control,
Span<u8>(moni_ptr, static_cast<usize>(layout->moni_data_size)), false));
m_mino = OX_TRY(RingBufferView::create(
m_mino = AU_TRY(RingBufferView::create(
&layout->mino_control,
Span<u8>(mino_ptr, static_cast<usize>(layout->mino_data_size)), false));
@ -304,10 +304,10 @@ auto IpcManager::spawn_node(Ref<Path> executable_path,
sock_path = std::format("/tmp/ia_sess_{}.sock", sid);
#endif
session->listener_socket = OX_TRY(SocketOps::create_unix_socket());
OX_TRY_PURE(
session->listener_socket = AU_TRY(SocketOps::create_unix_socket());
AU_TRY_PURE(
SocketOps::bind_unix_socket(session->listener_socket, sock_path.c_str()));
OX_TRY_PURE(SocketOps::listen(session->listener_socket, 1));
AU_TRY_PURE(SocketOps::listen(session->listener_socket, 1));
#if IA_PLATFORM_WINDOWS
Mut<u_long> mode = 1;
@ -318,7 +318,7 @@ auto IpcManager::spawn_node(Ref<Path> executable_path,
Const<String> shm_name = std::format("ia_shm_{}", sid);
session->mapped_ptr =
OX_TRY(FileOps::map_shared_memory(shm_name, shared_memory_size, true));
AU_TRY(FileOps::map_shared_memory(shm_name, shared_memory_size, true));
Mut<IpcSharedMemoryLayout *> layout =
reinterpret_cast<IpcSharedMemoryLayout *>(session->mapped_ptr);
@ -339,13 +339,13 @@ auto IpcManager::spawn_node(Ref<Path> executable_path,
layout->mino_data_offset = header_size + half_size;
layout->mino_data_size = half_size;
session->moni = OX_TRY(RingBufferView::create(
session->moni = AU_TRY(RingBufferView::create(
&layout->moni_control,
Span<u8>(session->mapped_ptr + layout->moni_data_offset,
static_cast<usize>(layout->moni_data_size)),
true));
session->mino = OX_TRY(RingBufferView::create(
session->mino = AU_TRY(RingBufferView::create(
&layout->mino_control,
Span<u8>(session->mapped_ptr + layout->mino_data_offset,
static_cast<usize>(layout->mino_data_size)),
@ -358,7 +358,7 @@ auto IpcManager::spawn_node(Ref<Path> executable_path,
Const<String> args = std::format("\"{}\"", desc.serialize());
session->node_process = OX_TRY(ProcessOps::spawn_process_async(
session->node_process = AU_TRY(ProcessOps::spawn_process_async(
FileOps::normalize_executable_path(executable_path).string(), args,
[sid](Const<StringView> line) {
if (Env::IS_DEBUG) {

View File

@ -196,10 +196,10 @@ auto ProcessOps::spawn_process_windows(
return static_cast<i32>(exit_code);
#else
OX_UNUSED(command);
OX_UNUSED(args);
OX_UNUSED(on_output_line_callback);
OX_UNUSED(id);
AU_UNUSED(command);
AU_UNUSED(args);
AU_UNUSED(on_output_line_callback);
AU_UNUSED(id);
return fail("Windows implementation not available.");
#endif
}
@ -298,10 +298,10 @@ auto ProcessOps::spawn_process_posix(
return -1;
}
#else
OX_UNUSED(command);
OX_UNUSED(args);
OX_UNUSED(on_output_line_callback);
OX_UNUSED(id);
AU_UNUSED(command);
AU_UNUSED(args);
AU_UNUSED(on_output_line_callback);
AU_UNUSED(id);
return fail("Posix implementation not available.");
#endif
}

View File

@ -20,7 +20,7 @@ namespace IACore {
auto StreamReader::create_from_file(Ref<Path> path) -> Result<StreamReader> {
Mut<usize> size = 0;
Const<const u8 *> ptr = OX_TRY(FileOps::map_file(path, size));
Const<const u8 *> ptr = AU_TRY(FileOps::map_file(path, size));
Mut<StreamReader> reader(Span<const u8>(ptr, size));
reader.m_storage_type = StorageType::OwningMmap;

View File

@ -107,7 +107,7 @@ public:
template <typename FuncT>
IA_NODISCARD auto get_function(Ref<String> name) const -> Result<FuncT> {
Mut<void *> sym = nullptr;
sym = OX_TRY(get_symbol(name));
sym = AU_TRY(get_symbol(name));
return reinterpret_cast<FuncT>(sym);
}

View File

@ -22,11 +22,11 @@
#if IA_PLATFORM_WINDOWS
using NativeFileHandle = HANDLE;
static constexpr ox::Const<NativeFileHandle> INVALID_FILE_HANDLE =
static constexpr au::Const<NativeFileHandle> INVALID_FILE_HANDLE =
INVALID_HANDLE_VALUE;
#else
using NativeFileHandle = int;
static constexpr ox::Const<NativeFileHandle> INVALID_FILE_HANDLE = -1;
static constexpr au::Const<NativeFileHandle> INVALID_FILE_HANDLE = -1;
#endif
namespace IACore {

View File

@ -69,7 +69,7 @@ template <typename ResponseType>
auto HttpClient::json_get(Ref<String> path, Span<Const<Header>> headers)
-> Result<ResponseType> {
Const<String> raw_response =
OX_TRY(raw_get(path, headers, "application/json"));
AU_TRY(raw_get(path, headers, "application/json"));
if (last_response_code() != EResponseCode::OK) {
return fail("Server responded with code {}",
@ -81,10 +81,10 @@ auto HttpClient::json_get(Ref<String> path, Span<Const<Header>> headers)
template <typename PayloadType, typename ResponseType>
auto HttpClient::json_post(Ref<String> path, Span<Const<Header>> headers,
Ref<PayloadType> body) -> Result<ResponseType> {
Const<String> encoded_body = OX_TRY(Json::encode_struct(body));
Const<String> encoded_body = AU_TRY(Json::encode_struct(body));
Const<String> raw_response =
OX_TRY(raw_post(path, headers, encoded_body, "application/json"));
AU_TRY(raw_post(path, headers, encoded_body, "application/json"));
if (last_response_code() != EResponseCode::OK) {
return fail("Server responded with code {}",

View File

@ -68,18 +68,18 @@
#include <ankerl/unordered_dense.h>
#include <oxide/oxide.hpp>
#include <auxid/auxid.hpp>
namespace IACore {
using namespace Oxide;
using namespace Auxid;
// =============================================================================
// Build Environment & Constants
// =============================================================================
namespace Env {
using namespace Oxide::Env;
using namespace Auxid::Env;
#if IA_PLATFORM_WINDOWS
constexpr Const<bool> IS_WINDOWS = true;

View File

@ -23,7 +23,7 @@ using namespace IACore;
IACORE_MAIN() {
(void)args;
OX_TRY_PURE(SocketOps::initialize());
AU_TRY_PURE(SocketOps::initialize());
std::cout
<< console::GREEN