Skip to content

Remove usingnamespace usage, build script fixups, and support linking memory allocation functions from a shared library #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kcbanner
Copy link

Supersedes #5.

As of 0.15.x usingnamespace has been removed: ziglang/zig#20663

Changes:

  • Remove usingnamespace usage
  • Fixup build script / callconv deprecations
  • Use the new @extern field, .is_dll_import, to allow linking the memory allocation functions from a shared library when using the -msvc ABI
  • Alignment fixup

kcbanner added 3 commits July 20, 2025 02:24
…ion functions from a shared library with the -msvc ABI
- Fixup build script / callconv deprecations
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the zmesh library to be compatible with Zig 0.15.x by removing deprecated usingnamespace usage and updating build script patterns. The changes also add support for linking memory allocation functions from shared libraries when using the MSVC ABI.

Key changes include:

  • Elimination of usingnamespace in favor of direct imports and function definitions
  • Migration from deprecated .C calling convention to .c
  • Implementation of new @extern field syntax with .is_dll_import for shared library compatibility
  • Build script modernization and alignment handling updates

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/zcgltf.zig Adds direct function implementations and updates calling conventions from .C to .c
src/memory.zig Replaces extern variable declarations with @extern syntax and updates alignment handling
src/io.zig Removes usingnamespace usage by replacing wrapper struct with direct import
build.zig Modernizes build script by consolidating library creation and updating module configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants