bit_io_native

Native HTTP, process, and worktree adapters for bit

git
io
native
moon add mizchi/bit_io_native@0.46.4
Download zip
Author
Version
0.46.4
License
Apache-2.0
Last updated
4 days ago
Downloads
495
README

#bit_io_native

Native transport and filesystem adapters for bit.

#
NativeHttpClient

pub struct NativeHttpClient {
dummy : Int
}

#
NativeHttpClient::new

#
clone_http

async fn clone_http(remote : String, prefer_v2 : Bool, depth? : Int, filter? :
FilterSpec
) -> (Array[(
ObjectId
, String)], Array[
PackObject
]) raise
GitError

#
clone_http_to_fs

async fn clone_http_to_fs(remote : String, prefer_v2 : Bool, fs : &
FileSystem
, root : String, rfs : &
RepoFileSystem
, depth? : Int, filter? :
FilterSpec
, no_checkout? : Bool) -> Array[(
ObjectId
, String)] raise
GitError

Clone and checkout into filesystem under root.
  • depth > 0: shallow clone with that depth
  • filter: partial clone filter (e.g., FilterSpec::BlobNone)

#
clone_process

async fn clone_process(remote : String, prefer_v2 : Bool, depth? : Int, filter? :
FilterSpec
) -> (Array[(
ObjectId
, String)], Array[
PackObject
]) raise
GitError

#
clone_process_to_fs

async fn clone_process_to_fs(remote : String, prefer_v2 : Bool, fs : &
FileSystem
, root : String, rfs : &
RepoFileSystem
, depth? : Int, filter? :
FilterSpec
, no_checkout? : Bool) -> Array[(
ObjectId
, String)] raise
GitError

Clone and checkout into filesystem under root.

#
clone_remote

async fn clone_remote(remote : String, prefer_v2 : Bool) -> (Array[(
ObjectId
, String)], Array[
PackObject
]) raise
GitError

#
clone_remote_to_fs

async fn clone_remote_to_fs(remote : String, prefer_v2 : Bool, fs : &
FileSystem
, root : String, rfs : &
RepoFileSystem
) -> Array[(
ObjectId
, String)] raise
GitError

#
clone_to_fs_with_http

async fn clone_to_fs_with_http(remote : String, prefer_v2 : Bool, depth : Int, filter :
FilterSpec
, fs : &
FileSystem
, root : String, http_get : async (String, Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError
, http_post : async (String, Bytes, Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError
, rfs : &
RepoFileSystem
, no_checkout? : Bool) -> Array[(
ObjectId
, String)] raise
GitError

#
clone_with_http

async fn clone_with_http(remote : String, prefer_v2 : Bool, depth : Int, filter :
FilterSpec
, http_get : async (String, Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError
, http_post : async (String, Bytes, Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError
) -> (Array[(
ObjectId
, String)], Array[
PackObject
]) raise
GitError

#
discover_receive_refs_http

Fetch receive-pack refs via smart HTTP (native)

#
discover_refs

Discover refs and capabilities from remote (native)

#
discover_upload_refs

async fn discover_upload_refs(remote : String, prefer_v2 : Bool) -> (Array[(
ObjectId
, String)], Array[String],
ProtocolVersion
, Map[String, String]) raise
GitError

#
discover_upload_refs_http

async fn discover_upload_refs_http(remote : String, prefer_v2 : Bool) -> (Array[(
ObjectId
, String)], Array[String],
ProtocolVersion
, Map[String, String]) raise
GitError

#
discover_upload_refs_process

async fn discover_upload_refs_process(remote : String, prefer_v2 : Bool) -> (Array[(
ObjectId
, String)], Array[String],
ProtocolVersion
, Map[String, String]) raise
GitError

#
discover_upload_refs_with_http

async fn discover_upload_refs_with_http(remote : String, prefer_v2 : Bool, http_get : async (String, Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError
, http_post : async (String, Bytes, Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError
) -> (Array[(
ObjectId
, String)], Array[String],
ProtocolVersion
, Map[String, String]) raise
GitError

#
fetch_objects_process

#
fetch_objects_with_http

async fn fetch_objects_with_http(remote : String, wants : Array[
ObjectId
], prefer_v2 : Bool, depth : Int, filter :
FilterSpec
, http_get : async (String, Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError
, http_post : async (String, Bytes, Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError
, haves? : Array[
ObjectId
], shallow? : Array[
ObjectId
]) -> Array[
PackObject
] raise
GitError

#
fetch_pack

async fn fetch_pack(remote : String, wants : Array[
ObjectId
], prefer_v2 : Bool, haves? : Array[
ObjectId
], shallow? : Array[
ObjectId
]) -> Bytes raise
GitError

#
fetch_pack_http

async fn fetch_pack_http(remote : String, wants : Array[
ObjectId
], prefer_v2 : Bool, depth? : Int, filter? :
FilterSpec
, haves? : Array[
ObjectId
], shallow? : Array[
ObjectId
]) -> Bytes raise
GitError

#
fetch_pack_process

async fn fetch_pack_process(remote : String, wants : Array[
ObjectId
], prefer_v2 : Bool, depth? : Int, filter? :
FilterSpec
, haves? : Array[
ObjectId
], shallow? : Array[
ObjectId
]) -> Bytes raise
GitError

#
fetch_pack_process_result

#
fetch_pack_with_http

async fn fetch_pack_with_http(remote : String, wants : Array[
ObjectId
], prefer_v2 : Bool, depth : Int, filter :
FilterSpec
, http_get : async (String, Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError
, http_post : async (String, Bytes, Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError
, haves? : Array[
ObjectId
], shallow? : Array[
ObjectId
]) -> Bytes raise
GitError

#
fetch_pack_with_http_result

async fn fetch_pack_with_http_result(remote : String, wants : Array[
ObjectId
], prefer_v2 : Bool, depth : Int, filter :
FilterSpec
, http_get : async (String, Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError
, http_post : async (String, Bytes, Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError
, haves? : Array[
ObjectId
], shallow? : Array[
ObjectId
]) ->
FetchPackResult
raise
GitError

#
init_env_provider

fn init_env_provider() -> Unit

#
init_native_io

fn init_native_io() -> Unit

#
init_worktree_probe

fn init_worktree_probe() -> Unit

#
native_http_get

async fn native_http_get(url : String, headers : Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError

#
native_http_post

async fn native_http_post(url : String, body : Bytes, headers : Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError

#
native_http_put

async fn native_http_put(url : String, body : Bytes, headers : Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError

#
native_readdir_typed

fn native_readdir_typed(path : String) -> Array[(String, Int)]?

Read directory entries with d_type info via native readdir. Returns array of (name, d_type) pairs where d_type: 4=DT_DIR, 8=DT_REG, 10=DT_LNK, 0=DT_UNKNOWN.

#
push

Push a packfile to remote repository (native)

#
push_file

async fn push_file(remote :
Remote
, content : Bytes, filename : String, message : String, author : String, timestamp : Int64, parent :
ObjectId
?) ->
ObjectId
raise
GitError

Push a single file as a new commit (native)

#
upload_pack_info_refs

async fn upload_pack_info_refs(remote : String, prefer_v2 : Bool) -> Bytes raise
GitError

#
upload_pack_info_refs_http

async fn upload_pack_info_refs_http(remote : String, prefer_v2 : Bool) -> Bytes raise
GitError

#
upload_pack_info_refs_process

async fn upload_pack_info_refs_process(remote : String, prefer_v2 : Bool) -> Bytes raise
GitError

#
upload_pack_info_refs_with_http

async fn upload_pack_info_refs_with_http(remote : String, prefer_v2 : Bool, http_get : async (String, Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError
) -> Bytes raise
GitError

#
upload_pack_request

async fn upload_pack_request(remote : String, body : Bytes, prefer_v2 : Bool) -> Bytes raise
GitError

#
upload_pack_request_http

async fn upload_pack_request_http(remote : String, body : Bytes, prefer_v2 : Bool) -> Bytes raise
GitError

#
upload_pack_request_process

async fn upload_pack_request_process(remote : String, body : Bytes, prefer_v2 : Bool) -> Bytes raise
GitError

#
upload_pack_request_with_http

async fn upload_pack_request_with_http(remote : String, body : Bytes, prefer_v2 : Bool, http_post : async (String, Bytes, Map[String, String]) -> (
HttpResponse
, Bytes) raise
GitError
) -> Bytes raise
GitError

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io