mountpoint-s3-crt 0.2.2

Rust interface to the AWS Common Runtime for Mountpoint for Amazon S3.
Documentation
//! Implementation of the HTTP/1.1 HTTP/2 specifications.

use std::sync::Once;

use mountpoint_s3_crt_sys::*;

use crate::common::allocator::Allocator;

pub mod request_response;

static HTTP_LIBRARY_INIT: Once = Once::new();

/// Set up the aws-c-http library using the given allocator.
fn http_library_init(allocator: &Allocator) {
    HTTP_LIBRARY_INIT.call_once(|| {
        // Safety: the CRT ensures this call happens only once.
        unsafe {
            aws_http_library_init(allocator.inner.as_ptr());
        }
    });
}