Skip to content

Commit

Permalink
Update rust
Browse files Browse the repository at this point in the history
  • Loading branch information
lixueclaire committed Sep 26, 2023
1 parent 92066f9 commit a376717
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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']
6 changes: 3 additions & 3 deletions rust/grin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions rust/grin_demo_storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion rust/grin_demo_storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit a376717

Please sign in to comment.