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
- Variables
- type Memory
- type Module
- func (m *Module) X_initialize()
- func (m *Module) Xg2_blob_free(v0 int32)
- func (m *Module) Xg2_blob_lookup(v0, v1, v2, v3, v4 int32) int32
- func (m *Module) Xg2_buf() int32
- func (m *Module) Xg2_buf_size() int32
- func (m *Module) Xg2_close(v0, v1 int32)
- func (m *Module) Xg2_errclass() int32
- func (m *Module) Xg2_errmsg() int32
- func (m *Module) Xg2_free(v0 int32)
- func (m *Module) Xg2_init(v0, v1, v2, v3, v4, v5, v6, v7 int32) int32
- func (m *Module) Xg2_is_shallow(v0 int32) int32
- func (m *Module) Xg2_malloc(v0 int32) int32
- func (m *Module) Xg2_odb_exists(v0, v1 int32) int32
- func (m *Module) Xg2_odb_object_free(v0 int32)
- func (m *Module) Xg2_odb_read(v0, v1, v2, v3, v4, v5 int32) int32
- func (m *Module) Xg2_odb_read_header(v0, v1, v2, v3 int32) int32
- func (m *Module) Xg2_open(v0, v1, v2 int32) int32
- func (m *Module) Xg2_peel(v0, v1, v2, v3 int32) int32
- func (m *Module) Xg2_ref_free(v0 int32)
- func (m *Module) Xg2_ref_info(v0, v1, v2, v3, v4, v5, v6 int32)
- func (m *Module) Xg2_ref_iter_free(v0 int32)
- func (m *Module) Xg2_ref_iter_new(v0, v1, v2 int32) int32
- func (m *Module) Xg2_ref_lookup(v0, v1, v2, v3 int32) int32
- func (m *Module) Xg2_ref_next(v0, v1 int32) int32
- func (m *Module) Xg2_repository_path(v0, v1 int32) int32
- func (m *Module) Xg2_revparse(v0, v1, v2 int32) int32
- func (m *Module) Xg2_tree_entry(v0, v1, v2, v3, v4, v5 int32) int32
- func (m *Module) Xg2_tree_entry_bypath(v0, v1, v2, v3, v4 int32) int32
- func (m *Module) Xg2_tree_free(v0 int32)
- func (m *Module) Xg2_tree_lookup(v0, v1, v2, v3 int32) int32
- type Xenv
- type Xwasi_snapshot_preview1
Constants ¶
const MinPages = 18
MinPages is the initial size of linear memory, in 64 KiB pages.
const Version = "1.9.7"
Version of libgit2 compiled into this module.
Variables ¶
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.
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 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 (*Module) Xg2_blob_lookup ¶
func (*Module) Xg2_buf_size ¶
func (*Module) Xg2_errclass ¶
func (*Module) Xg2_errmsg ¶
func (*Module) Xg2_is_shallow ¶
func (*Module) Xg2_malloc ¶
func (*Module) Xg2_odb_exists ¶
func (*Module) Xg2_odb_object_free ¶
func (*Module) Xg2_odb_read ¶
func (*Module) Xg2_odb_read_header ¶
func (*Module) Xg2_ref_free ¶
func (*Module) Xg2_ref_info ¶
func (*Module) Xg2_ref_iter_free ¶
func (*Module) Xg2_ref_iter_new ¶
func (*Module) Xg2_ref_lookup ¶
func (*Module) Xg2_ref_next ¶
func (*Module) Xg2_repository_path ¶
func (*Module) Xg2_revparse ¶
func (*Module) Xg2_tree_entry ¶
func (*Module) Xg2_tree_entry_bypath ¶
func (*Module) Xg2_tree_free ¶
func (*Module) Xg2_tree_lookup ¶
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
}