rustsf 0.1.1

Salesforce SDK for Rust, supports the latest API version 68.0, (Winter 2026)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use rustsf::{AuthUrl, Error, RestApi, SalesforceCredentials};
use serde_json::json;
use std::env;

#[tokio::main]
async fn main() -> Result<(), Error> {
	let auth_url = env::var("SFDC_AUTH_URL").unwrap();
	let credentials = SalesforceCredentials::sfdx_url(auth_url).unwrap();
	let api = RestApi::new(credentials).await.unwrap();

	let body = api.create("Account", json!({"Name": "hello rust"})).await?;
	println!("{:?}", body);

	Ok(())
}