Generate core runtime API shims

This commit is contained in:
2026-08-08 12:28:41 +02:00
parent 7086af9a6f
commit a007313785
12 changed files with 7223 additions and 536 deletions

View File

@@ -66,6 +66,47 @@ pub struct XmlTextWriter(pub String);
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
pub struct CancellationToken;
#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
pub struct Subscription;
pub struct EventHandler<T>(pub PhantomData<fn(T)>);
pub struct DictionaryKeys<TKey, TValue>(pub Vec<TKey>, pub PhantomData<fn(TValue)>);
pub struct DictionaryEntry(pub Object, pub Object);
pub struct RateLimitLease;
pub struct CancellationTokenSource;
pub trait Close {}
pub struct Thread;
pub struct Task<T>(pub PhantomData<fn() -> T>);
pub struct TaskCompletionSource<T>(pub PhantomData<fn(T)>);
pub struct TimeProvider;
pub struct MediaTypeHeaderValue(pub String);
pub struct HttpMessageHandler;
pub struct HttpClient;
pub struct HttpResponse;
pub struct HttpMethod(pub String);
pub struct AuthenticationHeaderValue(pub String);
pub trait IProgress<T> {}
pub struct IEnumerator;
pub struct WaitHandle;
#[derive(Clone, Debug)]
pub struct FrozenDictionary<TKey, TValue>(pub std::collections::HashMap<TKey, TValue>);

File diff suppressed because it is too large Load Diff

View File

@@ -18,6 +18,27 @@ pub mod message_pack {
pub struct MessagePackWriter;
}
/// Project-owned boundary types for external logging signatures.
pub mod logging {
pub trait ILoggerFactory {}
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub struct LogLevel(pub i32);
}
/// Project-owned boundary types for external networking signatures.
pub mod net {
pub struct RateLimiter;
pub struct Socket;
pub struct TcpStream;
pub struct UdpSocket;
}
/// Project-owned boundary types for external service-collection signatures.
pub mod services {
pub trait IServiceCollection {}
}
/// Common behavior for program shims while the network stack is unimplemented.
pub mod shim {
use std::process::ExitCode;