| Crates.io | org-social-lib-rs |
| lib.rs | org-social-lib-rs |
| version | 0.6.0-rc2 |
| created_at | 2025-08-28 00:47:34.390342+00 |
| updated_at | 2025-10-27 19:12:20.785683+00 |
| description | A Rust library for parsing and interacting with Org-social decentralized social networks |
| homepage | https://github.com/AdsanTheGreat/org-social-lib-rs |
| repository | https://github.com/AdsanTheGreat/org-social-lib-rs |
| max_upload_size | |
| id | 1813413 |
| size | 308,896 |
A Rust library for parsing and interacting with Org-social decentralized social networks.
Current version is targeting 1.3 release.
org-social-lib-rs provides the core functionality for working with org-social feeds. It handles parsing org-mode social files, tokenizing different org mode elements (WIP), and managing using the social network. It basically constitutes the backend of any org-social application.
org-social-rs works with org-social files as-specified in current target release, with some exceptions where I've noticed people differ. The parsing is very unstable, it is prone to breakage if the format changes.
In no particular order:
Add this to your Cargo.toml:
[dependencies]
org-social-lib-rs = "0.5.0"
Or if you want to use the latest development version from git:
[dependencies]
org-social-lib-rs = { git = "https://github.com/AdsanTheGreat/org-social-lib-rs" }
fetch (default) - Enables asynchronous network fetching using reqwest and tokio. Disable it for fully offline builds (for example when targeting WASM environments without networking support).serialize - Enables serde-based serialization for profiles and posts when you need to export them to external formats. Tokens and blocks are not serialized.autotokenize - Automatically parse post content into tokens and blocks when creating or modifying posts. Disabled by default for performance reasons (and it's not always needed to tokenize everything). If disabled, the parse_content() method has to be called manually to parse the content.use org_social_lib_rs::parser;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// Parse a local org-social file
let content = std::fs::read_to_string("social.org")?;
let (profile, posts) = parser::parse_file(&content, Some("https://example.com/social.org".to_string()));
// Access posts and profile information
println!("Feed author: {}", profile.title());
for post in posts {
println!("Post: {} - {}", post.id(), post.content());
}
Ok(())
}
Currently, the only documentation are the documenting comments. They are very WIP, inconsitent and usually not enough.
Report issues, submit pull requests, help is welcome. You can also reach out at org-social itself.
This project is licensed under the GNU General Public License v3.0.