LIst of CKB compatible compilers


I’m preparing to do play and taste more the CKB. How do you guys build / compile programs to be run on CKB? Is there a list of supported compilers?

Also, what’s the problem of C-libraries? Why for example you need to transpile crypto primitives transplanted to the CKB - as expressed in the grant proposals? I thought that the whole goal of the universal platform, being RISC-V compatible, is to also reuse existing libraries / languages which can easily compile to RISC-V.

1 Like

Hi robert,

Currently there is an out of the box solution for compiling GCC:

Since GCC already has upstream RISC-V support, you can of course use the official GCC to build your script code. Or you can use the docker image we have prepared to save the trouble of compiling GCC:

and here is the source link of the blog of @xxuejie

As for the second question, I think there is distance between ‘can’ and ‘be able to’, so there is still a lot of work to do for fitting current libraries to ckb environment.

1 Like

Xuejie Xiao, [Feb 8, 2020 at 8:47:26 AM (2/8/20, 8:56:15 AM)]:

That one is mostly talking about a different thing, yes you could compile existing crypto functions to RISC-V and use it directly, but there’s a difference between something that works, and something that plays well in the long term. Specifically, there might be the following problems with existing implementations:

  1. They rely on a very slow expensive initial setup phase, which doesn’t make sense to run when executing every contract

  2. A generic C implementation can be quite slow at times, if you dig around modern crypto implementations, many use x86 assembly code for speedups. We’d like to see people use RISC-V assembly instead of pure C code to do the same thing

Robert Z, [Feb 8, 2020 at 8:51:16 AM]:

Ah, ok - makes sense. Then I suggest to update that header to something like “highly optimized crypto functions for RISK-V”

Xuejie Xiao, [Feb 8, 2020 at 8:52:31 AM]:

I do agree that might be a slightly misleading part and I’m talking to someone on how we can enhance that

Thanks for your suggestion!

Robert Z, [Feb 8, 2020 at 8:52:50 AM (2/8/20, 8:52:55 AM)]:

thanks for answering and handling it :slight_smile:

Originally posted in Telegram