NilFoundation / zkLLVM

Zero-Knowledge Proof Systems Circuit Compiler
https://docs.nil.foundation/zkllvm
278 stars 48 forks source link

Python 3.7 failed to install Rust toolchain #495

Open aleasims opened 7 months ago

aleasims commented 7 months ago

Prerequisites section now says that Python 3.7+ is supported for Rust toolchain installation. However this is not true:

Traceback (most recent call last):
  File "rslang-installer.py", line 19, in <module>
    from typing import Literal, NoReturn, TypedDict
ImportError: cannot import name 'Literal' from 'typing' (/opt/hostedtoolcache/Python/3.7.17/x64/lib/python3.7/typing.py)

With Python 3.8-9 you will get another error:

Traceback (most recent call last):
  File "/home/runner/work/zkllvm-rust-template/zkllvm-rust-template/rslang-installer.py", line 41, in <module>
    class Asset(TypedDict):
  File "/home/runner/work/zkllvm-rust-template/zkllvm-rust-template/rslang-installer.py", line 53, in Asset
    label: str | None
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

rslang-installer supports only Python 3.10+ now (tested here).

We need to update this part in README or downgrade the rslang-installer to be compatible with Python 3.7+.