인터페이스는 현지화되어 있으며, Skill 소개와 설명 문서는 선택한 언어로 AI가 자동 번역합니다. 코드·명령어·경로·전문 용어는 원문을 유지하며 원작자 문서가 우선합니다.
Skills 둘러보기
생산성 및 협업 · SKILL.md

rust-bindings

rust-bindings

Guides Rust ltp crate and ltp-cffi workflows for legacy CWS/POS/NER model loading, features, builds, and diagnostics.

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill 문서

GitHub

name: rust-bindings description: "Guides Rust ltp crate and ltp-cffi workflows for legacy CWS/POS/NER model loading, features, builds, and diagnostics." disable-model-invocation: true metadata: disco-role: operating license: CC BY-NC 4.0

Rust Bindings

Use this sub-skill for native Rust or C workflows around LTP's legacy CWS/POS/NER implementation.

Choose this route when

  • The user asks for the Rust crate ltp, CWSModel, POSModel, NERModel, ModelSerde, Cargo features, or Rust examples.
  • The task involves ltp-cffi, static/dynamic C library builds, C headers/symbols, or linking a C program to LTP.
  • The user needs to diagnose missing Rust toolchains, feature flags, or legacy model binary paths.

For Python ltp_extension wrappers, use ../legacy-extension/SKILL.md. For neural Python inference/training, use the Python sub-skills.

Safe workflow

  1. Run the static checker against a checkout or staged source tree:

    python scripts/check_rust_layout.py --repo-root /path/to/ltp-checkout
    

    It checks manifests, toolchain presence, feature hints, and optional legacy model files. It does not build by default.

  2. For Rust model loading, enable required features:

    [dependencies]
    ltp = { version = "0.1", features = ["serialization", "parallel"] }
    itertools = "0.14"
    apache-avro = "0.18"
    
  3. Use model files explicitly:

    use std::fs::File;
    use ltp::{CWSModel, POSModel, NERModel, ModelSerde, Format, Codec};
    
    let cws: CWSModel = ModelSerde::load(File::open("cws_model.bin")?, Format::AVRO(Codec::Deflate))?;
    
  4. Build ltp-cffi only after Rust and a C toolchain are intentionally available.

Read these references

Boundaries

  • This skill does not ship legacy model binaries or build artifacts.
  • Rust/C examples require cargo/rustc and model files; the production environment that created this skill did not verify local Rust builds.
  • Do not route Python wheel install problems here unless they involve the source Rust extension boundary; use root packaging and legacy-extension guidance first.
저장한 Skills