開発中の確認は主にcargo build
と cargo test
でできるようにしています。
Nightlyでのチェックはrustupでnightlyをインストール後、
cargo clean && cargo +nightly check
C ABI ライブラリを確認する場合、以下のような手作業です。
cargo cbuild
cp target/x86_64-unknown-linux-gnu/debug/libcskk.h ./tests/
$(CC) tests/c_shared_lib_test.c -L ./target/x86_64-unknown-linux-gnu/debug/ -lcskk -o tests/lib_test
LD_LIBRARY_PATH=./target/x86_64-unknown-linux-gnu/debug ./tests/lib_test
cargo build
and cargo test
shall be enough for most of the development.
To check in nightly channel, install nightly on rustup and then run
cargo clean && cargo +nightly check
To generate the C ABI library,
cargo cbuild
cp target/x86_64-unknown-linux-gnu/debug/libcskk.h ./tests/
$(CC) tests/c_shared_lib_test.c -L ./target/x86_64-unknown-linux-gnu/debug/ -lcskk -o tests/lib_test
LD_LIBRARY_PATH=./target/x86_64-unknown-linux-gnu/debug ./tests/lib_test