Run the following commands from the workspace root:
cargo clippy --all --all-features
cargo +nightly fmt --allNote:
cargo +nightly fmtmay reflow doc comments (e.g./// @param …lines). Do not revert those changes — they are intentional formatting output and should be committed as-is.
Build the native .node binary from the nodejs/ directory:
npm run build:debugnodejs/index.d.ts and nodejs/index.js are auto-generated by
npm run build:debug — never edit them by hand.
Run the following command from the workspace root to regenerate the Rust proto source files
(e.g. rust/crates/proto/src/longbridge.control.v1.rs,
rust/crates/proto/src/longbridge.quote.v1.rs,
rust/crates/proto/src/longbridge.trade.v1.rs):
cargo make protocThe generated *.rs files under rust/crates/proto/src/ are auto-generated — never edit
them by hand.
python/pysrc/longbridge/openapi.pyi is a manually maintained type-stub
file that provides type hints and docstrings for the native Rust/PyO3 extension
module. IDEs and type checkers (mypy/pyright) rely on it for autocompletion and
static analysis.
When you add, remove, or change any #[pyclass]/#[pymethods] definitions in
python/src/, you must update openapi.pyi accordingly — keeping
signatures, type annotations, and docstrings in sync with the Rust
implementation.
c/csrc/include/longbridge.h is auto-generated by cbindgen during the
build — never edit it by hand. Rebuild the C crate to update it:
cargo build -p longbridge-cUpdate CHANGELOG.md in the workspace root to document notable changes. The
format follows Keep a Changelog. Add an
entry under the [Unreleased] section in the appropriate subsection (Added,
Changed, Fixed, Breaking changes, etc.). If the [Unreleased] section
does not yet exist, create it at the top of the changelog (above the latest
versioned block).