From 8c60946f5fd9104d0bf0bd3f7e44ece52366700c Mon Sep 17 00:00:00 2001
From: prsabahrami
Date: Wed, 29 Jan 2025 13:56:43 -0500
Subject: [PATCH] initial commit for optional dependencies support in resolvo
---
cpp/src/lib.rs | 40 +++++
src/conflict.rs | 2 +
src/requirement.rs | 15 +-
src/solver/clause.rs | 233 +++++++++++++++++++++++++++
src/solver/mod.rs | 311 +++++++++++++++++++++++++++----------
src/solver/variable_map.rs | 28 +++-
6 files changed, 548 insertions(+), 81 deletions(-)
diff --git a/cpp/src/lib.rs b/cpp/src/lib.rs
index a35b576..8f4a393 100644
--- a/cpp/src/lib.rs
+++ b/cpp/src/lib.rs
@@ -31,6 +31,41 @@ impl From for resolvo::SolvableId {
}
}
+/// A wrapper around an optional string id.
+/// cbindgen:derive-eq
+/// cbindgen:derive-neq
+#[repr(C)]
+#[derive(Copy, Clone)]
+pub struct FfiOptionStringId {
+ pub is_some: bool,
+ pub value: StringId,
+}
+
+impl From