-
Notifications
You must be signed in to change notification settings - Fork 443
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
Initial RISC-V support #1718
Initial RISC-V support #1718
Conversation
Apparently doc tests are not run if a library doesn't include the Also needed to update the dyling toolchain as we no require 1.68. |
Codecov Report
@@ Coverage Diff @@
## master #1718 +/- ##
==========================================
- Coverage 70.74% 70.73% -0.02%
==========================================
Files 205 205
Lines 6478 6479 +1
==========================================
Hits 4583 4583
- Misses 1895 1896 +1
... and 3 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Ready for review. Let's get this in as-is because it touches a lot of files and I expect merge conflicts. I will do a follow up PR where I will use |
Co-authored-by: Andrew Jones <ascjones@gmail.com>
The code for riscv uses allocation to provide a buffer to encode the arguments for the host into. This will be changed to a static buffer in a follow up. It requires a bigger refactor. |
This makes ink! compile on RISC-V. There are two things which are just filled with interim values:
Both of these things are not final and will be replaced once we have written the specification of our VM. Nonetheless we should still merge the code once this PR is in a good state: This allows us to iterate with the new RISC-V VM and prevent RISC-V from breaking in the future.
I will also need to make changes to
cargo contract
. As of right now I am compiling manually. Once a new cargo contract version is released I can add the CI jobs to this PR. Those will replace ourno-std
stop gap CI jobs.Notable changes required for support:
cdylib
. Instead, we build contracts as bin target (to be added by cargo contract). We need to use a single entry point in case of RISC-V. This is also why every contract needs to addno_main
in addition tono_std
when building for RISC-V (wasm doesn't care). Wasm can have multiple entry points even when build as bin. So we can do that unconditionally.