From e688cbdf8e45d7d8cd081d9994ba2c4bf4d8d12b Mon Sep 17 00:00:00 2001 From: Han Date: Thu, 31 Jul 2025 23:15:43 +0800 Subject: [PATCH] Fix `ere-jolt` (#72) --- docker/base/Dockerfile.base | 12 ++++++++---- scripts/sdk_installers/install_jolt_sdk.sh | 3 +++ tests/jolt/compile/basic/src/main.rs | 5 +++++ 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 tests/jolt/compile/basic/src/main.rs diff --git a/docker/base/Dockerfile.base b/docker/base/Dockerfile.base index c7a7bd8..c5ba9f6 100644 --- a/docker/base/Dockerfile.base +++ b/docker/base/Dockerfile.base @@ -1,9 +1,13 @@ -# TODO: change to 24? -ARG UBUNTU_VERSION=22.04 +ARG UBUNTU_VERSION=24.04 FROM ubuntu:${UBUNTU_VERSION} -# Set DEBIAN_FRONTEND to noninteractive to avoid prompts during package installation -ENV DEBIAN_FRONTEND=noninteractive +# Free uid 1000 for later usage, see https://bugs.launchpad.net/cloud-images/+bug/2005129 +# for more details. +RUN userdel -r ubuntu + +# Set DEBIAN_FRONTEND to noninteractive to avoid prompts during package +# installation when building the image. +ARG DEBIAN_FRONTEND=noninteractive # Install common dependencies and build tools RUN apt-get update && \ diff --git a/scripts/sdk_installers/install_jolt_sdk.sh b/scripts/sdk_installers/install_jolt_sdk.sh index a03075b..c75376d 100644 --- a/scripts/sdk_installers/install_jolt_sdk.sh +++ b/scripts/sdk_installers/install_jolt_sdk.sh @@ -34,6 +34,9 @@ ensure_tool_installed "cargo" "to build and install Rust packages" echo "Installing Jolt CLI from GitHub repository (a16z/jolt)..." cargo +nightly install --git https://github.com/a16z/jolt --force --bins jolt +# Install Jolt's toolchain +jolt install-toolchain + # Verify Jolt installation echo "Verifying Jolt CLI installation..." if jolt --version; then diff --git a/tests/jolt/compile/basic/src/main.rs b/tests/jolt/compile/basic/src/main.rs new file mode 100644 index 0000000..000ac87 --- /dev/null +++ b/tests/jolt/compile/basic/src/main.rs @@ -0,0 +1,5 @@ +#![cfg_attr(feature = "guest", no_std)] +#![no_main] + +#[allow(unused_imports)] +use guest::*;