Skip to content

Install for Python

pip install rustorb rustorb-idl
Package What it is
rustorb the ORB: from rustorb import CORBA, PortableServer
rustorb-idl the IDL compiler (rustorb-idl -bpython)
rustorb-omniorb-compat optional: from omniORB import ... for omniORBpy applications

rustorb is one abi3 wheel per platform with the Rust core compiled in, so it works on CPython 3.9 and later without a Rust toolchain:

  • Linux x86_64 and aarch64 (manylinux 2.28, e.g. Ubuntu 20.04+, Debian 11+, RHEL 8+)
  • macOS x86_64 and arm64
  • Windows x64

On other platforms pip builds it from the sdist, which needs Rust 1.85 or later.

Check it

python -c "from rustorb import CORBA; print(CORBA.ORB_init([]))"
rustorb-idl --version

Generate code from IDL

rustorb-idl -bpython -C gen Echo.idl
export PYTHONPATH=gen

The output is the standard IDL to Python mapping in the layout of omniidl -bpython: a package per IDL module for the stubs (Example), one with __POA for the skeletons (Example__POA), and Echo_idl.py. For the naming service, also generate its stubs:

rustorb-idl -bpython -C gen "$(rustorb-idl --idl-dir)/CosNaming.idl"

Coming from omniORBpy

Code written for omniORBpy runs on rustorb with its imports changed:

from rustorb import CORBA, PortableServer     # was: from omniORB import CORBA, PortableServer

To run it unchanged (OpenRTM-aist-Python, rtshell, ...), install the compatibility package in place of omniORBpy (not next to it):

pip uninstall omniORBpy        # if it was installed with pip
pip install rustorb rustorb-omniorb-compat

It provides the omniORB package, the top-level CORBA and PortableServer modules and the CosNaming stubs. Stubs generated by omniidl -bpython can be kept, but regenerating them with rustorb-idl -bpython is recommended. The omniORBpy extensions it covers are listed in omniorb-compat.md.

From source

git clone https://github.com/rustorb/rustorb && cd rustorb
pip install ./python               # builds the native module with maturin; needs Rust
git clone https://github.com/rustorb/rustorb-idl
pip install ./rustorb-idl/python      # the IDL compiler, from its own repository