From a3767174706c01599bd92a2a441947dfe5694b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=89=E7=90=86?= Date: Tue, 26 Sep 2023 14:42:18 +0800 Subject: [PATCH] Update rust --- rust/Cargo.toml | 1 + rust/grin.rs | 6 +++--- rust/grin_demo_storage.h | 4 ++-- rust/grin_demo_storage.rs | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index bcae34a..35a6e82 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -62,3 +62,4 @@ grin_trait_loose_schema = [] grin_features_enable_v6d = ['grin_assume_has_directed_graph', 'grin_assume_has_undirected_graph', 'grin_assume_has_multi_edge_graph', 'grin_enable_vertex_list', 'grin_enable_vertex_list_array', 'grin_enable_vertex_list_iterator', 'grin_enable_adjacent_list', 'grin_enable_adjacent_list_array', 'grin_enable_adjacent_list_iterator', 'grin_enable_graph_partition', 'grin_trait_natural_id_for_partition', 'grin_enable_vertex_ref', 'grin_trait_fast_vertex_ref', 'grin_trait_select_master_for_vertex_list', 'grin_enable_row', 'grin_with_vertex_property', 'grin_with_vertex_property_name', 'grin_with_vertex_type_name', 'grin_trait_natural_id_for_vertex_type', 'grin_trait_natural_id_for_vertex_property', 'grin_with_edge_property', 'grin_with_edge_property_name', 'grin_with_edge_type_name', 'grin_trait_natural_id_for_edge_type', 'grin_trait_natural_id_for_edge_property', 'grin_enable_vertex_primary_keys', 'grin_enable_vertex_internal_id_index', 'grin_enable_vertex_pk_index', 'grin_enable_vertex_external_id_of_int64'] grin_features_enable_gart = ['grin_assume_has_directed_graph', 'grin_assume_has_undirected_graph', 'grin_assume_has_multi_edge_graph', 'grin_enable_vertex_list', 'grin_enable_vertex_list_iterator', 'grin_enable_adjacent_list', 'grin_enable_adjacent_list_iterator', 'grin_enable_graph_partition', 'grin_trait_natural_id_for_partition', 'grin_enable_vertex_ref', 'grin_trait_fast_vertex_ref', 'grin_trait_select_master_for_vertex_list', 'grin_enable_row', 'grin_with_vertex_property', 'grin_with_vertex_property_name', 'grin_with_vertex_type_name', 'grin_trait_natural_id_for_vertex_type', 'grin_trait_natural_id_for_vertex_property', 'grin_with_edge_property', 'grin_with_edge_property_name', 'grin_with_edge_type_name', 'grin_trait_natural_id_for_edge_type', 'grin_trait_natural_id_for_edge_property', 'grin_trait_const_value_ptr', 'grin_enable_vertex_internal_id_index', 'grin_enable_vertex_external_id_of_int64'] grin_features_enable_graphar = ['grin_assume_has_directed_graph', 'grin_assume_has_multi_edge_graph', 'grin_enable_vertex_list', 'grin_enable_vertex_list_array', 'grin_enable_vertex_list_iterator', 'grin_enable_edge_list', 'grin_enable_edge_list_iterator', 'grin_enable_adjacent_list', 'grin_enable_adjacent_list_iterator', 'grin_enable_graph_partition', 'grin_trait_natural_id_for_partition', 'grin_enable_vertex_ref', 'grin_trait_fast_vertex_ref', 'grin_trait_master_vertex_mirror_partition_list', 'grin_trait_mirror_vertex_mirror_partition_list', 'grin_trait_select_master_for_vertex_list', 'grin_trait_select_partition_for_vertex_list', 'grin_enable_row', 'grin_with_vertex_property', 'grin_with_vertex_property_name', 'grin_with_vertex_type_name', 'grin_trait_natural_id_for_vertex_type', 'grin_enable_vertex_primary_keys', 'grin_trait_natural_id_for_vertex_property', 'grin_with_edge_property', 'grin_with_edge_property_name', 'grin_with_edge_type_name', 'grin_trait_natural_id_for_edge_type', 'grin_trait_natural_id_for_edge_property', 'grin_assume_all_vertex_list_sorted', 'grin_enable_vertex_internal_id_index'] +grin_features_enable_demo_storage = ['grin_assume_has_undirected_graph', 'grin_assume_has_multi_edge_graph', 'grin_with_vertex_data', 'grin_with_edge_data', 'grin_enable_vertex_list', 'grin_enable_vertex_list_array', 'grin_enable_vertex_list_iterator', 'grin_enable_edge_list', 'grin_enable_edge_list_array', 'grin_enable_edge_list_iterator', 'grin_enable_adjacent_list', 'grin_enable_adjacent_list_array', 'grin_enable_adjacent_list_iterator', 'grin_enable_graph_partition', 'grin_trait_natural_id_for_partition', 'grin_enable_vertex_ref', 'grin_trait_fast_vertex_ref', 'grin_enable_edge_ref', 'grin_trait_master_vertex_mirror_partition_list', 'grin_trait_mirror_vertex_mirror_partition_list', 'grin_trait_master_edge_mirror_partition_list', 'grin_trait_mirror_edge_mirror_partition_list', 'grin_trait_select_master_for_vertex_list', 'grin_trait_select_partition_for_vertex_list', 'grin_trait_select_master_for_edge_list', 'grin_trait_select_partition_for_edge_list', 'grin_trait_select_master_neighbor_for_adjacent_list', 'grin_trait_select_neighbor_partition_for_adjacent_list', 'grin_enable_row', 'grin_trait_const_value_ptr', 'grin_with_vertex_property', 'grin_with_vertex_property_name', 'grin_with_vertex_type_name', 'grin_trait_natural_id_for_vertex_type', 'grin_enable_vertex_primary_keys', 'grin_trait_natural_id_for_vertex_property', 'grin_with_edge_property', 'grin_with_edge_property_name', 'grin_with_edge_type_name', 'grin_trait_natural_id_for_edge_type', 'grin_enable_edge_primary_keys', 'grin_trait_natural_id_for_edge_property', 'grin_assume_all_vertex_list_sorted', 'grin_enable_vertex_internal_id_index', 'grin_enable_vertex_external_id_of_int64', 'grin_enable_vertex_external_id_of_string', 'grin_enable_vertex_pk_index', 'grin_enable_edge_pk_index'] diff --git a/rust/grin.rs b/rust/grin.rs index a9ddcbe..efad953 100644 --- a/rust/grin.rs +++ b/rust/grin.rs @@ -236,7 +236,7 @@ cfg_if::cfg_if! { pub const GRIN_NULL_EDGE_PROPERTY_ID: GrinEdgePropertyId = u32::MAX; pub const GRIN_NULL_ROW: GrinRow = std::ptr::null_mut(); pub const GRIN_NULL_SIZE: u32 = u32::MAX; - } elif #[cfg(feature = "grin_features_enable_demo_storage")]{ + } else if #[cfg(feature = "grin_features_enable_demo_storage")]{ pub type GrinGraph = *mut ::std::os::raw::c_void; pub type GrinVertex = i64; pub type GrinEdge = i64; @@ -293,12 +293,12 @@ cfg_if::cfg_if! { pub const GRIN_NULL_VERTEX_PROPERTY_ID: GrinVertexPropertyId = u32::MAX; pub const GRIN_NULL_EDGE_TYPE: GrinEdgeType = u32::MAX; pub const GRIN_NULL_EDGE_TYPE_LIST: GrinEdgeTypeList = std::ptr::null_mut(); - pub const GRIN_NULL_VEV_TYPE: GrinVevType = u32::MAX; - pub const GRIN_NULL_VEV_TYPE_LIST: GrinVevTypeList = std::ptr::null_mut(); pub const GRIN_NULL_EDGE_PROPERTY: GrinEdgeProperty = u32::MAX; pub const GRIN_NULL_EDGE_PROPERTY_LIST: GrinEdgePropertyList = std::ptr::null_mut(); pub const GRIN_NULL_EDGE_TYPE_ID: GrinEdgeTypeId = u32::MAX; pub const GRIN_NULL_EDGE_PROPERTY_ID: GrinEdgePropertyId = u32::MAX; + pub const GRIN_NULL_EDGE_LABEL: GrinLabel = u32::MAX; + pub const GRIN_NULL_EDGE_LABEL_LIST: GrinLabelList = std::ptr::null_mut(); pub const GRIN_NULL_ROW: GrinRow = std::ptr::null_mut(); pub const GRIN_NULL_SIZE: u32 = u32::MAX; } else { diff --git a/rust/grin_demo_storage.h b/rust/grin_demo_storage.h index f6b6c9a..e20b050 100644 --- a/rust/grin_demo_storage.h +++ b/rust/grin_demo_storage.h @@ -31,12 +31,12 @@ /// RUST_KEEP pub const GRIN_NULL_VERTEX_PROPERTY_ID: GrinVertexPropertyId = u32::MAX; /// RUST_KEEP pub const GRIN_NULL_EDGE_TYPE: GrinEdgeType = u32::MAX; /// RUST_KEEP pub const GRIN_NULL_EDGE_TYPE_LIST: GrinEdgeTypeList = std::ptr::null_mut(); -/// RUST_KEEP pub const GRIN_NULL_VEV_TYPE: GrinVevType = u32::MAX; -/// RUST_KEEP pub const GRIN_NULL_VEV_TYPE_LIST: GrinVevTypeList = std::ptr::null_mut(); /// RUST_KEEP pub const GRIN_NULL_EDGE_PROPERTY: GrinEdgeProperty = u32::MAX; /// RUST_KEEP pub const GRIN_NULL_EDGE_PROPERTY_LIST: GrinEdgePropertyList = std::ptr::null_mut(); /// RUST_KEEP pub const GRIN_NULL_EDGE_TYPE_ID: GrinEdgeTypeId = u32::MAX; /// RUST_KEEP pub const GRIN_NULL_EDGE_PROPERTY_ID: GrinEdgePropertyId = u32::MAX; +/// RUST_KEEP pub const GRIN_NULL_EDGE_LABEL: GrinLabel = u32::MAX; +/// RUST_KEEP pub const GRIN_NULL_EDGE_LABEL_LIST: GrinLabelList = std::ptr::null_mut(); /// RUST_KEEP pub const GRIN_NULL_ROW: GrinRow = std::ptr::null_mut(); /// RUST_KEEP pub const GRIN_NULL_SIZE: u32 = u32::MAX; int __rust_keep_grin_null; diff --git a/rust/grin_demo_storage.rs b/rust/grin_demo_storage.rs index c14573d..633186c 100644 --- a/rust/grin_demo_storage.rs +++ b/rust/grin_demo_storage.rs @@ -82,6 +82,6 @@ pub type GRIN_EDGE_TYPE_ID = ::std::os::raw::c_uint; pub type GRIN_EDGE_PROPERTY_ID = ::std::os::raw::c_uint; pub type GRIN_ROW = *mut ::std::os::raw::c_void; extern "C" { - #[doc = " GRIN_FEATURES_ENABLE_DEMOSTORAGE\n RUST_KEEP pub const GRIN_NULL_DATATYPE: GrinDatatype = GRIN_DATATYPE_UNDEFINED;\n RUST_KEEP pub const GRIN_NULL_GRAPH: GrinGraph = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_VERTEX: GrinVertex = -1;\n RUST_KEEP pub const GRIN_NULL_EDGE: GrinEdge = -1;\n RUST_KEEP pub const GRIN_NULL_VERTEX_DATA: GrinVertexData = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_VERTEX_LIST: GrinVertexList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_VERTEX_LIST_ITERATOR: GrinVertexListIterator = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_ADJACENT_LIST: GrinAdjacentList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_ADJACENT_LIST_ITERATOR: GrinAdjacentListIterator = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_EDGE_DATA: GrinEdgeData = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_EDGE_LIST: GrinEdgeList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_EDGE_LIST_ITERATOR: GrinEdgeListIterator = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_PARTITIONED_GRAPH: GrinPartitionedGraph = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_PARTITION: GrinPartition = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_PARTITION_LIST: GrinPartitionList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_PARTITION_ID: GrinPartitionId = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_VERTEX_REF: GrinVertexRef = -1;\n RUST_KEEP pub const GRIN_NULL_EDGE_REF: GrinEdgeRef = -1;\n RUST_KEEP pub const GRIN_NULL_VERTEX_TYPE: GrinVertexType = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_VERTEX_TYPE_LIST: GrinVertexTypeList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_VERTEX_PROPERTY: GrinVertexProperty = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_VERTEX_PROPERTY_LIST: GrinVertexPropertyList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_VERTEX_TYPE_ID: GrinVertexTypeId = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_VERTEX_PROPERTY_ID: GrinVertexPropertyId = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_EDGE_TYPE: GrinEdgeType = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_EDGE_TYPE_LIST: GrinEdgeTypeList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_VEV_TYPE: GrinVevType = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_VEV_TYPE_LIST: GrinVevTypeList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_EDGE_PROPERTY: GrinEdgeProperty = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_EDGE_PROPERTY_LIST: GrinEdgePropertyList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_EDGE_TYPE_ID: GrinEdgeTypeId = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_EDGE_PROPERTY_ID: GrinEdgePropertyId = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_ROW: GrinRow = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_SIZE: u32 = u32::MAX;"] + #[doc = " GRIN_FEATURES_ENABLE_DEMOSTORAGE\n RUST_KEEP pub const GRIN_NULL_DATATYPE: GrinDatatype = GRIN_DATATYPE_UNDEFINED;\n RUST_KEEP pub const GRIN_NULL_GRAPH: GrinGraph = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_VERTEX: GrinVertex = -1;\n RUST_KEEP pub const GRIN_NULL_EDGE: GrinEdge = -1;\n RUST_KEEP pub const GRIN_NULL_VERTEX_DATA: GrinVertexData = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_VERTEX_LIST: GrinVertexList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_VERTEX_LIST_ITERATOR: GrinVertexListIterator = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_ADJACENT_LIST: GrinAdjacentList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_ADJACENT_LIST_ITERATOR: GrinAdjacentListIterator = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_EDGE_DATA: GrinEdgeData = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_EDGE_LIST: GrinEdgeList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_EDGE_LIST_ITERATOR: GrinEdgeListIterator = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_PARTITIONED_GRAPH: GrinPartitionedGraph = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_PARTITION: GrinPartition = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_PARTITION_LIST: GrinPartitionList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_PARTITION_ID: GrinPartitionId = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_VERTEX_REF: GrinVertexRef = -1;\n RUST_KEEP pub const GRIN_NULL_EDGE_REF: GrinEdgeRef = -1;\n RUST_KEEP pub const GRIN_NULL_VERTEX_TYPE: GrinVertexType = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_VERTEX_TYPE_LIST: GrinVertexTypeList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_VERTEX_PROPERTY: GrinVertexProperty = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_VERTEX_PROPERTY_LIST: GrinVertexPropertyList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_VERTEX_TYPE_ID: GrinVertexTypeId = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_VERTEX_PROPERTY_ID: GrinVertexPropertyId = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_EDGE_TYPE: GrinEdgeType = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_EDGE_TYPE_LIST: GrinEdgeTypeList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_EDGE_PROPERTY: GrinEdgeProperty = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_EDGE_PROPERTY_LIST: GrinEdgePropertyList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_EDGE_TYPE_ID: GrinEdgeTypeId = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_EDGE_PROPERTY_ID: GrinEdgePropertyId = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_EDGE_LABEL: GrinLabel = u32::MAX;\n RUST_KEEP pub const GRIN_NULL_EDGE_LABEL_LIST: GrinLabelList = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_ROW: GrinRow = std::ptr::null_mut();\n RUST_KEEP pub const GRIN_NULL_SIZE: u32 = u32::MAX;"] pub static mut __rust_keep_grin_null: ::std::os::raw::c_int; }