Audit public API and SemVer surface (#103)
Some checks failed
API and SemVer surface / api-surface (push) Failing after 13m8s
Native code generation / deterministic (push) Failing after 2m8s
Concurrency and resource soak audit / soak (push) Failing after 6m39s
Imaging and meshing gate / native (push) Has been cancelled
Release platform and feature matrix / audit (push) Has been cancelled
Release platform and feature matrix / matrix (false, linux-stable-minimal, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, macos-stable-portable, x86_64-apple-darwin, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (false, windows-stable-portable, x86_64-pc-windows-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-msrv-portable, x86_64-unknown-linux-gnu, 1.96.0) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-default, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-features, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Release platform and feature matrix / matrix (true, linux-stable-release-surface, x86_64-unknown-linux-gnu, stable) (push) Has been cancelled
Documentation / documentation (push) Has been cancelled
Native Rust workspace compile / compile (push) Has been cancelled
Dependency and supply-chain audit / audit (push) Has been cancelled
JPEG 2000 feature / linux (push) Successful in 2m46s
Skia feature / linux (push) Successful in 31m0s

This commit is contained in:
2026-08-12 01:35:26 +00:00
parent 5eb3f01122
commit d08b59c9a9
35 changed files with 5112 additions and 67 deletions

3187
tests/semver-port/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
[package]
name = "metacrate-semver-port"
version = "0.0.0"
edition = "2024"
rust-version = "1.96"
license = "BSD-3-Clause"
publish = false
[dependencies]
libremetaverse = { path = "../../crates/libremetaverse" }
libremetaverse-imaging = { path = "../../crates/libremetaverse-imaging" }
libremetaverse-rlv = { path = "../../crates/libremetaverse-rlv" }
libremetaverse-structured-data = { path = "../../crates/libremetaverse-structured-data" }
libremetaverse-types = { path = "../../crates/libremetaverse-types" }
libremetaverse-voice-webrtc = { path = "../../crates/libremetaverse-voice-webrtc" }
[workspace]

View File

@@ -0,0 +1,72 @@
use libremetaverse::appearance::ICurrentOutfitPolicy;
use libremetaverse::{
CapsHttpLimits, GridClient, HttpCapsClient, IBakingTextureProvider, IGridClient,
};
use libremetaverse_imaging::{ManagedImage, ManagedImageImageChannels};
use libremetaverse_rlv::{IRlvActionCallbacks, IRlvQueryCallbacks, RlvParser};
use libremetaverse_structured_data::OSD;
use libremetaverse_types::UUID;
use libremetaverse_types::compat::CancellationTokenSource;
use libremetaverse_voice_webrtc::IVoiceLogger;
use std::future::Future;
use std::time::Duration;
fn assert_send_sync<T: Send + Sync>() {}
fn assert_send_future<T: Future + Send>(future: T) {
drop(future);
}
#[allow(clippy::type_complexity)]
fn assert_dyn_compatible(
_grid: Option<&dyn IGridClient>,
_baker: Option<&dyn IBakingTextureProvider>,
_outfit: Option<&dyn ICurrentOutfitPolicy>,
_actions: Option<&dyn IRlvActionCallbacks>,
_queries: Option<&dyn IRlvQueryCallbacks>,
_logger: Option<&dyn IVoiceLogger>,
) {
}
fn main() -> Result<(), Box<dyn std::error::Error>> {
assert_send_sync::<GridClient>();
assert_send_sync::<CancellationTokenSource>();
assert_dyn_compatible(None, None, None, None, None, None);
assert_send_sync::<Box<dyn IGridClient>>();
assert_send_sync::<Box<dyn IBakingTextureProvider>>();
assert_send_sync::<Box<dyn ICurrentOutfitPolicy>>();
assert_send_sync::<Box<dyn IRlvActionCallbacks>>();
assert_send_sync::<Box<dyn IRlvQueryCallbacks>>();
assert_send_sync::<Box<dyn IVoiceLogger>>();
let cancellation = CancellationTokenSource::new();
let token = cancellation.token();
assert_send_future(token.cancelled());
cancellation.cancel();
let id = UUID::new_with_u_int64(103)?;
let value = OSD::from_integer_with_int32(103)?;
assert_eq!(value.as_integer()?, 103);
let image = ManagedImage::new(2, 2, ManagedImageImageChannels::COLOR)?;
assert_eq!(image.to_interleaved(6)?.len(), 12);
let rlv = RlvParser::parse_message("@version=42", id.guid(), "SemVer Port")?;
assert_eq!(rlv.commands.len(), 1);
let native_http = HttpCapsClient::with_native_transport(
"MetaCrate-SemVer-Port/0.0.1",
Duration::from_secs(1),
1,
None,
CapsHttpLimits::default(),
)?;
drop(native_http);
let client = GridClient::new()?;
let as_interface: &dyn IGridClient = &client;
assert_eq!(as_interface.settings(), client.settings());
assert_send_future(client.dispose_with_method_87ebceff());
client.dispose_with_method()?;
Ok(())
}