libgit2

package module
v0.1.10907 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: BSD-2-Clause, BSD-3-Clause, CC0-1.0, + 6 more Imports: 6 Imported by: 0

Documentation

Overview

Package libgit2 is libgit2 compiled to WebAssembly and translated to Go by wasm2go. The functions it exports are defined in c/g2.c.

It is the low-level half of github.com/msuozzo/go-git2, which provides the git API and the host side of the module: its WASI preview1 imports and its linear memory. build/regen.sh produces libgit2.go, libgit2.dat, meta.go, LICENSE and LICENSE.wasi-libc. See build/README.md.

This module, including g2.c, is distributed under libgit2's license, the GNU GPL v2 with a linking exception (see LICENSE). The module also contains wasi-libc (see LICENSE.wasi-libc).

Versions encode the libgit2 release in the patch number, as go-sqlite3-wasm does for SQLite. For example, v0.N.10907 is build N of libgit2 1.9.7.

Index

Constants

View Source
const MinPages = 18

MinPages is the initial size of linear memory, in 64 KiB pages.

View Source
const Version = "1.9.7"

Version of libgit2 compiled into this module.

Variables

View Source
var LicenseLibgit2 string

LicenseLibgit2 is the license of libgit2 and of the dependencies it bundles, whose compiled form this package embeds. It is also the license of this module.

View Source
var LicenseWASILibc string

LicenseWASILibc holds the licenses of wasi-libc, including musl and cloudlibc, whose compiled form this package embeds.

Functions

This section is empty.

Types

type Memory

type Memory = interface {
	Slice() *[]byte
	Grow(delta, max int64) int64
}

type Module

type Module struct {
	// contains filtered or unexported fields
}

func New

func New(v0 Xenv, v1 Xwasi_snapshot_preview1) *Module

func (*Module) X_initialize

func (m *Module) X_initialize()

func (*Module) Xg2_blob_free

func (m *Module) Xg2_blob_free(v0 int32)

func (*Module) Xg2_blob_lookup

func (m *Module) Xg2_blob_lookup(v0, v1, v2, v3, v4 int32) int32

func (*Module) Xg2_buf

func (m *Module) Xg2_buf() int32

func (*Module) Xg2_buf_size

func (m *Module) Xg2_buf_size() int32

func (*Module) Xg2_close

func (m *Module) Xg2_close(v0, v1 int32)

func (*Module) Xg2_errclass

func (m *Module) Xg2_errclass() int32

func (*Module) Xg2_errmsg

func (m *Module) Xg2_errmsg() int32

func (*Module) Xg2_free

func (m *Module) Xg2_free(v0 int32)

func (*Module) Xg2_init

func (m *Module) Xg2_init(v0, v1, v2, v3, v4, v5, v6, v7 int32) int32

func (*Module) Xg2_is_shallow

func (m *Module) Xg2_is_shallow(v0 int32) int32

func (*Module) Xg2_malloc

func (m *Module) Xg2_malloc(v0 int32) int32

func (*Module) Xg2_odb_exists

func (m *Module) Xg2_odb_exists(v0, v1 int32) int32

func (*Module) Xg2_odb_object_free

func (m *Module) Xg2_odb_object_free(v0 int32)

func (*Module) Xg2_odb_read

func (m *Module) Xg2_odb_read(v0, v1, v2, v3, v4, v5 int32) int32

func (*Module) Xg2_odb_read_header

func (m *Module) Xg2_odb_read_header(v0, v1, v2, v3 int32) int32

func (*Module) Xg2_open

func (m *Module) Xg2_open(v0, v1, v2 int32) int32

func (*Module) Xg2_peel

func (m *Module) Xg2_peel(v0, v1, v2, v3 int32) int32

func (*Module) Xg2_ref_free

func (m *Module) Xg2_ref_free(v0 int32)

func (*Module) Xg2_ref_info

func (m *Module) Xg2_ref_info(v0, v1, v2, v3, v4, v5, v6 int32)

func (*Module) Xg2_ref_iter_free

func (m *Module) Xg2_ref_iter_free(v0 int32)

func (*Module) Xg2_ref_iter_new

func (m *Module) Xg2_ref_iter_new(v0, v1, v2 int32) int32

func (*Module) Xg2_ref_lookup

func (m *Module) Xg2_ref_lookup(v0, v1, v2, v3 int32) int32

func (*Module) Xg2_ref_next

func (m *Module) Xg2_ref_next(v0, v1 int32) int32

func (*Module) Xg2_repository_path

func (m *Module) Xg2_repository_path(v0, v1 int32) int32

func (*Module) Xg2_revparse

func (m *Module) Xg2_revparse(v0, v1, v2 int32) int32

func (*Module) Xg2_tree_entry

func (m *Module) Xg2_tree_entry(v0, v1, v2, v3, v4, v5 int32) int32

func (*Module) Xg2_tree_entry_bypath

func (m *Module) Xg2_tree_entry_bypath(v0, v1, v2, v3, v4 int32) int32

func (*Module) Xg2_tree_free

func (m *Module) Xg2_tree_free(v0 int32)

func (*Module) Xg2_tree_lookup

func (m *Module) Xg2_tree_lookup(v0, v1, v2, v3 int32) int32

type Xenv

type Xenv = interface {
	Xmemory() Memory
}

type Xwasi_snapshot_preview1

type Xwasi_snapshot_preview1 = interface {
	Xclock_time_get(v0 int32, v1 int64, v2 int32) int32
	Xenviron_get(v0, v1 int32) int32
	Xenviron_sizes_get(v0, v1 int32) int32
	Xfd_close(v0 int32) int32
	Xfd_fdstat_get(v0, v1 int32) int32
	Xfd_filestat_get(v0, v1 int32) int32
	Xfd_pread(v0, v1, v2 int32, v3 int64, v4 int32) int32
	Xfd_prestat_dir_name(v0, v1, v2 int32) int32
	Xfd_prestat_get(v0, v1 int32) int32
	Xfd_pwrite(v0, v1, v2 int32, v3 int64, v4 int32) int32
	Xfd_read(v0, v1, v2, v3 int32) int32
	Xfd_readdir(v0, v1, v2 int32, v3 int64, v4 int32) int32
	Xfd_seek(v0 int32, v1 int64, v2, v3 int32) int32
	Xfd_sync(v0 int32) int32
	Xfd_write(v0, v1, v2, v3 int32) int32
	Xpath_create_directory(v0, v1, v2 int32) int32
	Xpath_filestat_get(v0, v1, v2, v3, v4 int32) int32
	Xpath_filestat_set_times(v0, v1, v2, v3 int32, v4, v5 int64, v6 int32) int32
	Xpath_link(v0, v1, v2, v3, v4, v5, v6 int32) int32
	Xpath_open(v0, v1, v2, v3, v4 int32, v5, v6 int64, v7, v8 int32) int32
	Xpath_readlink(v0, v1, v2, v3, v4, v5 int32) int32
	Xpath_remove_directory(v0, v1, v2 int32) int32
	Xpath_rename(v0, v1, v2, v3, v4, v5 int32) int32
	Xpath_unlink_file(v0, v1, v2 int32) int32
	Xproc_exit(v0 int32)
	Xrandom_get(v0, v1 int32) int32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL