feat(engine): rename facade to oakengine, build liboakengine.dylib
- src/facade/rust -> src/engine/rust; package oakfacade -> oakengine - crate-type += cdylib; module crates are real deps; linkage anchors force-link module C ABIs into the dylib - build.rs: -undefined dynamic_lookup for host-provided oakcore_*/fb_* - nm: 749 oakengine_* + 687 module oak*_* exports; undefined set is only the intended host-provided symbols - worker/cli updated to the new path/name; undo test race fix
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
//! A thin shell over the facade, mirroring `worker/workermain.cpp`: all
|
||||
//! runtime logic — render backend selection (dynamic -> OpenGL fallback
|
||||
//! through the oakrender module C ABI), the startup handshake and the
|
||||
//! NDJSON control loop — lives in `oakfacade::worker` (the Rust port of
|
||||
//! NDJSON control loop — lives in `oakengine::worker` (the Rust port of
|
||||
//! `engine/src/capi/worker.cpp`, contract in
|
||||
//! `engine/include/oakengine/worker.h`). This crate keeps only the CLI
|
||||
//! surface (arg parsing) and the in-process session mirror
|
||||
@@ -37,7 +37,7 @@ use std::process::exit;
|
||||
use clap::Parser;
|
||||
|
||||
// Force-link the oakrender module crate: the facade's worker module
|
||||
// (oakfacade::worker) initializes the render backend through the oakrender
|
||||
// (oakengine::worker) initializes the render backend through the oakrender
|
||||
// C ABI, but its bridge imports are `extern "C"` declarations — nothing in
|
||||
// the worker source names the crate, so without this the oakrender rlib
|
||||
// would not be added to the link and those imports would stay undefined.
|
||||
@@ -46,7 +46,7 @@ use oakrender as _;
|
||||
|
||||
/// Protocol version announced in the startup handshake
|
||||
/// (`k_protocol_version` in worker.cpp). Mirrors
|
||||
/// `oakfacade::worker::PROTOCOL_VERSION`.
|
||||
/// `oakengine::worker::PROTOCOL_VERSION`.
|
||||
pub const PROTOCOL_VERSION: i32 = 1;
|
||||
|
||||
/// CLI surface (the C++ worker scans argv for `--backend`; clap formalizes
|
||||
@@ -68,7 +68,7 @@ fn main() {
|
||||
let args = Args::parse();
|
||||
// The facade's worker_main is the C++ oakengine_worker_main() — the
|
||||
// whole worker flow. Like workermain.cpp, this main only forwards.
|
||||
exit(oakfacade::worker::worker_main(&args.backend.to_ascii_lowercase()));
|
||||
exit(oakengine::worker::worker_main(&args.backend.to_ascii_lowercase()));
|
||||
}
|
||||
|
||||
/// Log a worker-side message to stderr, mirroring worker.cpp `log_error()`
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
//! The worker-side session state machine — the in-process mirror of
|
||||
//! `OakWorkerSession` in `engine/src/capi/worker.cpp` (whose production
|
||||
//! Rust port lives in `oakfacade::worker`).
|
||||
//! Rust port lives in `oakengine::worker`).
|
||||
//!
|
||||
//! The session holds the attached shared-memory frame-slot pools
|
||||
//! ([`crate::transport::AttachedPools`]) and the shutdown flag, and
|
||||
@@ -61,7 +61,7 @@ impl WorkerSession {
|
||||
}
|
||||
|
||||
/// The attached output pool (the worker->main frame-slot pool).
|
||||
pub fn output_pool(&self) -> Option<&oakfacade::ipc::FrameSlotPool> {
|
||||
pub fn output_pool(&self) -> Option<&oakengine::ipc::FrameSlotPool> {
|
||||
self.pools.as_ref().map(|p| &p.output_pool)
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ impl Default for WorkerSession {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use oakfacade::ipc::{FrameSlotPool, SharedMemoryRegion, ShmMode};
|
||||
use oakengine::ipc::{FrameSlotPool, SharedMemoryRegion, ShmMode};
|
||||
use serde_json::json;
|
||||
|
||||
/// A unique, temporary POSIX segment key for a test.
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
//! shared-memory segments holding an `olive::ipc::FrameSlotPool` — a fixed
|
||||
//! pool of frame slots whose free/ready queues are synchronized by the
|
||||
//! lock-free single-producer/single-consumer `SpscRingBuffer`. That
|
||||
//! machinery is implemented in the facade crate (`oakfacade::ipc`, the
|
||||
//! machinery is implemented in the facade crate (`oakengine::ipc`, the
|
||||
//! Rust port of `engine/render/ipc/` behind
|
||||
//! `engine/include/oakengine/ipc.h`) — this module is the worker-side
|
||||
//! transport over it.
|
||||
@@ -36,7 +36,7 @@
|
||||
//! as before: `oaknode` is a `todo!()` skeleton and the oakrender crate
|
||||
//! does not yet evaluate an arbitrary loaded graph to a frame.
|
||||
|
||||
use oakfacade::ipc::{FrameSlotPool, SharedMemoryRegion, ShmMode};
|
||||
use oakengine::ipc::{FrameSlotPool, SharedMemoryRegion, ShmMode};
|
||||
|
||||
use crate::ipc::HandshakeMsg;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user