Expand description
Crate zerodds-corba-rust. Safety classification: STANDARD.
IDL → Rust code generator for CORBA service constructs (interface traits + stubs + skeletons, valuetypes, in phase 2: components, homes, POA bindings).
Analogous to zerodds-idl-cpp / -csharp / -java but emits Rust
instead of C++/C#/Java. Consumes the zerodds-corba-codegen helpers
(special-types tables, stub/skeleton templates) and
zerodds-idl-rust::type_map for DataType mapping.
§Layer position
Layer 8 (CORBA stack). Build-time tool, std-only,
forbid(unsafe_code).
§Spec source
docs/specs/zerodds-corba-rust-1.0.md (ZeroDDS vendor spec).
Conformance basis: OMG CORBA 3.3 Annex A, OMG IDL4.
§What is emitted
| IDL | Rust |
|---|---|
interface I { op(...); }; | pub trait I + pub struct IStub + dispatch_i |
attribute T x | trait getter fn x(&self) + setter if writable |
oneway op(...) | trait method without reply |
valuetype V { ... }; | pub trait V: ValueBase |
component C / home H | (phase 2) |
§Public API
generate_corba_rust_module— AST + options → Rust module code.CorbaRustGenOptions— codegen options.error::CorbaRustError— error family.
Plus the runtime public API that the generated code references:
ObjectReference— IOR wrapper.CorbaException— system/user exception variants.SkeletonResult— server dispatch result.ValueBase— trait for all valuetype implementations.Servant— POA servant marker.
Re-exports§
pub use emitter::CorbaRustGenOptions;pub use emitter::generate_corba_rust_module;pub use error::CorbaRustError;pub use error::Result;pub use runtime::AsyncCorbaChannel;pub use runtime::AsyncReply;pub use runtime::AsyncReplyCallback;pub use runtime::ComponentHome;pub use runtime::ComponentServant;pub use runtime::CorbaConnection;pub use runtime::CorbaException;pub use runtime::IdAssignmentPolicy;pub use runtime::IdUniquenessPolicy;pub use runtime::ImplicitActivationPolicy;pub use runtime::LifespanPolicy;pub use runtime::ObjectReference;pub use runtime::PoaBuilder;pub use runtime::RequestProcessingPolicy;pub use runtime::Servant;pub use runtime::ServantRetentionPolicy;pub use runtime::SkeletonResult;pub use runtime::ThreadPolicy;pub use runtime::TypeCode;pub use runtime::ValueBase;pub use runtime::ValueStreamReader;pub use runtime::ValueStreamWriter;pub use runtime::ValueTagHeader;
Modules§
- ami_
emit - Client AMI codegen (CORBA Messaging §22): the implied IDL for asynchronous
invocations. For an interface marked with
@ami(§8.3.6.3) (or individual@amioperations) this pass emits, in addition to the synchronous stub: - component_
emit - IDL
component/home→ Rust trait + Servant. - emitter
- Top-level emitter: AST → CORBA Rust code.
- error
- Error family of the CORBA Rust codegen.
- interface_
emit - IDL
interface→ Rust trait + stub + skeleton. - runtime
- Runtime types that the generated code references.
- value_
wire - CORBA
valuetypewire (§15.3.4) — the self-describing, shared object encoding. A value instance is written asvalue_tag+ RepositoryId + state members; the same instance (Rc identity) a second time as an indirection (value sharing, §15.3.4) — so object graphs with multiple references are preserved. - valuetype_
emit - IDL
valuetype→ Rust trait + marshalling.