libchewing icon indicating copy to clipboard operation
libchewing copied to clipboard

A Smooth Transition to Rust - Documenting Existing Development Workflow.

Open ianchen-tw opened this issue 1 year ago • 0 comments

Introduction

The libchewing project is currently undergoing a transition from C to Rust. This change will require updating the methods used for building, testing, and deploying the project. As a result, existing documents and scripts utilized in the development process will gradually become out-of-sync.

Purpose of this issue

The goal of this issue is to make the transition process as smooth as possible. As a result, there are two tasks that will be tracked in this issue.

  1. Ensure that there exists an environment guaranteed to work for developing this project by utilizing dev-containers
    • #396
    • #398
  2. Summarize and document existing tools and scripts used in the development process.
    • #401

I'll help to record existing tools and scripts in the following section. Feel free to leave any comments below.

(WIP) Scripts and Tools Used in the developing process

  • TBD:
    • [ ] test/stresstest.py

Fully automated Tests

  1. Files in test/***-test.c

Chores

  1. Generate project docs with textinfo
    • doc/
  2. Generate keystroke files as test input
    • test/genkeystroke.c
    • test/randkeystroke.c

Semi-automated Tests

  1. Soak testing - continuously give keystrokes and make sure the library won't crash. (test/stress.c)
  2. Performance testing - Peek the throughput of libchewing by feeding example keystrokes (test/performance.c)
  3. Simulate some important test cases, see how libchewing performs (test/simulate.c, test/materials.txt)

Debugging

  1. Use Gdb for debugging (test/debug-chewing-shell.sh)

Deployment

  1. Install runtime related data: data/

Notes

  1. programs under test/ need to run with cwd=test/, cd to test before running

ianchen-tw avatar May 16 '23 09:05 ianchen-tw