A template project for building a database-driven microservice in Rust and run it in the WasmEdge sandbox.

Overview

Secure & lightweight microservice with a database backend

In this repo, we demonstrate a microservice written in Rust, and connected to a MySQL database. It supports CRUD operations on a database table via a HTTP service interface. The microservice is compiled into WebAssembly (Wasm) and runs in the WasmEdge Runtime, which is a secure and lightweight alternative to natively compiled Rust apps in Linux containers. The WasmEdge Runtime can be managed and orchestrated by container tools such as the Docker, Podman, as well as almost all flavors of Kubernetes. It also works with microservice management frameworks such as Dapr. Checkout this article or this video to learn how the Rust code in this microservice works.

Quickstart with Docker

The easiest way to get started is to use a version of Docker Desktop or Docker CLI with Wasm support.

Then, you just need to type one command.

docker compose up

This will build the Rust source code, run the Wasm server, and startup a MySQL backing database. It also starts a basic STATIC web interface (available at http://localhost:8090). See the Dockerfile and docker-compose.yml files. You can jump directly to the CRUD tests section to interact with the web service.

However, if you want to build and run the microservice app step by step on your own system. Follow the detailed instructions below.

Prerequisites

On Linux, you can use the following commands to install Rust and WasmEdge.

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
# Install WebAssembly target for Rust
rustup target add wasm32-wasi

# Install WasmEdge
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -e all
source $HOME/.wasmedge/env

Build

Use the following command to build the microservice. A WebAssembly bytecode file (wasm file) will be created.

cargo build --target wasm32-wasi --release

You can run the AOT compiler on the wasm file. It could significantly improvement the performance of compute-intensive applications. This microservice, however, is a network intensitive application. Our use of async HTTP networking (Tokio and hyper) and async MySQL connectors are crucial for the performance of this microservice.

wasmedgec target/wasm32-wasi/release/order_demo_service.wasm order_demo_service.wasm

Run

You can use the wasmedge command to run the wasm application. It will start the server. Make sure that you pass the MySQL connection string as the env variable to the command.

wasmedge --env "DATABASE_URL=mysql://user:[email protected]:3306/mysql" order_demo_service.wasm

CRUD tests

Open another terminal, and you can use the curl command to interact with the web service.

When the microservice receives a GET request to the /init endpoint, it would initialize the database with the orders table.

curl http://localhost:8080/init

When the microservice receives a POST request to the /create_order endpoint, it would extract the JSON data from the POST body and insert an Order record into the database table. For multiple records, use the /create_orders endpoint and POST a JSON array of Order objects.

curl http://localhost:8080/create_orders -X POST -d @orders.json

When the microservice receives a GET request to the /orders endpoint, it would get all rows from the orders table and return the result set in a JSON array in the HTTP response.

curl http://localhost:8080/orders

When the microservice receives a POST request to the /update_order endpoint, it would extract the JSON data from the POST body and update the Order record in the database table that matches the order_id in the input data.

curl http://localhost:8080/update_order -X POST -d @update_order.json

When the microservice receives a GET request to the /delete_order endpoint, it would delete the row in the orders table that matches the id GET parameter.

curl http://localhost:8080/delete_order?id=2

That's it. Feel free to fork this project and use it as a template for your own lightweight microservices!

Comments
  • Compile error when `crossbeam-utils v0.8.13` in MacOS Big Sur 12.6.1

    Compile error when `crossbeam-utils v0.8.13` in MacOS Big Sur 12.6.1

    • wasmedge version 0.11.2
    • rust version: 1.65.0

    Hi, just a newbie here, want to ask if anyone occurred this issue by following README.md? Thanks

    ➤ RUST_BACKTRACE=1 cargo build --target wasm32-wasi --release
       Compiling crossbeam-utils v0.8.13
       Compiling serde_derive v1.0.147
       Compiling cfg-if v1.0.0
       Compiling itoa v1.0.4
       Compiling proc-macro-hack v0.5.19
       Compiling frunk_core v0.4.1
       Compiling minimal-lexical v0.2.1
       Compiling num-traits v0.2.15
       Compiling libloading v0.7.4
    error: failed to run custom build command for `crossbeam-utils v0.8.13`
    
    Caused by:
      process didn't exit successfully: `/Users/morris_tai/Documents/Whynot/microservice-rust-mysql/target/release/build/crossbeam-utils-e10b4f58993e0ccd/build-script-build` (exit status: 101)
      --- stderr
      thread 'main' panicked at 'index out of bounds: the len is 2 but the index is 2', /Users/morris_tai/.cargo/registry/src/github.com-1ecc6299db9ec823/crossbeam-utils-0.8.13/build-common.rs:8:18
      stack backtrace:
         0: rust_begin_unwind
                   at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:584:5
         1: core::panicking::panic_fmt
                   at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:142:14
         2: core::panicking::panic_bounds_check
                   at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:84:5
         3: <usize as core::slice::index::SliceIndex<[T]>>::index
         4: <alloc::vec::Vec<T,A> as core::ops::index::Index<I>>::index
         5: build_script_build::convert_custom_linux_target
         6: build_script_build::main
         7: core::ops::function::FnOnce::call_once
      note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
    warning: build failed, waiting for other jobs to finish...
    
    opened by morristai 9
  • Sample application doesn't work as expected.

    Sample application doesn't work as expected.

    Followed the following steps to run the sample Applciation, but it doesn't work as expected:

    Steps I followed:

    1. git clone https://github.com/second-state/microservice-rust-mysql.git
    2. cd microservice-rust-mysql
    3. docker compose up server Pulling server Warning service.platform should be part of the service.build.platforms: "wasi/wasm"
    4. http://localhost:8090

    Any idea what went wrong. thx

    opened by jungan21 7
  • Add Dockerfile and Compose file

    Add Dockerfile and Compose file

    This requires a version of Docker with Wasm WASI support to work.

    Steps to test:

    1. Run docker compose up
    2. Run docker run --rm --network host curlimages/curl curl http://0.0.0.0:8080/init to initialize
    opened by chris-crone 3
  • Add a simple UI

    Add a simple UI

    I created a very basic web interface using plain HTML/JS. Started going down the React route, but felt like overkill. But, happy to revisit that if others want it. Feedback welcome!

    opened by mikesir87 2
  • operating system is not supported

    operating system is not supported

    Ubuntu x86_64, running docker compose up got a msg operating system is not supported

    $ uname -a
    Linux 5.4.0-126-generic #142-Ubuntu SMP Fri Aug 26 12:12:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
    
     => [build 1/4] COPY Cargo.toml orders.json update_order.json .                                                                                          0.0s
     => [build 2/4] COPY src ./src                                                                                                                           0.0s
     => [build 3/4] RUN --mount=type=cache,target=/usr/local/cargo/git/db     --mount=type=cache,target=/usr/local/cargo/registry/cache     --mount=type=c  68.5s
     => [build 4/4] RUN /root/.wasmedge/bin/wasmedgec target/wasm32-wasi/release/order_demo_service.wasm order_demo_service.wasm                            66.8s
     => [stage-2 1/1] COPY --link --from=build /src/order_demo_service.wasm /order_demo_service.wasm                                                         0.0s
     => ERROR exporting to image                                                                                                                             0.1s
     => => exporting layers                                                                                                                                  0.1s
     => => writing image sha256:8139f0063222ee1099fe0d240389b13757f2257b6a00911221bea050565351f2                                                             0.0s
    ------
     > exporting to image:
    ------
    failed to solve: operating system is not supported
    
    opened by sunwu51 0
  •  windows10下wasmedge执行,端口绑定不了

    windows10下wasmedge执行,端口绑定不了

    https://mp.weixin.qq.com/s/gMkwqFIm2JoZS3TVHityoQ windows10下wasmedge执行,端口绑定不了【hread 'main' panicked at 'error binding to 0.0.0.0:9090: error creating server listener: Function not implemented ,\hyper_wasi-0.15.0\src\server\server.rs:79:13 let incoming = AddrIncoming::new(addr).unwrap_or_else(|e| { 】,在linux下可以

    opened by zhengxingjian 1
  • Compile error in MacOS Big Sur 11.6.8

    Compile error in MacOS Big Sur 11.6.8

    First i compile it with command:

    cargo build --target wasm32-wasi --release                                     
    

    And the the following error:

       Compiling libz-sys v1.1.8
    The following warnings were emitted during compilation:
    
    warning: error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasi"'
    warning: 1 error generated.
    
    error: failed to run custom build command for `libz-sys v1.1.8`
    
    Caused by:
      process didn't exit successfully: `/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/release/build/libz-sys-45ae25f1c18a6a06/build-script-build` (exit status: 1)
      --- stdout
      cargo:rerun-if-env-changed=LIBZ_SYS_STATIC
      cargo:rerun-if-changed=build.rs
      cargo:rerun-if-env-changed=ZLIB_NO_PKG_CONFIG
      cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_wasm32-wasi
      cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS_wasm32_wasi
      cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_ALLOW_CROSS
      cargo:rerun-if-env-changed=PKG_CONFIG_ALLOW_CROSS
      cargo:rerun-if-env-changed=PKG_CONFIG_wasm32-wasi
      cargo:rerun-if-env-changed=PKG_CONFIG_wasm32_wasi
      cargo:rerun-if-env-changed=TARGET_PKG_CONFIG
      cargo:rerun-if-env-changed=PKG_CONFIG
      cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_wasm32-wasi
      cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_wasm32_wasi
      cargo:rerun-if-env-changed=TARGET_PKG_CONFIG_SYSROOT_DIR
      cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
      cargo-warning=pkg-config has not been configured to support cross-compilation.
    
      Install a sysroot for the target platform and configure it via
      PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_PATH, or install a
      cross-compiling wrapper for pkg-config and set it via
      PKG_CONFIG environment variable.
      TARGET = Some("wasm32-wasi")
      OPT_LEVEL = Some("3")
      HOST = Some("x86_64-apple-darwin")
      CC_wasm32-wasi = None
      CC_wasm32_wasi = None
      TARGET_CC = None
      CC = None
      CFLAGS_wasm32-wasi = None
      CFLAGS_wasm32_wasi = None
      TARGET_CFLAGS = None
      CFLAGS = None
      CRATE_CC_NO_DEFAULTS = None
      DEBUG = Some("false")
      running: "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-wasi" "-I" "src/zlib" "-fvisibility=hidden" "-DZ_SOLO" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/build/libz-sys-590f767ffa4361ba/out/lib/src/zlib/adler32.o" "-c" "src/zlib/adler32.c"
      cargo:warning=error: unable to create target: 'No available targets are compatible with triple "wasm32-unknown-wasi"'
      cargo:warning=1 error generated.
      exit status: 1
    
      --- stderr
    
    
      error occurred: Command "clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=wasm32-wasi" "-I" "src/zlib" "-fvisibility=hidden" "-DZ_SOLO" "-DSTDC" "-D_LARGEFILE64_SOURCE" "-D_POSIX_SOURCE" "-o" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/build/libz-sys-590f767ffa4361ba/out/lib/src/zlib/adler32.o" "-c" "src/zlib/adler32.c" with args "clang" did not execute successfully (status code exit status: 1).
    
    

    When i added PKG_CONFIG ENV like this:

    PKG_CONFIG=/usr/local/bin/pkg-config cargo build --target wasm32-wasi --release
    

    Get the following linking error:

       Compiling libz-sys v1.1.8
       Compiling flate2 v1.0.24
       Compiling mysql_common v0.29.1
       Compiling mysql_async_wasi v0.30.0
       Compiling order_demo_service v0.1.0 (/Users/zhouyou/2022/wasm/microservice-rust-mysql)
    error: linking with `rust-lld` failed: exit status: 1
      |
      = note: "rust-lld" "-flavor" "wasm" "--rsp-quoting=posix" "--export" "main" "--export=__heap_base" "--export=__data_end" "-z" "stack-size=1048576" "--stack-first" "--allow-undefined" "--fatal-warnings" "--no-demangle" "~/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/self-contained/crt1-command.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.0.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.1.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.10.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.11.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.12.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.13.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.14.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.15.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.2.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.3.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.4.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.5.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.6.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.7.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.8.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.order_demo_service.d7dd1bde-cgu.9.rcgu.o" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.1hhm9rnxclxwokci.rcgu.o" "-L" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps" "-L" "~/2022/wasm/microservice-rust-mysql/target/release/deps" "-L" "~/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libanyhow-f6b3946158b8b39b.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libmysql_async-eabf4663f162a549.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/liburl-5ffbd428d72292d7.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libidna-e554bcaf8ede1637.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libunicode_normalization-f726e8669b916b1c.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libtinyvec-d7d41b335812e6ec.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libtinyvec_macros-4c8e51b73a9b2f47.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libunicode_bidi-5cfe4cfd2f322816.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libform_urlencoded-5b143efd873e28a3.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libpercent_encoding-e83aeacdd7415160.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libtwox_hash-c95dcd3890331183.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/liblru-516c33d5b26780e7.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libpin_project-ccf930fc388ab151.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libcrossbeam-ad561ff89c13f0b0.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libcrossbeam_channel-300ea25e2cf16b66.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libcrossbeam_deque-349e1ea3a89e7a77.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libcrossbeam_queue-ce5db70cc457698c.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libcrossbeam_epoch-ef21f49df4e5f145.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libmemoffset-ac09d9930f9aa6da.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libscopeguard-9d1dcf96919ab17d.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libcrossbeam_utils-787e2a94bf14b33c.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libmysql_common-428303c1646822fb.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/liblazy_static-7db850db66ce5df7.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libbitflags-09b32db59c3f72e6.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libthiserror-c5aed46731763756.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libbitvec-3d45e048ea192d47.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libwyz-4a56cae148094fd4.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libtap-834883f9b2dc1572.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libradium-54e24ffcde0ad72c.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libfunty-749388bfc44cb063.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libsha2-770b474adbf3f7a3.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libflate2-6b8582d1f0fe7988.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/liblibz_sys-edd67eb112565044.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libcrc32fast-3247aea9dc6787a6.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libsaturating-e5d8820f9d808ea3.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/liblexical-4a401a85c16590b0.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/liblexical_core-5791c47b234d9142.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/liblexical_write_float-352e867e92723974.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/liblexical_write_integer-472181b1f8e1e93f.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/liblexical_parse_float-ec262b626c97620c.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/liblexical_parse_integer-0967d46bcb98feca.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/liblexical_util-e5bd68e1f571b8b8.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libstatic_assertions-dffc96057e15d704.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libsmallvec-91d7324f401fd68b.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libsha1-4dff33b1805c2461.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libdigest-f4029a77c3159f6c.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libblock_buffer-240a6a70829aa342.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libcrypto_common-b90038de6f88556b.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libgeneric_array-e10dd698223a93e4.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libtypenum-deebf6c672b80a0a.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libbyteorder-3a44b1f75f1dd7dc.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libregex-2eb61bdf6fdf2305.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libaho_corasick-ec4e5801e1b70704.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libregex_syntax-f5d7a5f5507c7cd9.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libbase64-4730b53692cfda03.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/librand-87ae55730bafda68.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/librand_chacha-ba0b332a0687d682.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libppv_lite86-cf54d23981a270df.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/librand_core-a48345654d5d5877.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libserde_json-1dbbd770227a64cb.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libryu-20e64358b9fe17d3.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libuuid-4f03c4b2229140dd.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libtime-07f4085f167d6408.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libtime_core-9e2ff1f8912620e1.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/librust_decimal-9b61f49fb2718542.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libserde-0e2d3a29db918c8d.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libarrayvec-0c624d46dcb25f00.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libfrunk-c22cf26b32972fb1.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libfrunk_core-e492df9dff03f206.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libbigdecimal-38e0b5eb6e95f141.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libnum_bigint-16e93629cfcd58c2.rlib" "~/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libnum_integer-a26d009ce48feafd.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libnum_traits-fcf67784416214ae.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libhyper-23ca12243dd69e6a.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libwant-4deeee9e9eee5068.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libtry_lock-0d3332e95e722454.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libhttparse-e8978e844b5967c4.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libh2-4de239bf635cc6d6.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libindexmap-b3c5305b473839b5.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libhashbrown-b2cce59ce2becf44.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libahash-d16ef27207a60c71.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libgetrandom-12091bff14349c40.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libwasi-f7ceff88a6acfbab.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libtokio_util-d1264cae5bb6b1c9.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libfutures_sink-1f63f8dfaf6acba1.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libtower_service-b522d57f10ee6a6a.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libtracing-dbe4cc5b1572e4c4.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libtracing_core-45c01e6a2e217f51.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libonce_cell-47b7fabe5ad79cc3.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libfutures_channel-c2513e2e3a21980b.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libhttp_body-95e0859a6565c565.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libfutures_util-a78cc745a6ec8115.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libslab-3c83a6049833c073.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libfutures_task-f75c905e8feb6cc9.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libpin_utils-423210ef3c42e77b.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libfutures_core-dfc4be41964c3e5a.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libtokio-a7095eb8fa5ca17c.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libmemchr-51a47e65dbfbc174.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libmio-6099ebaa2155ff99.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libwasmedge_wasi_socket-2afc908dc46f1450.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/liblibc-1dad0bf35c4b89b8.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/liblog-084c3e2b37422d04.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libcfg_if-98550d1237218586.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libpin_project_lite-f04315829fb7032c.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libhttpdate-3be0cf4f3b91a64b.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libhttp-0e8266bb72330515.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libitoa-644e3ec7b17e2703.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libbytes-aa921d73ea0c4c01.rlib" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/libfnv-b77b1f203969d7f6.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/libstd-efaaba0891f431e6.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/libpanic_abort-577f4466b7011fd9.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/libwasi-1e435a747e54147c.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/librustc_demangle-8978a0a7245bb046.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/libstd_detect-46afd6c73b5def14.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/libhashbrown-8ddc3196515a59e3.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/libminiz_oxide-2ab278248037e9fe.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/libadler-9253e5a77329e839.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/librustc_std_workspace_alloc-f63f168fbb57a25e.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/libunwind-73dda9d0dc955dfa.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/libcfg_if-9b87145ec81a0bcf.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/liblibc-a618bef1900d4d44.rlib" "-l" "c" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/liballoc-de179dc5e1ee1c8a.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/librustc_std_workspace_core-e6dfdb6d4d812540.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/libcore-d38cb67398a49399.rlib" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/libcompiler_builtins-470446c680a98e2c.rlib" "-l" "z" "-L" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib" "-L" "/Users/zhouyou/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/wasm32-wasi/lib/self-contained" "-o" "/Users/zhouyou/2022/wasm/microservice-rust-mysql/target/wasm32-wasi/release/deps/order_demo_service-a41d06f3d7f0e3e4.wasm" "--gc-sections" "-O3"
      = note: rust-lld: error: unable to find library -lz
    

    What mistakes i do, or lib versions not match, or some bugs, please help me take look it. Thanks!

    opened by developerworks 9
Owner
Second State
Fast, safe, portable & serverless. Deploy Rust functions in edge computing, Jamstack, SaaS and service mesh applications.
Second State
Rust client for the anna-rs KVS that can run in the WasmEdge Runtime

wasmedge-anna-client wasmedge-anna-client is a Rust client for anna-rs based on Tokio for WasmEdge. It communicates with Anna routing nodes and KVS no

WasmEdge Runtime 4 Nov 8, 2022
Distributed SQL database in Rust, written as a learning project

toyDB Distributed SQL database in Rust, written as a learning project. Most components are built from scratch, including: Raft-based distributed conse

Erik Grinaker 4.6k Jan 8, 2023
Owlyshield is an open-source AI-driven behaviour based antiransomware engine written in Rust.

Owlyshield (mailto:[email protected]) We at SitinCloud strongly believe that cybersecurity products should always be open-source: Critical decis

SitinCloud 255 Dec 25, 2022
ReefDB is a minimalistic, in-memory and on-disk database management system written in Rust, implementing basic SQL query capabilities and full-text search.

ReefDB ReefDB is a minimalistic, in-memory and on-disk database management system written in Rust, implementing basic SQL query capabilities and full-

Sacha Arbonel 75 Jun 12, 2023
Skybase is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and SSL

Skybase The next-generation NoSQL database What is Skybase? Skybase (or SkybaseDB/SDB) is an effort to provide the best of key/value stores, document

Skybase 1.4k Dec 29, 2022
Skytable is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and TLS

Skytable is an effort to provide the best of key/value stores, document stores and columnar databases, that is, simplicity, flexibility and queryability at scale. The name 'Skytable' exemplifies our vision to create a database that has limitless possibilities. Skytable was previously known as TerrabaseDB (and then Skybase) and is also nicknamed "STable", "Sky" and "SDB" by the community.

Skytable 1.4k Dec 29, 2022
rust_arango enables you to connect with ArangoDB server, access to database, execute AQL query, manage ArangoDB in an easy and intuitive way, both async and plain synchronous code with any HTTP ecosystem you love.

rust_arango enables you to connect with ArangoDB server, access to database, execute AQL query, manage ArangoDB in an easy and intuitive way, both async and plain synchronous code with any HTTP ecosystem you love.

Foretag 3 Mar 24, 2022
AgateDB is an embeddable, persistent and fast key-value (KV) database written in pure Rust

AgateDB is an embeddable, persistent and fast key-value (KV) database written in pure Rust. It is designed as an experimental engine for the TiKV project, and will bring aggressive optimizations for TiKV specifically.

TiKV Project 535 Jan 9, 2023
FeOphant - A SQL database server written in Rust and inspired by PostreSQL.

A PostgreSQL inspired SQL database written in Rust.

Christopher Hotchkiss 27 Dec 7, 2022
The spatial message broker and database for real-time multiplayer experiences. Official Rust implementation.

WorldQL Server Rust implementation of WorldQL, the spatial message broker and database for real-time multiplayer experiences Setup Instructions ⚠️ Thi

null 214 Jan 2, 2023
The rust client for CeresDB. CeresDB is a high-performance, distributed, schema-less, cloud native time-series database that can handle both time-series and analytics workloads.

The rust client for CeresDB. CeresDB is a high-performance, distributed, schema-less, cloud native time-series database that can handle both time-series and analytics workloads.

null 12 Nov 18, 2022
A fast and simple in-memory database with a key-value data model written in Rust

Segment Segment is a simple & fast in-memory database with a key-value data model written in Rust. Features Dynamic keyspaces Keyspace level control o

Segment 61 Jan 5, 2023
🐸Slippi DB ingests Slippi replays and puts the data into a SQLite database for easier parsing.

The primary goal of this project is to make it easier to analyze large amounts of Slippi data. Its end goal is to create something similar to Ballchasing.com but for Melee.

Max Timkovich 20 Jan 2, 2023
Scalable and encrypted embedded database with 3-tier caching

Infinitree is a versioned, embedded database that uses uniform, encrypted blobs to store data.

Symmetree Research Labs 116 Dec 27, 2022
Manage database roles and privileges in GitOps style

grant.rs Manage Redshift database roles and privileges in GitOps style. Usage Install binary from crates.io cargo install grant Using grant tool: $ gr

Duyet Le 13 Nov 23, 2022
tectonicdb is a fast, highly compressed standalone database and streaming protocol for order book ticks.

tectonicdb crate docs.rs crate.io tectonicdb tdb-core tdb-server-core tdb-cli tectonicdb is a fast, highly compressed standalone database and streamin

Ricky Han 525 Dec 23, 2022
open source training courses about distributed database and distributed systemes

Welcome to learn Talent Plan Courses! Talent Plan is an open source training program initiated by PingCAP. It aims to create or combine some open sour

PingCAP 8.3k Dec 30, 2022
Distributed, version controlled, SQL database with cryptographically verifiable storage, queries and results. Think git for postgres.

SDB - SignatureDB Distributed, version controlled, SQL database with cryptographically verifiable storage, queries and results. Think git for postgres

Fremantle Industries 5 Apr 26, 2022
Grsql is a great tool to allow you set up your remote sqlite database as service and CRUD(create/read/update/delete) it using gRPC.

Grsql is a great tool to allow you set up your remote sqlite database as service and CRUD (create/ read/ update/ delete) it using gRPC. Why Create Thi

Bruce Yuan 33 Dec 16, 2022