cryptocode

joined 1 year ago
MODERATOR OF
 

From the README:

jdz_allocator: A Zig General Purpose Memory Allocator

jdz_allocator is an original general purpose allocator inspired by Mattias Jansson's rpmalloc.

In its default configuration, it uses no global or threadlocal vars, making it compatible with Zig allocator design. This allows it to function without the need for any deinitThread calls while still achieving reasonable multi-threaded performance.

If multithreaded performance is essential, and cannot be handled appropriately through the use of multiple allocator instances, this allocator can be configured to use threadlocal arenas by setting global_allocator=true in the JdzAllocatorConfig. In this mode, make sure to call deinitThread before thread termination to free thread memory for re-use.

The global allocator is currently accessed through a JdzAllocator instance rather than the JdzAllocator type, which makes global global use inconvenient and error-prone - this will be addressed shortly.

Please note that this allocator is a work in progress, and has not yet been thoroughly tested. Usage and bug reports are appreciated and will help contribute to this allocator's completion.

Performance is also still being worked on, with a few obvious targets for improvement.

This allocator currently does not support page sizes larger than 64KiB.

 

Alpha-version of a new web framework and templating language.

Documentation here: https://www.jetzig.dev/documentation.html

 

From the video description:

When developing command line tools, handling user input via command line arguments is a crucial step. Zig offers a couple of args iterators in the standard library, depending on whether you're targeting Windows or not. In this episode we see how to use both, and as a bonus, we see a demonstration of using an ecosystem args parser called zig-clap.

5
submitted 10 months ago* (last edited 10 months ago) by [email protected] to c/[email protected]
 

Accelerating the Zig Parser, streamed on Jan 12 2024

Presented by Niles Salter (@Validark)

 

Zig bindings for Godot 4

 

From the README:

Zig diffing from the ground up with Myers' algorithm for discovering shortest edit scripts.

Allows diffing of any set of values (even non-slice ones) as long as those values are eqlable by index.

 

A Nix Flake for packaging, building and running Zig projects.

 

From the announcement:

Today we’re announcing Mach nominated Zig versions, a sweet-spot between stable Zig and nightly Zig which offers a different balance of latest-and-greatest features and fixes, and less of a moving target.

 

From the README:

zimalloc

zimalloc is general purpose allocator for Zig, inspired by mimalloc.

Status

This project is under development and should currently be considered experimental/exploratory; there is no documentation and it has not been battle-tested. In particular there may be issues with multi-threaded workloads. Contributions of any kind (PRs, suggestions for improvements, resources or ideas related to benchmarking or testing) are welcome.

The allocator is significantly faster than std.heap.GeneralPurposeAllocator(.{}) but should not (yet) be expected to be competitive with other established general purpose allocators.

 

An XML parser loosely based on the std.json scanner API

 

From the README


A Nix Flake for developing Zig.

Features

  • A Nix dev shell for building Zig from src
    # Start dev shell
    nix develop .
    
  • An opinionated script (./run) that helps with building and testing Zig
    ./run buildBootstrap # Build stage3
    ./run usePrebuilt # Alternatively, use a signature-checked stage3 binary from ziglang.org
    ./run buildDebug # Use stage3 to create a Zig debug build
    ./run testBehavior # Run behavior tests for the debug build
    
    Getting from zero to a self-built Zig is really fast:
    ./run usePrebuilt && ./run buildDebug takes less than 3 minutes on an average desktop system.
  • Zig master pkgs
    nix build .#zig # Built from source
    nix build .#zigPrebuilt # Prebuilt static binary from ziglang.org
    

This repo is regularly updated to track Zig master.

Usage

See ./usage.sh on how to use this repo.

Dev

See ./dev/README.md on how to develop and contribute to this repo.

See also

zig-overlay, which packages the official prebuilt static Zig binaries with Nix.

 

MySQL driver written in pure zig

Features:

  • Native Zig code
  • TCP protocol
  • MySQL DateTime and Time support
  • comptime safety and type conversion as much as possible
view more: ‹ prev next ›