What resources would you recommend to a beginner that has to create a library with Rust?

Hi all, I want to build a Rust library about time series forecasting for my thesis, do you have any resource to recomend to an experienced programmed, which is quite new to Rust?

1 Like

It's worth skimming through The Book to familiarise yourself with the language.

If you come from other languages, particularly garbage collected ones like JavaScript or Python, then expect to go through a period often referred to as "Fighting the Borrow Checker". This often occurs because GC'd languages let you structure your code in ways that don't work in a language without a GC. My advice is to avoid creating webs of interlinked objects try to structure your code and ownership story in a more tree-like fashion. Also, don't hesitate to ask questions on this forum if you run into situations where your intuition says one thing and the compiler errors say something else.

To get a better intuition for unsafe, Learn Rust With Entirely Too Many Linked Lists is a good resource. Although I doubt you will be doing any unsafe for something that is primarily about maths and calculations.

The blessed.rs site provides a list of the go-to crates for certain problem domains. For example, the general section mentions crates for serializing data (serde), dealing with time (time and chrono), and so on. There is also a math section which mentions crates for linear algebra (nalgebra) and data frames (polars). You may also be interested in using Arrow for your data format because it allows easy interop with other languages, in which case I'd recommend the arrow2 (docs) over the official arrow crate because it has a more idiomatic API.

The Polars docs are also quite comprehensive and warrant a visit if you are looking for a Rust alternative to numpy.


This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.