Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOP: Rust Upgrade for RTS #4648

Conversation

luc-blaeser
Copy link
Contributor

@luc-blaeser luc-blaeser commented Aug 5, 2024

Upgrading integrated EOP (#4488) to recent Rust and LLVM dependencies:

  • LLVM 18.1.8
  • Rust 1.82.0

Special aspects:

  • Support for both wasm32 and wasm64.
  • Support new dylink.0 instead of dylink.
  • Support GOT.mem for RTS in the Motoko linker.
  • LLVM LLD (used for wasm-ld) needs a bug fix: [lld][WebAssembly] Fix relocation of Wasm table index with GOT access llvm/llvm-project#104043. Therefore, patching wasm-ld.
  • Float formatting is now based on Rust and no longer on musl. There are format changes to output of NaN and infinity. Moreover, one particular output format (hexadecimal float) is no longer supported. Updating the documentation and base library is needed.
  • musl is still used in 32-bit but not in 64-bit. In the future, we should get rid of musl entirely. The musl import is rather old, upgrading is complicated as it involves a lot of unwanted dependencies.
  • No longer using emscripten for 64-bit Wasm compilation (as there is a nix build issue with latest emscripten). Instead, the clang compiler is directly invoked.
  • Adjusting the RTS code in line with the latest Rust features/rules.

Note:

  • If your nix-shell crashes with a segmentation fault with this PR, you need to upgrade nix. For this, you need to manually uninstall and re-install nix.

@luc-blaeser luc-blaeser changed the title WIP: Rust Upgrade for RTS EOP: Rust Upgrade for RTS Aug 15, 2024
@luc-blaeser luc-blaeser self-assigned this Aug 15, 2024
@luc-blaeser luc-blaeser marked this pull request as ready for review August 16, 2024 09:01
Copy link

github-actions bot commented Aug 16, 2024

Comparing from 4657543 to 9f03c0e:
In terms of gas, 5 tests improved and the mean change is -0.0%.
In terms of size, 5 tests regressed and the mean change is +65.9%.

rts/Makefile Outdated Show resolved Hide resolved
Base automatically changed from luc/latest-integrated-eop to luc/integrate-enhanced-orthogonal-persistence August 20, 2024 13:57
Base automatically changed from luc/integrate-enhanced-orthogonal-persistence to luc/graph-copy-on-stable-heap64 August 26, 2024 14:20
Base automatically changed from luc/graph-copy-on-stable-heap64 to luc/stable-heap64 August 26, 2024 14:20
Base automatically changed from luc/stable-heap64 to luc/stable-heap August 26, 2024 14:20
Base automatically changed from luc/stable-heap to master August 28, 2024 12:38
@luc-blaeser luc-blaeser changed the base branch from master to luc/integrate-enhanced-orthogonal-persistence August 29, 2024 07:30
@luc-blaeser
Copy link
Contributor Author

Closing in favor of #4677 to merge with latest master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants