devel/aichat: new port, aichat 0.30.0

This commit is contained in:
c0dev0id
2026-07-08 11:08:46 +02:00
parent 8813f7e720
commit d393e4551d
10 changed files with 1511 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
--- modcargo-crates/mmap-rs-0.6.1/Cargo.toml.orig.port Thu Jan 1 00:00:00 1970
+++ modcargo-crates/mmap-rs-0.6.1/Cargo.toml Tue Jul 8 00:00:00 2026
@@ -48,7 +48,7 @@
[target."cfg(unix)".dependencies.nix]
version = "0.26"
-[target."cfg(unix)".dependencies.sysctl]
+[target.'cfg(any(target_os = "linux", target_os = "android", target_os = "macos", target_os = "ios", target_os = "freebsd"))'.dependencies.sysctl]
version = "0.5"
[target."cfg(windows)".dependencies.widestring]

View File

@@ -0,0 +1,12 @@
--- modcargo-crates/mmap-rs-0.6.1/src/areas.rs.orig.port Tue Jul 8 00:00:00 2026
+++ modcargo-crates/mmap-rs-0.6.1/src/areas.rs Tue Jul 8 00:00:00 2026
@@ -14,6 +14,9 @@ use std::path::PathBuf;
#[cfg(any(target_os = "macos", target_os = "ios"))]
use crate::os_impl::macos as platform;
+#[cfg(target_os = "openbsd")]
+use crate::os_impl::openbsd as platform;
+
#[cfg(target_os = "windows")]
use crate::os_impl::windows as platform;

View File

@@ -0,0 +1,12 @@
--- modcargo-crates/mmap-rs-0.6.1/src/error.rs.orig.port Sat Jul 24 00:00:00 2006
+++ modcargo-crates/mmap-rs-0.6.1/src/error.rs Tue Jul 8 00:00:00 2026
@@ -51,7 +51,8 @@ pub enum Error {
#[error(transparent)]
Nix(#[from] nix::Error),
- #[cfg(unix)]
+ #[cfg(any(target_os = "linux", target_os = "android",
+ target_os = "macos", target_os = "ios", target_os = "freebsd"))]
/// Represents [`sysctl::SysctlError`].
#[error(transparent)]
Sysctl(#[from] sysctl::SysctlError),

View File

@@ -0,0 +1,9 @@
--- modcargo-crates/mmap-rs-0.6.1/src/os_impl/mod.rs.orig.port Tue Jul 8 00:00:00 2026
+++ modcargo-crates/mmap-rs-0.6.1/src/os_impl/mod.rs Tue Jul 8 00:00:00 2026
@@ -12,3 +12,6 @@
#[cfg(any(target_os = "macos", target_os = "ios"))]
pub mod macos;
+
+#[cfg(target_os = "openbsd")]
+pub mod openbsd;

View File

@@ -0,0 +1,30 @@
--- /dev/null Tue Jul 8 00:00:00 2026
+++ modcargo-crates/mmap-rs-0.6.1/src/os_impl/openbsd.rs Tue Jul 8 00:00:00 2026
@@ -0,0 +1,27 @@
+use crate::areas::{MemoryArea, Protection, ShareMode};
+use crate::error::Error;
+use std::fs::File;
+use std::io::BufReader;
+use std::marker::PhantomData;
+use std::ops::Range;
+
+/// Stub MemoryAreas for OpenBSD.
+/// OpenBSD does not expose a portable /proc vmmap interface; hnsw_rs only
+/// uses Mmap/MmapOptions so this path is never called at runtime.
+pub struct MemoryAreas<B> {
+ _phantom: PhantomData<B>,
+}
+
+impl MemoryAreas<BufReader<File>> {
+ pub fn open(_pid: Option<u32>, _range: Option<Range<usize>>) -> Result<Self, Error> {
+ Err(Error::Io(std::io::Error::new(
+ std::io::ErrorKind::Unsupported,
+ "MemoryAreas not supported on OpenBSD",
+ )))
+ }
+}
+
+impl<B> Iterator for MemoryAreas<B> {
+ type Item = Result<MemoryArea, Error>;
+ fn next(&mut self) -> Option<Self::Item> { None }
+}