rime-react
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

RIME React

RIME React is a React Component for the RIME Input Method Engine. It is compiled to WebAssembly with Emscripten and runs purely on client-side.

Installation

  • npm: npm i rime-react
  • bun: bun i rime-react

Usage

See the RIME React Demo repo.

Development

Prerequisites

  • Bun

    Execute the command provided on the website to install Bun. Alternatively, you may install it with npm:

    npm i -g bun
  • CMake

  • Ninja

  • LLVM (Windows only)

    You may install the above prerequisites with the following commands:

    # Ubuntu
    sudo apt install -y cmake ninja-build
    # macOS
    brew install cmake ninja
    # Windows
    choco install -y cmake --ia "ADD_CMAKE_TO_PATH=System"
    choco install -y ninja llvm

    On Windows, you may skip the installation above and execute subsequent commands in Developer PowerShell for Visual Studio if you have Visual Studio installed.

  • Emscripten

    Follow the installation guide to install Emscripten.

Compilation

On Ubuntu, the following additional packages should be pre-installed:

sudo apt install -y \
    libboost-dev \
    libboost-regex-dev \
    libyaml-cpp-dev \
    libleveldb-dev \
    libmarisa-dev \
    libopencc-dev

Then, execute the following commands in order:

bun run boost
bun run native
bun run lib
bun run wasm

Building the Project

bun run build

Package Sidebar

Install

npm i rime-react

Weekly Downloads

7

Version

0.1.1

License

BSD-3-Clause

Unpacked Size

2.43 MB

Total Files

7

Last publish

Collaborators

  • ayaka14732
  • graphemecluster