Skip to content

Conversation

@NWilson
Copy link
Member

@NWilson NWilson commented Mar 17, 2025

Followup to #722

  • Fix Windows build warning by adding PCRE2_STATIC to pcre2test
  • Remove unnecessary .linkLibc() command, now that we have link_libc = true in the Module declarations
  • Update the old std.Build.Step.Compile.create(...) calls to the brand-new b.addLibrary(...) function. They added this exactly for our use-case, to allow dynamically selecting between addStaticLibrary/addDynamicLibrary variants.

@NWilson
Copy link
Member Author

NWilson commented Mar 17, 2025

@qaptoR Here are a few small changes. I hope these work for you too.

@NWilson NWilson merged commit 03a00fd into master Mar 17, 2025
35 checks passed
@NWilson NWilson deleted the user/niwilson/zig-0.14-tweaks branch March 17, 2025 20:24
@qaptoR
Copy link
Contributor

qaptoR commented Mar 19, 2025

@NWilson Thank you for the update! I'll pull the changes and test on my end, but I suspect if it's building for you then we're good to go.

Btw, the reason I started all this was to create bindings (might be using that term loosely) in zig for PCRE2.
I released the project publicly the other day. Let me know if I've improperly complied with the BSD-3 clause license and attribution etc, if you or the relevant parties want to check. I followed the same approach as the Godot Engine as closely as I could, but made a few adjustments that were relevant to a library vs an engine etc. I only mention it as well because it's the first time I've ever used open source code in this manner.

https://github.com/qaptoR-zig/PCREz

@NWilson
Copy link
Member Author

NWilson commented Mar 19, 2025

Those bindings look interesting. I hope your project goes well.

Your attribution looks perfectly fine. You say you're using PCRE2, and you reproduce the license text. There's no magic formula or legally required wording for attribution. Permissive licenses like PCRE2's are designed to make this sort of reuse super-easy. Go for it!

@qaptoR
Copy link
Contributor

qaptoR commented Mar 19, 2025

Thanks! I appreciate the feedback. So far my bindings are reproductions of the ones implemented by the Godot Engine (why I also have attribution for them). But as I learn more about regex, and especially PCRE, I think I will try to add support for more of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants