0.10.7 • Published 3 months ago

@libreservice/my-rime v0.10.7

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
-
Last release
3 months ago

My RIME 梧桐输入法

npm.io

Online Chinese IME powered by RIME.

https://my-rime.vercel.app/

This is a STATIC website so you DON'T need to own a server to host it.

All computation is performed in browser, thanks to Web Assembly.

It's also a PWA, so you can install it like a native App and use it OFFLINE.

Documentation

If you want to distribute your own IME, see customize.

If you want to deploy schemas dynamically (online, like how you deploy in Desktop/Mobile platforms), see deploy.

If you want to develop My RIME or know technical details, see develop.

Self host

Download latest artifact built by GitHub Actions.

Development workflow

My RIME can be built on Linux, macOS and Windows.

Install node

You may use nvm or winget to install node.

Install pnpm and dev dependencies

npm i -g pnpm
pnpm i

Install build and RIME dependencies

# Ubuntu
apt install -y \
  cmake \
  ninja-build \
  clang-format \
  libboost-dev \
  libboost-regex-dev \
  libyaml-cpp-dev \
  libleveldb-dev \
  libmarisa-dev \
  libopencc-dev

# macOS
brew install cmake ninja clang-format

# Windows
winget install cmake Ninja-build.Ninja LLVM

Install emsdk

https://emscripten.org/docs/getting_started/downloads.html

Get submodule

It's not recommended to clone recursively, as many boost libs are not needed.

pnpm run submodule

Get font

Uncommon characters are rendered using 遍黑体, 花园明朝 and 一点明朝.

pnpm run font

Build wasm

pnpm run native
pnpm run schema
export ENABLE_LOGGING=OFF # optional, default ON
export BUILD_TYPE=Debug # optional, default Release
pnpm run lib
pnpm run wasm

Run develop server

pnpm run dev

The app is accessible at http://localhost:5173

Optionally, go to http://localhost:5173/?debug=on or turn on Advanced switch so that you can send raw key sequences to librime, e.g. {Shift+Delete}, {Release+a}. This feature is better used with log enabled.

Lint

pnpm run lint:fix

Check type

pnpm run check

Build

pnpm run build

Test

pnpm run test

Preview

pnpm run preview

Deploy (maintainer only)

# publish IMEs
declare -a packages=(
  ... # targets output by pnpm run schema
)
for package in "${packages[@]}"; do
  pushd public/ime/$package
  npm publish
  popd
done

# set VERSION to avoid CDN and browser caching old version
export LIBRESERVICE_CDN=https://cdn.jsdelivr.net/npm/@libreservice/my-rime@VERSION/dist/
export RIME_CDN=https://cdn.jsdelivr.net/npm/@rime-contrib/

vercel build --prod
npm publish
vercel deploy --prebuilt --prod

Docker

docker build \
  --build-arg ENABLE_LOGGING=OFF \
  -t my-rime .
docker run --name my-rime -d my-rime

Let's say the IP address of the container is 172.17.0.2 (got by docker inspect my-rime | grep IPAddress), then My RIME is accessible at http://172.17.0.2/.

License

AGPLv3+

0.10.7

3 months ago

0.10.6

4 months ago

0.9.8

9 months ago

0.9.7

9 months ago

0.9.9

9 months ago

0.9.4

9 months ago

0.9.3

9 months ago

0.9.6

9 months ago

0.9.5

9 months ago

0.10.1

8 months ago

0.10.2

7 months ago

0.10.4

7 months ago

0.10.0

8 months ago

0.9.0

10 months ago

0.8.0

10 months ago

0.9.2

9 months ago

0.9.1

10 months ago

0.7.4

11 months ago

0.7.2

11 months ago

0.7.1

11 months ago

0.7.3

11 months ago

0.7.0

11 months ago

0.3.0

1 year ago

0.2.0

1 year ago

0.6.3

1 year ago

0.6.2

1 year ago

0.6.4

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.1

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago