An example of loading a dynamic library, and using the function it contains. This is achieved using the libloading crate.
getting-rusty/lib-loading on main [$] via π¦ v1.69.0
β tree . -d
.
βββ executor # Contains the executor crate
βΒ Β βββ src
βββ hello-world # Contains the hello-world shared library
βββ src- libloading (v0.8)
The project root contains a Makefile that can be used to build and run the project.
# Build the project
make build
# Run the project
make run