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