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

RISC V support #666

Closed
SebastianSchildt opened this issue Sep 22, 2023 · 10 comments
Closed

RISC V support #666

SebastianSchildt opened this issue Sep 22, 2023 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@SebastianSchildt
Copy link
Contributor

As this question pops up pretty regularly these days... Create this issue for tracking

Currently RISC V is not supported, the main culprit are the required RUST crypto libs for TLS and the JWT tokens that rely on the "ring" base library https://github.com/briansmith/ring

There have been issues and PRs raised for almost two years, but while the Git is sort of active the whole project seems to be semi-abandoned and has not had a release in a long time.

The most recent developments seem to be in this PR,

briansmith/ring#1627

so if RISC V support is crucial for you, try to move things over there.

@argerus
Copy link
Contributor

argerus commented Sep 22, 2023

Maybe this newly announced funding will result in a new release supporting more targets (including RISC-V).

In parallel with the FIPS-related work, I will release the 0.17 version of ring that supports a much wider set of targets than ring has supported up to now.

@SebastianSchildt
Copy link
Contributor Author

Nice, somebody found money for that guy. Lets hope 🙏 something comes out, my RISC board is getting bored without KUKSA and a second one is on the way already (https://milkv.io/duo 😄 ).

@SebastianSchildt SebastianSchildt added the enhancement New feature or request label Sep 23, 2023
@SebastianSchildt
Copy link
Contributor Author

Just tracking some progress:
Meanwhile briansmith/ring#1627 is merged, however just doing

[patch.crates-io]
ring = { git = 'https://github.com/briansmith/ring.git', branch='main' }

is not enough, as this is currently tagged version 0.17 so 0.16.20 is still being pulled from rustls and jsonwebtoken.

As a "hack" I tried clonign ring, changing Cargo.toml claiming main to be version 0.16.22 and refernecing it like

ring = { path = '/path/to/patched-ring' }

However, "unfortunately" they use their version numbers correctly, i.e. the current ring library is not compatible at least with rustls (did not dig deeper).

So it looks like

  • still waiting for an "offiical" ring 0.17.0
  • Wiating for other prjects to pick it up

@SebastianSchildt
Copy link
Contributor Author

Apparently rustls is already work in progress: rustls/rustls#1508

@SebastianSchildt
Copy link
Contributor Author

So we might wanna try -aftter 0.4.1 release - upgrading some dependecnies.

Meanwhile we have the required ring 0.17 released

https://crates.io/crates/ring

And rusttls
https://crates.io/crates/rustls/0.21.8

as well as jsonwebtoken
https://crates.io/crates/jsonwebtoken/9.1.0

have versions upgraded to the new ring

@argerus
Copy link
Contributor

argerus commented Oct 26, 2023

Created a PR (#694) with updated dependencies.
cross build --target riscv64gc-unknown-linux-gnu doesn't fail at least...

@SebastianSchildt
Copy link
Contributor Author

Nice. Will try on target :)

@SebastianSchildt
Copy link
Contributor Author

With #694 should work on RISC now, keeping this open, as we are not building it by default currently. Let's see what is possible there

@SebastianSchildt
Copy link
Contributor Author

kuksa-client docker might take a while as distroless is not supporting riscv yet
GoogleContainerTools/distroless#1269

However, I guess we can sit this one out, as the pypi wheel should work fine

@SebastianSchildt
Copy link
Contributor Author

Ok let's I played with it, and would suggest post poning kuksa-client support/container a bit. It is not impossible, but it suffers the same issue we had with ARM builds for the GRPC wheels a while ago: They don't exist, so it needs to be compiled. That is more than 3 hours when doing it via QEMU. So let's sit this one out for now. If somebody has a reasonably fast RISC V target, there is no issue why a pip install should not work, but for our CI it seems too heavy currently

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

No branches or pull requests

2 participants