Skip to content

restsend/restsend-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Restsend Client SDK

Introduction

Restsend is a secure embeding instant messaging system. This is the client SDK of Restsend, which is written in Rust. Restsend is a team that provides IM/RTC API services. We are committed to implementing reliable communication services.

Demo: demo page 中文文档

Code dependency and environment preparation

  • rustc 1.77.2 (25ef9e3d8 2024-04-09) or above

    For china mainland developer: You can use rsproxy.cn to speed up the compilation

  • iOS development environment preparation: (Only for M1/M2 machine)
    rustup target add aarch64-apple-ios aarch64-apple-ios-sim x86_64-apple-darwin

How to build

iOS build

  • Debug version: simulator
    cargo build --target aarch64-apple-ios-sim
    # if you are using x86 machine
    cargo build  --target x86_64-apple-darwin 

    # build swift binding code
    cargo run --target aarch64-apple-ios-sim --bin bindgen -- --language swift
  • Release version: device
    cargo build --target aarch64-apple-ios
    # build swift binding code
    cargo run --target aarch64-apple-ios --bin bindgen -- --language swift

iOS Demo

    git clone https://github.com/restsend/restsend-swift.git
    cd restsend-swift
    pod install

Web build

    cd crates/restsend-wasm
    # test rust library, the outout dir is `restsend-rs/crates/restsend-wasm/pkg`
    npm run test

Build the wasm library and js binding code, the outout dir is restsend-rs/js

    cd crates/restsend-wasm
    npm run dist

Show the web demo

    cd crates/restsend-wasm
    npm run dev