Hi,

I'm considering migrating a legacy system written in C++ to Rust.  It runs
on Windows, has dependencies such as boost and Windows GDI+ (yes it has a
Win32 window on the screen), and receives real-time messages via an
internal low-latency library.  Based on these conditions, I consider a
direct full-stack migration is infeasible.  So I am considering two
alternatives:

1. Write core business logic (including spawning and managing multiple
worker threads) in Rust and compile as a static library which can be linked
together with other C++ code (that I cannot change).

2. Wrap the unchangeable C++ code as a C library, and use the library from
Rust.  The wrapping is needed because I read from Rust docs that it's not
possible to call C++ directly at present.

I am completely a newbie in Rust and hope you could give your advice on
which way to choose, or on better alternatives :-)

P.S.  For alternative 1, I wonder if MinGW run-time libraries are needed
when the linked program is deployed.  I would prefer completely native
executable without external run-time dependencies.

Thanks
Xiao Jia
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to