Skip to content

Commit

Permalink
switch to stable rust
Browse files Browse the repository at this point in the history
Signed-off-by: chenxu <chenxu@dmetasoul.com>
  • Loading branch information
dmetasoul01 committed May 30, 2024
1 parent e902568 commit 41585be
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 147 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/consistency-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-20
toolchain: stable
default: true
- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -93,7 +93,7 @@ jobs:
with:
use-cross: true
command: build
args: '--manifest-path rust/Cargo.toml --target x86_64-unknown-linux-gnu --release --all-features'
args: '--manifest-path rust/Cargo.toml --target x86_64-unknown-linux-gnu --release'
- name: Build with Maven
run: |
mkdir -p rust/target/release
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-20
toolchain: stable
default: true
- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -37,7 +37,7 @@ jobs:
with:
use-cross: true
command: build
args: '--manifest-path rust/Cargo.toml --target x86_64-unknown-linux-gnu --release --all-features'
args: '--manifest-path rust/Cargo.toml --target x86_64-unknown-linux-gnu --release --features hdfs'
- uses: actions/upload-artifact@v4
with:
name: lakesoul-nativeio-x86_64-unknown-linux-gnu
Expand Down Expand Up @@ -65,15 +65,15 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-20
toolchain: stable
default: true
- uses: Swatinem/rust-cache@v2
with:
workspaces: "./rust -> target"
- uses: actions-rs/cargo@v1
with:
command: build
args: '--manifest-path rust/Cargo.toml --release --all-features'
args: '--manifest-path rust/Cargo.toml --release --features hdfs'
- uses: actions/upload-artifact@v4
with:
name: lakesoul-nativeio-x86_64-pc-windows-msvc
Expand Down Expand Up @@ -103,15 +103,15 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-20
toolchain: stable
default: true
- uses: Swatinem/rust-cache@v2
with:
workspaces: "./rust -> target"
- uses: actions-rs/cargo@v1
with:
command: build
args: '--manifest-path rust/Cargo.toml --release --all-features'
args: '--manifest-path rust/Cargo.toml --release --features hdfs'
- uses: actions/upload-artifact@v4
with:
name: lakesoul-nativeio-x86_64-apple-darwin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/flink-cdc-hdfs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-20
toolchain: stable
default: true
- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -85,7 +85,7 @@ jobs:
with:
use-cross: true
command: build
args: '--manifest-path rust/Cargo.toml --target x86_64-unknown-linux-gnu --release --all-features'
args: '--manifest-path rust/Cargo.toml --target x86_64-unknown-linux-gnu --release --features hdfs'
- name: Build with Maven
run: |
mkdir -p rust/target/release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/flink-cdc-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-20
toolchain: stable
default: true
- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -87,7 +87,7 @@ jobs:
with:
use-cross: true
command: build
args: '--manifest-path rust/Cargo.toml --target x86_64-unknown-linux-gnu --release --all-features'
args: '--manifest-path rust/Cargo.toml --target x86_64-unknown-linux-gnu --release'
- name: Build with Maven
run: |
mkdir -p rust/target/release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/maven-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-20
toolchain: stable
default: true
- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -56,7 +56,7 @@ jobs:
with:
use-cross: true
command: build
args: '--manifest-path rust/Cargo.toml --target x86_64-unknown-linux-gnu --release --all-features'
args: '--manifest-path rust/Cargo.toml --target x86_64-unknown-linux-gnu --release'
- uses: actions/upload-artifact@v4
with:
name: lakesoul-nativeio-x86_64-unknown-linux-gnu-maven-test
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/native-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-20
toolchain: stable
default: true
- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -50,7 +50,7 @@ jobs:
with:
use-cross: true
command: build
args: '--manifest-path rust/Cargo.toml --target x86_64-unknown-linux-gnu --release --all-features'
args: '--manifest-path rust/Cargo.toml --target x86_64-unknown-linux-gnu --release --features hdfs'
- uses: actions/upload-artifact@v4
with:
name: lakesoul-nativeio-x86_64-unknown-linux-gnu
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-20
toolchain: stable
default: true
- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -87,7 +87,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: build
args: '--manifest-path rust/Cargo.toml --release --all-features'
args: '--manifest-path rust/Cargo.toml --release --features hdfs'
- uses: actions/upload-artifact@v4
with:
name: lakesoul-nativeio-x86_64-pc-windows-msvc
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-20
toolchain: stable
default: true
- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -126,7 +126,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: build
args: '--manifest-path rust/Cargo.toml --release --all-features'
args: '--manifest-path rust/Cargo.toml --release --features hdfs'
- uses: actions/upload-artifact@v4
with:
name: lakesoul-nativeio-x86_64-apple-darwin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/presto-cdc-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-20
toolchain: stable
default: true
- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -87,7 +87,7 @@ jobs:
with:
use-cross: true
command: build
args: '--manifest-path rust/Cargo.toml --target x86_64-unknown-linux-gnu --release --all-features'
args: '--manifest-path rust/Cargo.toml --target x86_64-unknown-linux-gnu --release'
- name: Build with Maven
run: |
mkdir -p rust/target/release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-05-20
toolchain: stable
components: clippy
default: true
- name: Install Protoc
Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions rust/Cross.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
image = "dmetasoul/lakesoul-cross:v1.0.0"

[target.aarch64-unknown-linux-gnu]
image.name = "dmetasoul/lakesoul-cross:v1.0.0-aarch64"
image.toolchain = ["aarch64-unknown-linux-gnu"]
image = "dmetasoul/lakesoul-cross:v1.0.0-aarch64"
4 changes: 4 additions & 0 deletions rust/lakesoul-io-c/lakesoul_c_bindings.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ struct IOConfigBuilder {
uint8_t private_[0];
};

using c_ptrdiff_t = intptr_t;

using c_size_t = uintptr_t;

struct IOConfig {
uint8_t private_[0];
};
Expand Down
5 changes: 3 additions & 2 deletions rust/lakesoul-io-c/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
// SPDX-License-Identifier: Apache-2.0

#![allow(clippy::not_unsafe_ptr_arg_deref)]
#![feature(c_size_t)]
extern crate core;

use core::ffi::{c_ptrdiff_t, c_size_t};
use std::ffi::{c_char, c_int, c_uchar, c_void, CStr, CString};
use std::io::Write;
use std::ptr::NonNull;
Expand All @@ -29,6 +27,9 @@ use lakesoul_io::lakesoul_reader::{LakeSoulReader, RecordBatch, Result, SyncSend
use lakesoul_io::lakesoul_writer::SyncSendableMutableLakeSoulWriter;
use log::debug;

pub type c_size_t = usize;
pub type c_ptrdiff_t = isize;

#[repr(C)]
pub struct CResult<OpaqueT> {
ptr: *mut OpaqueT,
Expand Down
4 changes: 2 additions & 2 deletions rust/lakesoul-metadata-c/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
//
// SPDX-License-Identifier: Apache-2.0

#![feature(c_size_t)]
#![allow(clippy::not_unsafe_ptr_arg_deref)]
extern crate core;

use core::ffi::c_ptrdiff_t;
use std::collections::HashMap;
use std::ffi::{c_char, c_uchar, CStr, CString};
use std::io::Write;
Expand All @@ -21,6 +19,8 @@ use lakesoul_metadata::error::LakeSoulMetaDataError;
use lakesoul_metadata::transfusion::SplitDesc;
use proto::proto::entity;

pub type c_ptrdiff_t = isize;

#[repr(C)]
pub struct CResult<OpaqueT> {
ptr: *mut OpaqueT,
Expand Down

0 comments on commit 41585be

Please sign in to comment.