Skip to main content
QAROS Rust API Dev (main) · versions: Dev (main) · Developer Guide

Crate qaros_sys

Crate qaros_sys 

Source
Expand description

Raw bindings to the QAROS streaming C API (qar_streaming.h).

The header’s public qar_* functions are static inline wrappers that forward to the exported qar_impl_* symbols, so these bindings target the qar_impl_* symbols directly. All of them are reached through a QarApi function table, which comes from one of two loading modes:

  • QarApi::load_default (default): finds qar-streaming-c.dll with the runtime lookup every QAROS binding follows (already loaded, beside the binding, the runtime of the QAROS instance QAR_INSTANCE names, the installed QAROS, PATH), opens it at runtime and resolves every symbol up front. QarApi::load opens one given file instead. A missing symbol is a LoadError listing all missing names, instead of the header’s abort() at the first call.
  • QarApi::linked (feature link): the symbols are declared extern "C" and resolved by the import library qar-streaming-c.lib; the DLL must be present at process start.

The header’s qar_*_default() initializers are also static inline and absent from the binary; defaults ports them, including the QarStructureHeader stamping every init structure needs.

Bindings are generated per target by cargo xtask bindgen and committed: x86_64-pc-windows-msvc (the runtime’s platform, with the D3D11 types as opaque structs), x86_64-unknown-linux-gnu (libqar-streaming-c.so), and one development target without a runtime, for building and testing against qaros-stub (aarch64-apple-darwin, used on every macOS host), which carries the D3D11 types and functions too so that the stub can emulate the D3D11 render sender. cargo xtask bindgen <target> and a cfg entry below add another target.

Modules§

defaults
Ports of the header’s static inline qar_*_default() initializers.

Macros§

qar_impl_function_list
Invokes $callback! with every exported qar_impl_* declaration.

Structs§

ID3D11Device1
ID3D11DeviceContext1
ID3D11Texture2D
IDXGIKeyedMutex
LookupAttempt
One place the default lookup looked at and what it met there.
QarActionSeverity
@brief Mirrors qar::ActionSeverity for progress callbacks.
QarApi
Table of the exported qar_impl_* functions.
QarAppScaleSensitivityMode
QarAppState
@deprecated Read qar_peer_spec_get_presence() and QarPeerPresence instead. Every session claims QAR_APP_STATE_RUNNING as soon as it is created, so UNKNOWN, INITIALIZING and RUNNING say nothing beyond “the peer joined”, and a peer is never “fully configured” by this value. Kept, with its values, for applications that already read it; qar_peer_spec_get_app_state() keeps working.
QarAppVolumeAxisFlags
QarAppVolumeControllerRayLineStyle
QarAppVolumeControllerRayStyle
QarAppVolumeEditingStatus
@brief Whether a peer is editing the volume itself - moving or resizing its box. A peer manipulating the app with a gesture is not editing it; see qar_app_volume_get_gesture_holder().
QarAppVolumeGestureAllowedPeersExt
@brief Extension: the peers whose gestures may move or scale the app.
QarAppVolumeGestureConfiguration
QarAppVolumeGestureHandle
QarAppVolumeGestureMappingRule
QarAppVolumeHandle
QarAppVolumeId
@brief App volume identifier (fixed-size).
QarAppVolumeInit
QarAppVolumeLifetimeStatus
QarAppVolumeSize
@brief The three frames every app volume API is expressed in.
QarAppWorldAnchor
QarCancelTokenHandle
QarColor
QarColorAlphaMode
@brief What a stream’s colour alpha means.
QarColorEncoding
@brief What the numbers in a render sender’s colour texture mean.
QarDXGIKeyedMutexSync
QarDeviceCategory
@brief What kind of device a peer is (qar_peer_spec_get_category()).
QarDeviceHandsWithJoints
QarForgetInit
@brief Teardown — erase a persisted identity slot.
QarFov
@brief Field of view of one render view, in view space: angles in radians from the view’s -Z axis, OpenXR signs - left and down negative, right and up positive.
QarFrameLayout
QarGeoAnchorFrame
@brief Fully defined anchor frame in world coordinates.
QarGestureAppTransformMapping
QarGestureKind
QarGesturePhase
QarGpuDeviceIdType
QarGraphicsAPI
QarGraphicsDeviceDisabledExt
@brief Creates the session without a graphics device.
QarGraphicsDeviceId
@brief Selects the graphics adapter used while initializing a C API session.
QarGuiPanelContentType
QarGuiPanelGestureHandle
QarGuiPanelGestureKind
@brief What a contact on a GUI panel was recognised as.
QarGuiPanelHandle
QarGuiPanelId
@brief GUI panel identifier (fixed-size).
QarGuiPanelInit
QarGuiPanelPoint
@brief A position on a GUI panel, in panel-content-space pixels.
QarGuiPanelServedContentExt
@brief Extension that creates a GUI panel showing a page of a content bundle.
QarGuiPanelSize
@brief The three frames every GUI panel API is expressed in.
QarGuiPanelState
QarGuiPanelStreamIdExt
@brief Extension that creates a GUI panel showing a logical video stream.
QarGuiPanelUrlExt
@brief Extension that creates a GUI panel showing a website URL.
QarHandJoint
QarHandJointLocation
@brief One XR_EXT_hand_tracking joint.
QarHandJointVelocity
@brief Velocity of one joint.
QarHandJoints
@brief One hand’s tracking state.
QarHandedness
@brief Left or right.
QarImageSize
@brief Image size (pixels).
QarJoinHubAsMemberInit
@brief Join the QAROS hub on this PC to a primary hub as its member (qar_runtime_join_hub_as_member).
QarLibraryInit
@brief Library initialization parameters.
QarLogSeverity
@brief Logging severity filter.
QarMemberHubInvitationAppGrantExt
@brief Extension: the invitation also grants one remote app on the joining PC, chained into QarMemberHubInvitationInit.header.next.
QarMemberHubInvitationHandle
QarMemberHubInvitationInit
@brief Create a member-hub invitation on the primary hub of this PC (qar_runtime_create_member_hub_invitation).
QarMemberHubInvitationPermissionFlagBits
@brief The permissions a member-hub invitation grants at the primary hub (QarMemberHubInvitationInit::permissions).
QarNearFar
@brief Near and far clip distances along a view’s -Z, in the units of the poses the view was rendered with: app units for a render sender bound to an app volume. near > far declares reverse-Z.
QarOnboardCodeExt
@brief Extension: onboard with a short pairing code minted for the hub’s operators.
QarOnboardHostExt
@brief Extension: override the hub discovery endpoint for qar_runtime_onboard when QarOnboardCodeExt is chained.
QarOnboardInit
@brief Base init for full onboarding.
QarOnboardInviteExt
@brief Extension: onboard from a full invite blob - a co-process invite (qar_session_request_onboarding_invite) or the launch invite QAROS hands an app it starts.
QarOnboardLocalAppExt
@brief Extension: join the QAROS hub installed on this PC as a local source app, with no code.
QarOnboardLocalAppTagExt
@brief Extension: the app tag of a local source app, telling several instances of one approved app apart.
QarOnboardPeerIdExt
@brief Extension: join the session under a peer id chosen by the caller.
QarOnboardRemoteAppGrantExt
@brief Extension: redeem a remote-app grant while onboarding as a local app on another PC, chained into QarOnboardInit.header.next next to QarOnboardLocalAppExt (with any other mode: QAR_STATUS_ARGUMENT_NOT_SUPPORTED).
QarOnboardingId
@brief Identity slot key, generated by the runtime on first onboard.
QarOnboardingInviteHandle
QarOpenQarosViewInfo
@brief Which QAROS view qar_session_open_qaros_view() opens.
QarPanelContentBundleId
@brief Names one content bundle: the peer that published it and serves its files, and its name, unique per publisher.
QarPanelContentFile
@brief One file handed to qar_panel_content_publish_files().
QarPanelContentMessage
@brief A message a served panel sent to its content owner.
QarPeerDeviceIdentity
@brief Extension: the device this application describes itself as.
QarPeerId
@brief Peer identifier.
QarPeerPresence
@brief Whether a peer is here, as an application should act on it.
QarPeerPresentation
@brief Presentation metadata advertised to other peers.
QarPeerRole
@brief What a peer is in the streaming graph (qar_peer_spec_get_role()).
QarPeerSpecHandle
QarPixelFormat
QarPose
@brief Pose combining position and orientation. Its space is named by the field or function holding it; see @ref qar_coordinate_systems.
QarQarosDeviceKind
@brief The device type a QAR_QAROS_VIEW_DEVICE_SETUP view shows the setup of.
QarQarosView
@brief A predefined view of the QAROS Visualizer an app can open with qar_session_open_qaros_view(). Each is the dialog a qaros://visualizer link of the same name opens.
QarQuaternion
@brief Rotation quaternion, Hamilton, stored x, y, z, w. Its space is named by the field or function holding it; see @ref qar_coordinate_systems.
QarRejoinInit
@brief Continue / rejoin the last persisted session (situation: continue).
QarRenderFrameInfoHandle
QarRenderFrameShow
@brief Parameters describing how to present/show a rendered frame.
QarRenderFrameShowViewOverridesExt
@brief Extension: override per-view pose/FOV for this frame.
QarRenderFrameView
QarRenderFrameViewOverride
@brief Per-view pose/FOV override entry.
QarRenderLoop
When a render sender’s application renders its frames.
QarRenderSenderAlphaModeExt
@brief Declares what a render sender’s colour alpha means.
QarRenderSenderColorEncodingExt
@brief Declares what the numbers in a render sender’s colour texture mean.
QarRenderSenderInit
@brief Rendering stream sender configuration.
QarRenderSenderRenderLoopExt
@brief Declares when a render sender’s application renders.
QarRenderSenderStreamState
What a render sender’s stream is doing right now, as qar_render_sender_get_stream_state() reports it. Values are append-only.
QarRenderStreamRequestHandle
QarRenderStreamSenderHandle
QarRequestInviteInit
@brief Mint a co-process invite: a one-time invite for a process this app starts on the same PC (a companion in another language, a helper process).
QarResult
@brief Result returned by most API calls.
QarRuntimeEphemeralStorageExt
@brief Extension: keep this runtime’s identities in memory only.
QarRuntimeHandle
QarRuntimeInfo
@brief What the loaded qar-streaming-c reports about itself (qar_runtime_info).
QarRuntimeInit
@brief Runtime initialization parameters.
QarSessionChangeCause
@brief Why the session moved into another session id.
QarSessionHandle
QarSessionId
@brief Session identifier (fixed-size).
QarSessionInviteTargetAppInit
@brief Ask this machine’s hub to start a target app for one AR device.
QarSessionLifecycleInfo
@brief One state of a session’s lifecycle.
QarSessionLifecycleState
@brief Where a session stands in its hub’s session lifecycle.
QarStatusCode
@brief Status codes exposed by the C API.
QarStreamId
@brief Stream identifier (fixed-size).
QarStreamParamsD3D11
QarStreamParamsVulkan
The application’s own Vulkan device for a sender or receiver. It must be on the session’s GPU, the adapter qar_session_get_graphics_device_id() reports; a device on another GPU is refused with QAR_STATUS_MEDIA_STREAMING_DEVICE_ON_ANOTHER_ADAPTER.
QarStructureHeader
QarStructureType
@brief Structure type enumeration for init structures and extensions.
QarSyncFrameD3D11
QarSyncFrameVulkan
QarTextureSize
@brief Texture description including format and array layers.
QarTimePoint
@brief Wall-clock instant: nanoseconds since the Unix epoch (UTC).
QarVector3
@brief 3D vector. Its space is named by the field or function holding it; see @ref qar_coordinate_systems.
QarVector3d
@brief Double-precision 3D vector.
QarVideoFrameCpu
QarVideoFrameD3D11
QarVideoFrameLayout
@brief Video frame layout with views and backing textures.
QarVideoFrameView
@brief Video sub-stream view into a texture.
QarVideoFrameViewEye
QarVideoFrameViewType
QarVideoFrameVulkan
QarVideoSenderHandle
QarVideoSenderInit
Configuration for a logical video sender whose StreamId is generated by the library. Exactly one extension is required for a GPU API:
QarVideoTextureCpu
QarVideoTextureD3D11
QarVideoTextureVulkan
QarWorldReferenceSystem
@brief World reference systems for geographic positioning.
VkDevice_T
VkPhysicalDevice_T
_LUID

Enums§

LoadError
Why QarApi::load failed.
LookupOutcome
What the lookup met at one place.
LookupStep
One place the default lookup considers, in lookup order. Its Display is the name the lookup’s messages give the place (QAR_INSTANCE for LookupStep::Instance).

Constants§

DEFAULT_INSTANCE_NAME
The name of the installed (HKLM) instance: QAR_INSTANCE=default loads the installed QAROS’s runtime.
INSTALL_FOLDER_VALUE
The value under INSTALL_REGISTRY_KEY that holds the installation folder; a per-user instance record may hold one too.
INSTALL_REGISTRY_KEY
The registry key, under HKEY_LOCAL_MACHINE, where the QAROS installer records its folder (step 3, and the default instance of step 2).
INSTANCES_REGISTRY_KEY
The key, under HKEY_CURRENT_USER, holding one per-user record per named instance (step 2): the same records the runtime reads to pick the hub of a named instance.
INSTANCE_NAME_MAX_LENGTH
The longest instance name. A name is 1 to 64 characters of A-Z a-z 0-9 . _ -.
INSTANCE_RUNTIME_FOLDER_VALUE
The value of a per-user instance record naming the folder that holds that instance’s runtime (a development hub records its build output there).
INSTANCE_VARIABLE
The environment variable naming the QAROS instance an application belongs to (step 2): the runtime is loaded from that instance’s folder, and enrols with that instance’s hub. A QAROS development hub sets it for the apps it starts. Read on Windows only.
LIBRARY_FILE_NAME
File name of the C API library inside the binary package’s bin/.
QAR_HAND_JOINT_COUNT
QAR_MAX_APP_TAG_LENGTH
QAR_MAX_APP_VOLUME_GESTURE_MAPPING_RULES
QAR_MAX_FRAME_TEXTURES
QAR_MAX_FRAME_VIEWS
QAR_MAX_ID_LENGTH
QAR_MAX_STRING_LENGTH
QAR_ORIENTATION_TRACKED_BIT
QAR_ORIENTATION_VALID_BIT
QAR_PANEL_CONTENT_BUNDLE_NAME_MAX
QAR_POSITION_TRACKED_BIT
QAR_POSITION_VALID_BIT
QAR_SYMBOL_OPTIONAL_ACTIVE
QAR_SYMBOL_OPTIONAL_DEPRECATED
QAR_SYMBOL_OPTIONAL_OPTIONAL_SYMBOL
QAR_UUID_TEXT_BUFFER_SIZE
QAR_UUID_TEXT_LENGTH
SYMBOL_NAMES
Every qar_impl_* symbol this binding requires, in table order.

Functions§

installed_bin_folder
<InstallFolder>\bin of the QAROS installed on this PC, read from HKLM\SOFTWARE\Quaternar\QAROS. None when QAROS is not installed, and always outside Windows.
instance_runtime_folder
The folder holding the runtime of QAROS instance instance, as step 2 of the default lookup picks it: for default the installed QAROS’s <InstallFolder>\bin (installed_bin_folder); for any other name the fully qualified value RuntimeFolder of HKCU\SOFTWARE\Quaternar\QAROS\Instances\<name>, which a QAROS development hub writes for the apps it starts, else that record’s fully qualified <InstallFolder>\bin. None when the name is not valid (crate::is_valid_instance_name), no folder is recorded, or outside Windows, which has no instance records.
is_valid_instance_name
Whether name is a QAROS instance name: 1 to INSTANCE_NAME_MAX_LENGTH characters of A-Z a-z 0-9 . _ -.
open_package_library⚠
Opens a library file with the search rules QarApi::load uses: from its absolute path, its dependencies from its own folder and System32. For other libraries of a QAROS build, such as the test-only counterparts library.
requested_instance
The value of QAR_INSTANCE, exactly as set, when it is set and not empty (read lossily when it is not Unicode, which no instance name is). The default lookup reads it on Windows only.

Type Aliases§

DWORD
LONG
LUID
QarAppVolume
App volume (opaque)
QarAppVolumeGesture
One mapped gesture on an app volume (opaque). Valid only for the duration of the callback it is handed to; see qar_app_volumes_subscribe_gesture_events.
QarAppVolumeGestureModeId
@brief Names one of an app volume’s gesture modes.
QarCancelToken
@name Opaque handles @{ */ /// Cancellation token (opaque)
QarGuiPanel
GUI panel (opaque)
QarGuiPanelGesture
One recognised gesture on a GUI panel (opaque). Valid only for the duration of the callback it is handed to; see qar_gui_panels_subscribe_gesture_events.
QarLuid
QarMemberHubInvitation
Member-hub invitation (opaque) — a primary hub’s signed invitation that joins the QAROS hub on another PC to its session as a member (see qar_runtime_create_member_hub_invitation, qar_runtime_join_hub_as_member). A secret bearer credential: send it only over a trusted channel and never log it.
QarMemberHubInvitationPermissionFlags
A combination of QarMemberHubInvitationPermissionFlagBits.
QarOnboardingInvite
Onboarding invite (opaque) — a full invite blob: a co-process invite this app requested (qar_session_request_onboarding_invite) or the launch invite QAROS hands an app it starts; redeemed with QarOnboardInviteExt in qar_runtime_onboard.
QarPeerSpec
Peer spec (opaque)
QarRenderFrameInfo
Frame info for current render (opaque)
QarRenderSender
Render stream sender (opaque)
QarRenderStreamRequest
Pending render stream request (opaque)
QarRuntime
Runtime instance (opaque)
QarSession
Session instance (opaque)
QarVideoSender
Producer-owned logical video sender (opaque).
VkDevice
VkDeviceMemory
VkFence
VkFlags
VkFormatFeatureFlags
VkImage
VkImageLayout
VkPhysicalDevice
VkSemaphore
qar_app_volume_gesture_event_callback_t
@brief Receives one mapped gesture on a subscribed app volume.
qar_app_volume_update_callback_t
qar_gui_panel_gesture_event_callback_t
@brief Receives one recognised gesture on a subscribed GUI panel.
qar_gui_panel_update_callback_t
qar_panel_content_message_callback_t
@brief Called once per message a panel showing the bundle sent.
qar_peer_update_callback_t
@brief Callback invoked when a peer spec changes.
qar_progress_callback_t
@brief Shared progress callback (mirrors qar::ActionProgress).
qar_render_sender_begin_frame_callback_t
qar_render_sender_create_callback_t
qar_render_sender_request_callback_t
Callback invoked for each pending render stream request.
qar_runtime_onboard_result_callback_t
@brief Result callback for the runtime onboarding / rejoin async calls.
qar_session_lifecycle_callback_t
@brief Callback of qar_session_subscribe_lifecycle().
qar_session_request_invite_result_callback_t
@brief Result callback for qar_session_request_onboarding_invite_async.
qar_target_app_invite_result_callback_t
@brief Result callback for qar_session_invite_target_app_async.
qar_target_app_kill_result_callback_t
@brief Result callback for qar_session_kill_target_app_async.