2019-08-14 00:25:36 +03:00
2019-06-28 14:12:45 +03:00
2018-12-12 13:25:58 +01:00
2014-09-29 06:49:06 -04:00
2019-06-28 14:12:45 +03:00
2015-04-21 18:54:49 +03:00
2019-06-28 14:12:45 +03:00
2013-02-08 12:11:06 -06:00
2019-08-14 00:25:36 +03:00
2018-08-02 18:34:34 +02:00

Redis

Redis fork ported to WebAssembly and adapted for the Fluence network. More info could be found here.

How to build

This app could be built either with docker

docker-compose up

or by Makefile with wasi-sdk installed

make

Prerequisites before deploying to Fluence

The built Redis would have four imports WASI syscalls and before deploying it to the Fluence network, it needs to get rid of them. The most simplest way is to use wasm2wat/wat2wasm utilities from binaryen:

  • translate obtained wasm file to the text representation
wasm2wat redis.wasm -o redis.wat
  • replace the following strings
  (import "wasi_unstable" "fd_fdstat_get" (func $__wasi_fd_fdstat_get (type 1)))
  (import "wasi_unstable" "fd_close" (func $__wasi_fd_close (type 5)))
  (import "wasi_unstable" "fd_seek" (func $__wasi_fd_seek (type 9)))
  (import "wasi_unstable" "fd_write" (func $__wasi_fd_write (type 6)))

with

  (func $__wasi_proc_exit (type 0) (param i32) )
  (func $__wasi_fd_close (type 5) (param i32)(result i32)
    i32.const 0
  )
  (func $__wasi_fd_fdstat_get (type 1) (param i32 i32)(result i32)
    i32.const 0
  )
  (func $__wasi_fd_seek (type 9) (param i32 i64 i32 i32)(result i32)
    i32.const 0
  )
  (func $__wasi_fd_write (type 6) (param i32 i32 i32 i32)(result i32)
    i32.const 0
  )
  • finally, translate it back to the Wasm:
wat2wasm redis.wat -o redis.wasm
Description
No description provided
Readme 79 MiB
Languages
C 85.6%
Tcl 13.2%
Ruby 0.4%
Shell 0.4%
Makefile 0.3%
Other 0.1%