Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A sample project which creates a shared object (.so) file on linux using Rust programming language and calls it's function from another rust program.

License

NotificationsYou must be signed in to change notification settings

GaneshJadhavOnGitHub/Shared-Object-Library-Using-Rust

Repository files navigation

A sample project which creates a shared object (.so) library on linux using Rust programming language and calls it's function from another rust program.


Shared Object (.so) File :-

In simple words, a '.so' file on linux is what a 'dll' on windows.

It is a library that is linked to the executable but it is not embedded inside executable like static library (.a),so it will be loaded only when the executable is loaded.


For System Requirements please refer 'Application_Requirements.txt'


How to run the project.

  1. Clone the repository.

  2. Navigate inside project folder 'addition_library' from terminal.

  3. Build this Library project using following command -
    cargo build

  4. Navigate inside project folder 'addition_client' from terminal.

  5. Build and run this binary project using following commands -

    cargo build

    cargo run


Application is tested on Ubuntu 20.04.5 LTS with WSL2 on Windows 10, working well.

Tested on Ubuntu 22.04.2 LTS using github actions, working well.


Output :-

  1. Build Library project :

Output1

  1. Build and Run Binary project :

Output2


addition_library project dependency tree

addition_library v0.1.0 () -

addition_client project dependency tree

addition_client v0.1.0  () - `-- addition_library feature "default"    `-- addition_library v0.1.0 () -

Repository Tree Structure

├── .github    └── workflows    │   └── rust.yml├── Application_Requirements.txt├── LICENSE├── Output1.png├── Output2.png├── README.md└── SharedObjectFile    ├── addition_client        ├── .gitignore        ├── Cargo.lock        ├── Cargo.toml        └── src        │   └── main.rs    └── addition_library        ├── .gitignore        ├── Cargo.toml        └── src            └── lib.rs

About

A sample project which creates a shared object (.so) file on linux using Rust programming language and calls it's function from another rust program.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp