Skip to content

Add riscv64 backend for node.js #37856

Description

@luyahan

Hi all,
I am a developer about v8 for riscv64 and v8 for riscv64 patch had been upstreamed into google repo.
I want to add support for node.js. I have build success locally.
And what should i do before opening a pr to submit it ?

Activity

  1. Ayase-252 commented on Mar 22, 2021

    @Ayase-252
    Member

    Hello,
    I'd suggest to read Pull Requests guide to get yourself familiar with commit message guidelines.

    Then you are good to go.

  2. added
    buildIssues and PRs related to Node.js builds or CI infrastructure.
    feature requestIssues requesting new Node.js features.
    questionIssues asking questions about Node.js.
    on Mar 22, 2021
  3. luyahan commented on Mar 23, 2021

    @luyahan
    ContributorAuthor

    Hello,
    I'd suggest to read Pull Requests guide to get yourself familiar with commit message guidelines.

    Then you are good to go.

    Thanks

  4. luyahan commented on Mar 23, 2021

    @luyahan
    ContributorAuthor

    And i have another question
    About https://github.com/nodejs/node/tree/master/deps/openssl/config/archs
    Where do these openssl assembly codes come from? I don't find these in https://github.com/openssl/openssl
    @Ayase-252

  5. luyahan commented on Mar 23, 2021

    @luyahan
    ContributorAuthor
  6. Ayase-252 commented on Mar 23, 2021

    @Ayase-252
    Member

    @luyahan

    It seems that those files are pre-generated during building. Please refer to README in openssl dep and official maintainence guide.

    FYI, Node.js has switched openssl to quictls/openssl in order to support QUIC in #37601

  7. sxa commented on Mar 26, 2021

    @sxa
    Member

    @luyahan I've only just noticed this issue - great timing as I was about to start taking a look at the port that you've done and give it a try. I'm interested in helping out with getting this in the main codebase if possible. I've sent a request to join your slack :-)

  8. luyahan commented on Mar 29, 2021

    @luyahan
    ContributorAuthor

    @luyahan I've only just noticed this issue - great timing as I was about to start taking a look at the port that you've done and give it a try. I'm interested in helping out with getting this in the main codebase if possible. I've sent a request to join your slack :-)

    @sxa Thanks. I am encountering a problem about openssl. About generate openssl noasm code for riscv64. What i need do to fix this error?
    Details:

    yahan@f06755d88c20:~/source/node/deps/openssl/config $ make
    cd ../openssl; CONFIGURE_CHECKER_WARN=1 perl ./Configure no-comp no-shared no-afalgeng enable-ssl-trace \
    no-asm linux64-riscv64;
    Configuring OpenSSL version 1.1.1j+quic (0x101010afL) for linux64-riscv64
    Using os-specific seed configuration
    Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-egd] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--config=FILE] os/compiler[:flags]
    
    pick os/compiler from:
    BS2000-OSD BSD-generic32 BSD-generic64 BSD-ia64 BSD-sparc64 BSD-sparcv8
    BSD-x86 BSD-x86-elf BSD-x86_64 Cygwin Cygwin-i386 Cygwin-i486 Cygwin-i586
    Cygwin-i686 Cygwin-x86 Cygwin-x86_64 DJGPP MPE/iX-gcc UEFI UWIN VC-CE VC-WIN32
    VC-WIN32-ARM VC-WIN32-ONECORE VC-WIN64-ARM VC-WIN64A VC-WIN64A-ONECORE
    VC-WIN64A-masm VC-WIN64I aix-cc aix-gcc aix64-cc aix64-gcc android-arm
    android-arm64 android-armeabi android-mips android-mips64 android-x86
    android-x86_64 android64 android64-aarch64 android64-mips64 android64-x86_64
    bsdi-elf-gcc cc darwin-i386-cc darwin-ppc-cc darwin64-arm64-cc
    darwin64-debug-test-64-clang darwin64-ppc-cc darwin64-x86_64-cc gcc haiku-x86
    haiku-x86_64 hpux-ia64-cc hpux-ia64-gcc hpux-parisc-cc hpux-parisc-gcc
    hpux-parisc1_1-cc hpux-parisc1_1-gcc hpux64-ia64-cc hpux64-ia64-gcc
    hpux64-parisc2-cc hpux64-parisc2-gcc hurd-x86 ios-cross ios-xcrun ios64-cross
    ios64-xcrun iossimulator-xcrun iphoneos-cross irix-mips3-cc irix-mips3-gcc
    irix64-mips4-cc irix64-mips4-gcc linux-aarch64 linux-alpha-gcc linux-aout
    linux-arm64ilp32 linux-armv4 linux-c64xplus linux-elf linux-generic32
    linux-generic64 linux-ia64 linux-mips32 linux-mips64 linux-ppc linux-ppc64
    linux-ppc64le linux-sparcv8 linux-sparcv9 linux-x32 linux-x86 linux-x86-clang
    linux-x86_64 linux-x86_64-clang linux32-s390x linux64-mips64 linux64-s390x
    linux64-sparcv9 mingw mingw64 nextstep nextstep3.3 purify sco5-cc sco5-gcc
    solaris-sparcv7-cc solaris-sparcv7-gcc solaris-sparcv8-cc solaris-sparcv8-gcc
    solaris-sparcv9-cc solaris-sparcv9-gcc solaris-x86-gcc solaris64-sparcv9-cc
    solaris64-sparcv9-gcc solaris64-x86_64-cc solaris64-x86_64-gcc tru64-alpha-cc
    tru64-alpha-gcc uClinux-dist uClinux-dist64 unixware-2.0 unixware-2.1
    unixware-7 unixware-7-gcc vms-alpha vms-alpha-p32 vms-alpha-p64 vms-ia64
    vms-ia64-p32 vms-ia64-p64 vos-gcc vxworks-mips vxworks-ppc405 vxworks-ppc60x
    vxworks-ppc750 vxworks-ppc750-debug vxworks-ppc860 vxworks-ppcgen
    vxworks-simlinux debug debug-erbridge debug-linux-ia32-aes debug-linux-pentium
    debug-linux-ppro debug-test-64-clang
    
    NOTE: If in doubt, on Unix-ish systems use './config'.
    make: *** [Makefile:63: linux64-riscv64] Error 1
    
  9. mhdawson commented on Mar 31, 2021

    @mhdawson
    Member

    @luyahan not related to your issues and probably too early, but what OS is your riskv64 implementation running on, and do you work for/know of any company that might donate virtual instances to the Node.js CI?

  10. luyahan commented on Apr 1, 2021

    @luyahan
    ContributorAuthor

    @luyahan not related to your issues and probably too early, but what OS is your riskv64 implementation running on

    I am running Fedroa for riscv64.

    , and do you work for/know of any company that might donate virtual instances to the Node.js CI?

    PLCT Lab may be can provide it. I need to ask my leader.

  11. luyahan commented on Apr 1, 2021

    @luyahan
    ContributorAuthor

    @luyahan not related to your issues and probably too early, but what OS is your riskv64 implementation running on, and do you work for/know of any company that might donate virtual instances to the Node.js CI?

    I know V8 can be built with simulator mode that can run other arch V8 on X64 machine. Can Node.js support it ?

  12. luyahan commented on Apr 1, 2021

    @luyahan
    ContributorAuthor

    @luyahan not related to your issues and probably too early, but what OS is your riskv64 implementation running on, and do you work for/know of any company that might donate virtual instances to the Node.js CI?

    About May, PLCT Lab can get some riscv64 .borads and can donate it to Node.js ci

  13. lazyparser commented on Apr 1, 2021

    @lazyparser

    @luyahan not related to your issues and probably too early, but what OS is your riskv64 implementation running on, and do you work for/know of any company that might donate virtual instances to the Node.js CI?

    PLCT Lab is happy to donate RISC-V dev boards. We had ordered dozens of RISC-V boards last year and still waiting to receive them :(
    Hopefully we will get more boards in May.

  14. mhdawson commented on Apr 9, 2021

    @mhdawson
    Member

    @lazyparser can the PLCT Lab host the donated boards ? The project typically has vm's donated versus hardware as we don't have an easy place to host physical hardware.

  15. lazyparser commented on Apr 10, 2021

    @lazyparser

    @lazyparser can the PLCT Lab host the donated boards ? The project typically has vm's donated versus hardware as we don't have an easy place to host physical hardware.

    Sure. We are building an open CI infrastructure for RISC-V porting ( https://ci.rvperf.org ) and will provide a board farm to nodejs and v8, etc.

  16. added a commit that references this issue on Apr 14, 2021
  17. added a commit that references this issue on Apr 15, 2021
  18. playground commented on Mar 24, 2022

    @playground

    How can I install nodejs on risc-v Fedora?

    
    ## Installing the NodeSource Node.js 16.x repo...
    
    
    ## Inspecting system...
    
    + rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release
    + uname -m
    
    ## You don't appear to be running a supported machine architecture: riscv64. Please contact NodeSource at https://github.com/nodesource/distributions/issues if you think this is incorrect or would like your architecture to be considered for support. ```
    
  19. added a commit that references this issue on May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to Node.js builds or CI infrastructure.feature requestIssues requesting new Node.js features.questionIssues asking questions about Node.js.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions