Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

iacore/mimalloc-zig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mimalloc for zig

Copy of source code of mimalloc is bundled.

Usage

build.zig

const mod_mi = b.dependency("mimalloc", .{});

exe.addModule("mimalloc", mod_mi.module("mimalloc"));
exe.linkLibrary(mod_mi.artifact("mimalloc"));

Warning: Github archive download is not working with git submodules The following method is not working as of now Please clone this repo locally and use exe.addDependency*.

build.zig.zon

.{
    .name = "mimalloc-zig-test",
    .version = "0.0.1",
    .dependencies = .{
        .mimalloc = .{
            .url = "https://github.com/locriacyber/mimalloc-zig/archive/refs/heads/main.tar.gz",
        }
    }
}

API

The bound API is primitive. For more control over the mimalloc heaps, please contribute.

  • link static (use musl target)
  • global (malloc/free)
  • heap
  • option

About

Mimalloc bindings for zig

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published