fix C API naming

main
Ziyang Hu 2 years ago
parent 1e75972674
commit 29efea45f3

@ -107,8 +107,8 @@ char *cozo_restore(int32_t db_id,
*
* Returns a UTF-8-encoded C-string indicating the result that **must** be freed with `cozo_free_str`.
*/
char *import_from_backup(int32_t db_id,
const char *json_payload);
char *cozo_import_from_backup(int32_t db_id,
const char *json_payload);
/**
* Free any C-string returned from the Cozo C API.

@ -279,7 +279,7 @@ pub unsafe extern "C" fn cozo_restore(db_id: i32, in_path: *const c_char) -> *mu
/// `json_payload`: a UTF-8 encoded JSON payload: `{"path": ..., "relations": [...]}`
///
/// Returns a UTF-8-encoded C-string indicating the result that **must** be freed with `cozo_free_str`.
pub unsafe extern "C" fn import_from_backup(
pub unsafe extern "C" fn cozo_import_from_backup(
db_id: i32,
json_payload: *const c_char,
) -> *mut c_char {

@ -41,4 +41,6 @@ cd cozo-lib-wasm
CARGO_PROFILE_RELEASE_LTO=fat ./build.sh
cd ..
cp cozo-lib-c/cozo_c.h release/
zip release/cozo_wasm-$VERSION-wasm32-unknown-unknown.zip $(find cozo-lib-wasm/pkg)
Loading…
Cancel
Save