Add versioned C ABI for optional native plugins.
Load .dll/.so/.dylib at runtime via libloading, register JSON-wired functions, and ship a Rust cdylib demo with lib/plugin wrappers and gold coverage. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
b00b018056
commit
b0c777c480
26 files changed
+903
-26
No files matched your search
+2
-2
@@ -64,7 +64,7 @@ pub fn quote(text: &Value) -> Result<Value, String> {
|
||||
.map_err(|e| format!("json quote: {e}"))
|
||||
}
|
||||
|
||||
fn json_to_value(v: &serde_json::Value) -> Result<Value, String> {
|
||||
pub(crate) fn json_to_value(v: &serde_json::Value) -> Result<Value, String> {
|
||||
Ok(match v {
|
||||
serde_json::Value::Null => Value::None,
|
||||
serde_json::Value::Bool(b) => Value::Bool(*b),
|
||||
@@ -95,7 +95,7 @@ fn json_to_value(v: &serde_json::Value) -> Result<Value, String> {
|
||||
})
|
||||
}
|
||||
|
||||
fn value_to_json(v: &Value) -> Result<serde_json::Value, String> {
|
||||
pub(crate) fn value_to_json(v: &Value) -> Result<serde_json::Value, String> {
|
||||
Ok(match v {
|
||||
Value::None => serde_json::Value::Null,
|
||||
Value::Bool(b) => serde_json::Value::Bool(*b),
|
||||
|
||||
Reference in new issue
Block a user