Skip to content
Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
permissions: {}

env:
RUST_VERSION: "1.85.1"
RUST_VERSION: "1.87.0"
CMAKE_VERSION: "3.27.9"

jobs:
Expand All @@ -31,7 +31,7 @@ jobs:
base: ubuntu-24.04
image: ghcr.io/datadog/images-rb/engines/ruby:4.0-centos-gcc
rust_target: x86_64-unknown-linux-gnu
rust_sha256: b7202563a52b47f575b284a5a4794fafd688e39bfe8fd855b5e80129e671cb7f
rust_sha256: 1f6f18ce19387c42968a474cf175e67f99280614ded9c752d5d2e37af3204bcd
cmake_arch: x86_64
cmake_sha256: 72b01478eeb312bf1a0136208957784fe55a7b587f8d9f9142a7fc9b0b9e9a28
- ruby_platform: x86_64-linux-musl
Expand All @@ -41,7 +41,7 @@ jobs:
base: ubuntu-24.04-arm
image: ghcr.io/datadog/images-rb/engines/ruby:4.0-centos-gcc
rust_target: aarch64-unknown-linux-gnu
rust_sha256: d2609d8cd965060f0b4a8c509131066369e8d3d31a92fedce177b42b32af6b4d
rust_sha256: 2c66e31d774a0dcd4422db74584ebc6362ff3ae90c452caff9d2fb912c821e8d
cmake_arch: aarch64
cmake_sha256: 11bf3d30697df465cdf43664a9473a586f010c528376a966fd310a3a22082461
- ruby_platform: aarch64-linux-musl
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
- ruby_platform: arm64-darwin
base: macos-15
rust_target: aarch64-apple-darwin
rust_sha256: 64b0341a47e684d648c9b7defd0b7ff9d5397a64718cf803c1e114544f94bbe9
rust_sha256: 249496972e6f845f052036b9d7e73f816418412de2b266ec717b9050c1810dc3
name: Build (${{ matrix.platform.ruby_platform }})
runs-on: ${{ matrix.platform.base }}
steps:
Expand Down
10 changes: 5 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@ end
LIB_GITHUB_RELEASES = [
{
file: "libdatadog-aarch64-alpine-linux-musl.tar.gz",
sha256: "13936a53cf9baeecd91326eb6a2e0af0cb279aabfd37669680b011e185ec9766",
sha256: "d95b24f1f7c46ab4b488a4802bb17b30db133b284079b96028d4cccc08b098d1",
ruby_platform: "aarch64-linux-musl"
},
{
file: "libdatadog-aarch64-unknown-linux-gnu.tar.gz",
sha256: "135abde5bb6638ea54abf858bbff51a6f90fa3c3886da975754ae9bfaff79e83",
sha256: "662b760cc1db173737991e62e400c104eb776dd01309b8669760f6d9e7471f2e",
ruby_platform: "aarch64-linux"
},
{
file: "libdatadog-x86_64-alpine-linux-musl.tar.gz",
sha256: "fc96026961b4f4712142fc9ca0c3aa05ca77c1e2218b8409a9738c32530b8473",
sha256: "232c6704c6d11116a22f379629c462cd637f36003242e98d56f1bb691639e1a9",
ruby_platform: "x86_64-linux-musl"
},
{
file: "libdatadog-x86_64-unknown-linux-gnu.tar.gz",
sha256: "b92bea5a650152427e71bfdf07b087b0be161a3de30b8e84edcbf64c4aee9b67",
sha256: "26ea0fb1f36ed2e56afbc37e6e13853c6e3de4bba48c19d7cfb6ee85cc4eaa35",
ruby_platform: "x86_64-linux"
},
{
file: "libdatadog-aarch64-apple-darwin.tar.gz",
sha256: "90fd2d95df78425522cf3a688d2336d99fe4b5d8a3502a2d5f042a09a06deb71",
sha256: "c7e24151466daa085a1b6d2a382ce135ca905bc1d7230fb983b042d3d6e615b7",
ruby_platform: "arm64-darwin"
}
]
Expand Down
23 changes: 22 additions & 1 deletion flake.lock

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

25 changes: 19 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,30 @@

# backwards compatibility with nix-build and nix-shell
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";

# pinned, exact upstream Rust toolchains
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, flake-utils, flake-compat }:
outputs = { self, nixpkgs, flake-utils, flake-compat, rust-overlay }:
# resolve for all platforms in turn
flake-utils.lib.eachDefaultSystem (system:
let
basename = "libdatadog-rb";

# packages for this system platform
pkgs = nixpkgs.legacyPackages.${system};
# packages for this system platform, with the rust-overlay applied
pkgs = import nixpkgs {
inherit system;
overlays = [ (import rust-overlay) ];
};

# pinned Rust toolchain for building libdatadog from source; single
# source of truth is ./rust-toolchain.toml (kept in sync with the
# libdatadog toolchain and the CI `RUST_VERSION`).
rust = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;

hook = ''
# get major.minor.0 ruby version
Expand All @@ -39,9 +53,8 @@
pkgs.libyaml.dev # for gem: psych
pkgs.libffi.dev # for gem: fiddle, ffi

# for compiling libdatadog
pkgs.rustc
pkgs.cargo
# for compiling libdatadog (rustc + cargo, pinned)
rust
pkgs.cmake
pkgs.autoconf
pkgs.automake
Expand Down
2 changes: 1 addition & 1 deletion lib/libdatadog/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module Libdatadog
# Current libdatadog version
LIB_VERSION = "33.0.0"
LIB_VERSION = "35.0.0"

GEM_MAJOR_VERSION = "1"
GEM_MINOR_VERSION = "0"
Expand Down
6 changes: 6 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[toolchain]
# Rust toolchain used to build libdatadog from source. Keep the channel in sync
# with the libdatadog `rust-toolchain.toml` for the LIB_VERSION being packaged
# and with the CI `RUST_VERSION` in .github/workflows/build.yml.
channel = "1.87.0"
profile = "minimal"
Loading