Skip to content
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

Supports zig 0.13.0 #6

Closed
wants to merge 1 commit into from
Closed

Conversation

ritalin
Copy link

@ritalin ritalin commented Jun 3, 2024

In zig 0.13.0, build configration is changed.
e.g. the path field of std.Build.LazyPath is deprecated, and so on...

This PR has dealt with following problem:

  • change path field of std.Build.LazyPath to std.Build.path` method.

Additionally, a installed path of libzmq (prefix) as the project specific option.

If libzmq is installed on system, it can pass prefix.

zig build -Dprefix=<PATH> test

@ritalin
Copy link
Author

ritalin commented Jun 4, 2024

I'll provide this PR again by officially release of zig lang 0.13.0.

@ritalin ritalin closed this Jun 4, 2024
@fkollmann
Copy link
Contributor

Hi, thanks for the PR. I created a new branch zig-0.13-wip for adapting to Zig 0.13.

Regarding the prefix build option, I am assuming, this is required for your project?

@ritalin
Copy link
Author

ritalin commented Jun 8, 2024

Yes, the prefix option needs for my project.

Reason:
I've installed the libzmq by homebrew on MacOS.
The homebrew is installed into /usr/local/opt
For avoiding conflict, I do not add this path to system environment variable.
So I'd like to pass this prefix as dependency option.

@fkollmann
Copy link
Contributor

FYI, I just updated zzmq to Zig 0.13.

Please feel free to provide a PR for the prefix option. However I think zmq-prefix would be better, since the prefix generally would be expected to apply to all libraries (including libc), instead of zmq, only.

What are your thoughts here?

@ritalin
Copy link
Author

ritalin commented Jun 14, 2024

LGTM

But a user may be re-define the prefix to other option in hosted project if this option is duplicated or polluted the project.

//  build.zig in host project

const zig_option = b.option([]const u8, "zig-option", "description");
const dep = b.dependency("zzmq", .{ .prefix = zig_option });

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.

None yet

2 participants