Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@
env:
CARGO_PROFILE_RELEASE_STRIP: 'true'
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: '1'
# jemalloc fixes its page size at build time; 64 KiB pages also run on 4 and 16 KiB kernels.
JEMALLOC_SYS_WITH_LG_PAGE: '16'
run: cargo build --release --bin flow_cli
- name: Create artifacts
run: |-
Expand Down Expand Up @@ -310,7 +312,22 @@
- run: chmod +x bin/rust-port-linux/flow
- name: Run Rust port tests
run: bin/rust-port-linux/flow dev-tools runtests
runtests_linux_arm64:
runs-on: 4-core-ubuntu-arm
needs:
- build_linux_arm64
env:
FLOW_RUNTESTS_PARALLELISM: 8
steps:
- uses: actions/checkout@v3.6.0
- uses: actions/download-artifact@v4.1.7
with:
name: build_rust_port_linux_arm64_bin
path: bin/rust-port-linux-arm64
- run: chmod +x bin/rust-port-linux-arm64/flow
- name: Run Rust port tests
run: bin/rust-port-linux-arm64/flow dev-tools runtests
runtests_macos_arm:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
runs-on: macos-15
needs:
- build_macos_arm64
Expand Down
21 changes: 21 additions & 0 deletions rust_port/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions rust_port/crates/flow_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,8 @@ lsp-types = "0.97"
serde = { version = "1.0.229", features = ["derive", "rc"] }
serde_json = { version = "1.0.154", features = ["alloc", "float_roundtrip", "raw_value", "unbounded_depth"] }

[target.'cfg(target_os = "linux")'.dependencies]
tikv-jemallocator = { version = "0.7.0", features = ["background_threads"] }

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(fbcode_build)"]}
6 changes: 6 additions & 0 deletions rust_port/crates/flow_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
#[used]
static malloc_conf: &str = "metadata_thp:always\0";

// Buck builds pick their allocator with `fbcode.default_allocator`, which replaces `malloc` for the
// whole binary, so a Rust global allocator there could link a second copy of jemalloc.
#[cfg(all(not(fbcode_build), target_os = "linux"))]
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

fn main() {
#[cfg(windows)]
{
Expand Down
Loading