Skip to content

chore(common): Establish Rust development environment #5069

@mcdurdin

Description

@mcdurdin

This is groundwork for the LDML keyboard implementation as part of Keyman Core. The Rust environment should be configured to be available to all components, not just Keyman Core.

References

Infrastructure requirements

This infrastructure must work on Windows, Linux and macOS.

  • Rust compiler, linker, build scripts
  • Rust WASM compiler
  • A mock interface in Rust
  • A headless caller into Rust to test (data driven)
    • See kmxkbd/ for unit testing
    • Test runner should be able to run directly to:
      • Rust implementation
      • C++ framework
      • Typescript framework
      • Java (for CLDR's own ci)? (or could just call into cmd line)
      • Implementation of the test runner in the above languages
      • Command line driven
        • test_kmldmlkbd en-t-k0-xfoo.ldml "context" "key key key" "output"
        • or, test_kmldmlkbd en-t-k0.xfoo.test

Platform specification

  • Windows:

    • link with meson projects (common/core/desktop)
    • link with Visual Studio projects (windows/src/engine)
  • macOS

    • link with meson projects (common/core/desktop)
    • link with XCode ObjC projects (mac/KeymanEngine4Mac)
  • Linux

    • link with meson projects (common/core/desktop)
    • link with ibus-keyman project (linux/ibus-keyman)
  • Web

    • Compile to WASM
    • Include a test interface?

Questions on code ownership and location

  • Where should the [Rust] code live?
    • Separate repo?
    • Initially, for basic exploration use Keyman monorepo, then perhaps move to a separate repo and use Rust crates to distribute.
    • Unicode has an infrastructure committee that does licensing, maintenance responsibility, etc.
  • Namespace for the Rust code?
    • icu_? (ala icu4x)
    • keyman_ldml initially?
  • Licensing for Unicode.org code is MIT. Question on copyright. Retain SIL International copyright; when repo moves to Unicode, will append Unicode copyright.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions