Skip to content

Commit

Permalink
Merge pull request #1137 from Concordium/update-rust-1.73
Browse files Browse the repository at this point in the history
Support Rust 1.73 on Windows.
  • Loading branch information
td202 committed Apr 9, 2024
2 parents c3cecb7 + 8dab3be commit 9c46f15
Show file tree
Hide file tree
Showing 18 changed files with 515 additions and 501 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ jobs:
strategy:
matrix:
plan:
- rust: 1.68
- rust: 1.73
ghc: 9.6.4

steps:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Add support for new `invoke` calls from smart contracts in protocol version 7:
- query the contract module reference for a given contract address
- query the contract name for a given contract address
- Update Rust version to 1.73.

## 6.3.0

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ issues.

## Rust workflow

We use **stable version** of rust, 1.68, to compile the code.
We use **stable version** of rust, 1.73, to compile the code.

The CI is configured to check two things
- the [clippy](https://github.com/rust-lang/rust-clippy) tool is run to check
Expand Down
2 changes: 1 addition & 1 deletion concordium-base
Submodule concordium-base updated 54 files
+1 −1 .github/workflows/build-test-contracts-common.yaml
+1 −1 .github/workflows/build-test-smart-contracts.yaml
+5 −4 .github/workflows/build-test-sources.yaml
+2 −2 README.md
+21 −2 Setup.hs
+0 −63 haskell-src/Concordium/Types/Accounts.hs
+0 −42 haskell-src/Concordium/Types/Migration.hs
+73 −16 identity-provider-service/Cargo.lock
+2 −2 identity-provider-service/Cargo.toml
+71 −14 idiss/Cargo.lock
+2 −2 idiss/Cargo.toml
+1 −1 idiss/README.md
+72 −27 mobile_wallet/Cargo.lock
+3 −3 mobile_wallet/Cargo.toml
+63 −6 rust-bins/Cargo.lock
+2 −3 rust-bins/src/bin/trace_account.rs
+222 −69 rust-src/Cargo.lock
+12 −0 rust-src/concordium_base/CHANGELOG.md
+4 −4 rust-src/concordium_base/Cargo.toml
+1 −1 rust-src/concordium_base/benches/bulletproofs.rs
+1 −5 rust-src/concordium_base/benches/elgamal_benchmarks.rs
+1 −4 rust-src/concordium_base/src/aggregate_sig/ffi.rs
+3 −3 rust-src/concordium_base/src/aggregate_sig/mod.rs
+28 −14 rust-src/concordium_base/src/base.rs
+18 −32 rust-src/concordium_base/src/cis2_types.rs
+13 −13 rust-src/concordium_base/src/cis4_types.rs
+1 −2 rust-src/concordium_base/src/common/impls.rs
+3 −0 rust-src/concordium_base/src/ffi_helpers/ffi_macros.rs
+1 −2 rust-src/concordium_base/src/id/ffi.rs
+13 −13 rust-src/concordium_base/src/id/id_proof_types.rs
+2 −2 rust-src/concordium_base/src/transactions.rs
+8 −8 rust-src/concordium_base/src/web3id/mod.rs
+1 −0 rust-src/wallet_library/CHANGELOG.md
+3 −1 rust-src/wallet_library/Cargo.toml
+85 −0 rust-src/wallet_library/src/default_wallet_config.rs
+2 −0 rust-src/wallet_library/src/lib.rs
+11 −0 rust-src/wallet_library/src/proofs.rs
+403 −0 rust-src/wallet_library/src/statement.rs
+4 −0 smart-contracts/contracts-common/concordium-contracts-common-derive/CHANGELOG.md
+2 −2 smart-contracts/contracts-common/concordium-contracts-common-derive/Cargo.toml
+1 −1 smart-contracts/contracts-common/concordium-contracts-common-derive/src/attribute.rs
+3 −1 smart-contracts/contracts-common/concordium-contracts-common-derive/src/derive.rs
+7 −1 smart-contracts/contracts-common/concordium-contracts-common/CHANGELOG.md
+4 −4 smart-contracts/contracts-common/concordium-contracts-common/Cargo.toml
+3 −12 smart-contracts/contracts-common/concordium-contracts-common/src/impls.rs
+1 −1 smart-contracts/contracts-common/concordium-contracts-common/src/schema.rs
+195 −24 smart-contracts/contracts-common/concordium-contracts-common/src/types.rs
+6 −1 smart-contracts/wasm-chain-integration/CHANGELOG.md
+15 −72 smart-contracts/wasm-chain-integration/Cargo.lock
+1 −1 smart-contracts/wasm-chain-integration/Cargo.toml
+10 −25 smart-contracts/wasm-chain-integration/benches/wasm.rs
+91 −43 smart-contracts/wasm-chain-integration/src/utils.rs
+1 −1 smart-contracts/wasm-chain-integration/src/v1/mod.rs
+70 −13 smart-contracts/wasm-test/Cargo.lock
24 changes: 22 additions & 2 deletions concordium-consensus/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ makeRust args flags = do
Windows -> do
notice verbosity "Copying concordium_smart_contract_engine library"
rawSystemExit verbosity "cp" ["-u", smartContractRoot ++ "/wasm-chain-integration/target/release/concordium_smart_contract_engine.dll", smartContractRoot ++ "/lib/"]
rawSystemExit verbosity "cp" ["-u", smartContractRoot ++ "/wasm-chain-integration/target/release/libconcordium_smart_contract_engine.a", smartContractRoot ++ "/lib/"]
-- We remove the static library if it exists. Previously, it would have been copied
-- over, but now we want to just link with the dynamic library, so we ensure it is
-- removed.
rawSystemExit verbosity "rm" ["-f", smartContractRoot ++ "/lib/libconcordium_smart_contract_engine.a"]
_ -> do
rawSystemExit verbosity "ln" ["-s", "-f", "../wasm-chain-integration/target/release/libconcordium_smart_contract_engine.a", smartContractRoot ++ "/lib/"]
case buildOS of
Expand All @@ -37,8 +40,25 @@ makeRust args flags = do
rawSystemExit verbosity "ln" ["-s", "-f", "../wasm-chain-integration/target/release/libconcordium_smart_contract_engine.so", smartContractRoot ++ "/lib/libconcordium_smart_contract_engine.so"]
return emptyHookedBuildInfo

-- | On Windows, copy the DLL files to the binary install directory. This is to ensure that they
-- are accessible when running the binaries, tests and benchmarks.
copyDlls :: Args -> CopyFlags -> PackageDescription -> LocalBuildInfo -> IO ()
copyDlls _ flags pkgDescr lbi = case buildOS of
Windows -> do
let installDirs = absoluteComponentInstallDirs pkgDescr lbi (localUnitId lbi) copydest
let copyLib lib = do
rawSystemExit verbosity "cp" ["-u", smartContractRoot ++ "/lib/" ++ lib ++ ".dll", bindir installDirs]
notice verbosity $ "Copy " ++ lib ++ " to " ++ bindir installDirs
copyLib "concordium_smart_contract_engine"
_ -> return ()
where
distPref = fromFlag (copyDistPref flags)
verbosity = fromFlag (copyVerbosity flags)
copydest = fromFlag (copyDest flags)

main =
defaultMainWithHooks $
simpleUserHooks
{ preConf = makeRust
{ preConf = makeRust,
postCopy = copyDlls
}

0 comments on commit 9c46f15

Please sign in to comment.