Skip to content

Commit 032d73e

Browse files
Update to rust 1.84 (#1796)
Some Soroban dependencies require rust version >= 1.84 --------- Signed-off-by: salaheldinsoliman <salaheldin_sameh@aucegypt.edu>
1 parent b87a7f0 commit 032d73e

File tree

7 files changed

+21
-20
lines changed

7 files changed

+21
-20
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
uses: actions/checkout@v4
1616
with:
1717
submodules: recursive
18-
- uses: dtolnay/rust-toolchain@1.82.0
18+
- uses: dtolnay/rust-toolchain@1.84.0
1919
- name: Build
2020
run: cargo build --verbose --release
2121
- name: Run tests
@@ -41,7 +41,7 @@ jobs:
4141
run: |
4242
sudo apt-get update
4343
sudo apt-get install -y gcc g++ make
44-
- uses: dtolnay/rust-toolchain@1.82.0
44+
- uses: dtolnay/rust-toolchain@1.84.0
4545
- name: Get LLVM
4646
run: curl -sSL --output llvm16.0-linux-arm64.tar.xz https://github.com/hyperledger-solang/solang-llvm/releases/download/llvm16-0/llvm16.0-linux-arm64.tar.xz
4747
- name: Extract LLVM
@@ -74,7 +74,7 @@ jobs:
7474
run: unzip c:\llvm.zip -d c:/
7575
- name: Add LLVM to Path
7676
run: echo "c:\llvm16.0\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
77-
- uses: dtolnay/rust-toolchain@1.82.0
77+
- uses: dtolnay/rust-toolchain@1.84.0
7878
with:
7979
components: clippy
8080
- name: Build
@@ -97,7 +97,7 @@ jobs:
9797
uses: actions/checkout@v4
9898
with:
9999
submodules: recursive
100-
- uses: dtolnay/rust-toolchain@1.82.0
100+
- uses: dtolnay/rust-toolchain@1.84.0
101101
- name: Get LLVM
102102
run: curl -sSL --output llvm16.0-mac-arm.tar.xz https://github.com/hyperledger-solang/solang-llvm/releases/download/llvm16-0/llvm16.0-mac-arm.tar.xz
103103
- name: Extract LLVM
@@ -124,7 +124,7 @@ jobs:
124124
uses: actions/checkout@v4
125125
with:
126126
submodules: recursive
127-
- uses: dtolnay/rust-toolchain@1.82.0
127+
- uses: dtolnay/rust-toolchain@1.84.0
128128
- name: Get LLVM
129129
run: wget -q -O llvm16.0-mac-intel.tar.xz https://github.com/hyperledger-solang/solang-llvm/releases/download/llvm16-0/llvm16.0-mac-intel.tar.xz
130130
- name: Extract LLVM

.github/workflows/test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- name: Install Rust
5252
uses: dtolnay/rust-toolchain@master
5353
with:
54-
toolchain: 1.82.0
54+
toolchain: 1.84.0
5555
components: |
5656
llvm-tools
5757
clippy
@@ -108,7 +108,7 @@ jobs:
108108
run: |
109109
sudo apt-get update
110110
sudo apt-get install -y gcc g++ make
111-
- uses: dtolnay/rust-toolchain@1.82.0
111+
- uses: dtolnay/rust-toolchain@1.84.0
112112
- name: Get LLVM
113113
run: curl -sSL --output llvm16.0-linux-arm64.tar.xz https://github.com/hyperledger-solang/solang-llvm/releases/download/llvm16-0/llvm16.0-linux-arm64.tar.xz
114114
- name: Extract LLVM
@@ -141,7 +141,7 @@ jobs:
141141
# Use C:\ as D:\ might run out of space
142142
- name: "Use C: for rust temporary files"
143143
run: echo "CARGO_TARGET_DIR=C:\target" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
144-
- uses: dtolnay/rust-toolchain@1.82.0
144+
- uses: dtolnay/rust-toolchain@1.84.0
145145
with:
146146
components: clippy
147147
# We run clippy on Linux in the lint job above, but this does not check #[cfg(windows)] items
@@ -167,7 +167,7 @@ jobs:
167167
uses: actions/checkout@v4
168168
with:
169169
submodules: recursive
170-
- uses: dtolnay/rust-toolchain@1.82.0
170+
- uses: dtolnay/rust-toolchain@1.84.0
171171
- name: Get LLVM
172172
run: curl -sSL --output llvm16.0-mac-arm.tar.xz https://github.com/hyperledger-solang/solang-llvm/releases/download/llvm16-0/llvm16.0-mac-arm.tar.xz
173173
- name: Extract LLVM
@@ -193,7 +193,7 @@ jobs:
193193
uses: actions/checkout@v4
194194
with:
195195
submodules: recursive
196-
- uses: dtolnay/rust-toolchain@1.82.0
196+
- uses: dtolnay/rust-toolchain@1.84.0
197197
- name: Get LLVM
198198
run: wget -q -O llvm16.0-mac-intel.tar.xz https://github.com/hyperledger-solang/solang-llvm/releases/download/llvm16-0/llvm16.0-mac-intel.tar.xz
199199
- name: Extract LLVM
@@ -255,7 +255,7 @@ jobs:
255255
- uses: actions/setup-node@v4
256256
with:
257257
node-version: '16'
258-
- uses: dtolnay/rust-toolchain@1.82.0
258+
- uses: dtolnay/rust-toolchain@1.84.0
259259
- name: Setup yarn
260260
run: npm install -g yarn
261261
- uses: actions/download-artifact@v4.1.8
@@ -306,7 +306,7 @@ jobs:
306306
- uses: actions/setup-node@v4
307307
with:
308308
node-version: '16'
309-
- uses: dtolnay/rust-toolchain@1.82.0
309+
- uses: dtolnay/rust-toolchain@1.84.0
310310
with:
311311
target: wasm32-unknown-unknown
312312
- uses: actions/download-artifact@v4.1.8
@@ -353,7 +353,7 @@ jobs:
353353
- uses: actions/setup-node@v4
354354
with:
355355
node-version: '16'
356-
- uses: dtolnay/rust-toolchain@1.82.0
356+
- uses: dtolnay/rust-toolchain@1.84.0
357357
- uses: actions/download-artifact@v4.1.8
358358
with:
359359
name: solang-linux-x86-64
@@ -530,7 +530,7 @@ jobs:
530530
- name: Install Rust
531531
uses: dtolnay/rust-toolchain@master
532532
with:
533-
toolchain: 1.82.0
533+
toolchain: 1.84.0
534534
components: llvm-tools
535535
- name: Install cargo-llvm-cov
536536
uses: taiki-e/install-action@cargo-llvm-cov

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license = "Apache-2.0"
88
build = "build.rs"
99
description = "Solang Solidity Compiler"
1010
keywords = [ "solidity", "compiler", "solana", "polkadot", "substrate" ]
11-
rust-version = "1.82.0"
11+
rust-version = "1.84.0"
1212
edition = "2021"
1313
exclude = [ "/.*", "/docs", "/examples", "/solana-library", "/tests", "/integration", "/vscode", "/testdata" ]
1414

@@ -33,7 +33,7 @@ blake2-rfc = "0.2.18"
3333
handlebars = "5.1"
3434
contract-metadata = "4.0.2"
3535
semver = { version = "1.0", features = ["serde"] }
36-
tempfile = "3.10"
36+
tempfile = "3.20.0"
3737
libc = { version = "0.2", optional = true }
3838
tower-lsp = { version = "0.20", optional = true }
3939
tokio = { version = "1.27", features = ["rt", "io-std", "macros"], optional = true }

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ COPY . src
44
WORKDIR /src/stdlib/
55
RUN make
66

7-
RUN rustup default 1.82.0
7+
RUN rustup default 1.84.0
88

99
WORKDIR /src
1010
RUN cargo build --release

docs/installing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Option 5: Build Solang from source
8989

9090
In order to build Solang from source, you will need:
9191

92-
* Rust version 1.82.0 or higher
92+
* Rust version 1.84.0 or higher
9393
* A C++ compiler with support for C++17
9494
* A build of LLVM based on the Solana LLVM tree. There are a few LLVM patches required that are not upstream yet.
9595

solang-parser/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ mod tests;
2323
clippy::needless_lifetimes,
2424
clippy::type_complexity,
2525
clippy::ptr_arg,
26-
clippy::just_underscores_and_digits
26+
clippy::just_underscores_and_digits,
27+
clippy::empty_line_after_outer_attr
2728
)]
2829
mod solidity {
2930
include!(concat!(env!("OUT_DIR"), "/solidity.rs"));

src/emit/binary.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ impl<'a> Binary<'a> {
254254

255255
#[cfg(feature = "wasm_opt")]
256256
if let Some(level) = self.options.wasm_opt.filter(|_| self.target.is_polkadot()) {
257-
let mut infile = tempdir().map_err(|e| e.to_string())?.into_path();
257+
let mut infile = tempdir().map_err(|e| e.to_string())?.keep();
258258
infile.push("code.wasm");
259259
let outfile = infile.with_extension("wasmopt");
260260
std::fs::write(&infile, &code).map_err(|e| e.to_string())?;

0 commit comments

Comments
 (0)