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

Zig build on NuttX #5732

Merged
merged 1 commit into from
Mar 16, 2022
Merged

Zig build on NuttX #5732

merged 1 commit into from
Mar 16, 2022

Conversation

kassane
Copy link
Contributor

@kassane kassane commented Mar 13, 2022

Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

Summary

I made an example of hello_zig in reference to the rust example accepted earlier.

Zig besides building from the language itself is also currently a clang wrapper (allow cross-compilation) allowing you to compile C and C++(libc++ only) projects.

Impact

none.

Testing

Arch Linux - simulation (latest version 0.9.x & master/nightly)

@xiaoxiang781216
Copy link
Contributor

@kassane could you reorg your patch to remove the temporary change?

@kassane
Copy link
Contributor Author

kassane commented Mar 13, 2022

@kassane could you reorg your patch to remove the temporary change?

Rebase?

@xiaoxiang781216
Copy link
Contributor

@kassane could you reorg your patch to remove the temporary change?

Rebase?

yes, please:
git remote add apache [email protected]:apache/incubator-nuttx.git

git fetch apache
git rebase apache/master
git rebase --interactive HEAD~9
[adjust your patchset in editor]
git push -f origin zig-build

@xiaoxiang781216
Copy link
Contributor

@kassane I think the change for docker is also needed, you can create another patch for docker.

@xiaoxiang781216
Copy link
Contributor

@kassane please merge the fix for the previous patch into one. We need ensure each patch in the final shape.

@pkarashchenko
Copy link
Contributor

Please squash intermediate commits. Other parts LGTM

@kassane kassane requested a review from pkarashchenko March 15, 2022 12:53
@kassane kassane requested a review from xiaoxiang781216 March 15, 2022 13:46
zig install added on CI - fixed

Docker - zig install

parent 5d2e357
author Matheus Catarino França <[email protected]> 1647344723 -0300
committer Matheus Catarino França <[email protected]> 1647344723 -0300

zig-build added

zig install added on CI - fixed

Docker - zig install

CI - replace wget2curl

rm bloat curl command & zig latest version

ZIG_ENV - rm bin folder

ident format

Apply suggestions from code review

Co-authored-by: Petro Karashchenko <[email protected]>

rm arch-zigoptimization

rm arch-zigoptimization ref
@pkarashchenko
Copy link
Contributor

There are some troubles with boards/sim/sim/sim/configs/zig/defconfig. Please regenerate it.

@xiaoxiang781216
Copy link
Contributor

There are some troubles with boards/sim/sim/sim/configs/zig/defconfig. Please regenerate it.

@kassane you can run "./tools/refresh.sh --silent sim:zig" to normalize defconfig.

@kassane
Copy link
Contributor Author

kassane commented Mar 16, 2022

cc: @pkarashchenko @xiaoxiang781216

I try:

$> ./tools/refresh.sh --silent sim:zig && git status
  Normalize sim:zig
On branch zig-build
Your branch is up to date with 'origin/zig-build'.

nothing to commit, working tree clean

@xiaoxiang781216
Copy link
Contributor

Look like the CI doesn't get the last change from apps git, let retrigger CI again.

@kassane
Copy link
Contributor Author

kassane commented Mar 16, 2022

I found some errors in app rules:

@xiaoxiang781216 xiaoxiang781216 merged commit 4880613 into apache:master Mar 16, 2022
@pkarashchenko
Copy link
Contributor

@kassane please rework the changes and issue the PR again.

@kassane
Copy link
Contributor Author

kassane commented Mar 17, 2022

@kassane please rework the changes and issue the PR again.

OK. I'm working on it! After solving the problem, the new PR will be requested.

@kassane
Copy link
Contributor Author

kassane commented Mar 17, 2022

Status

  • Actually, on yesterday I had done a manual test, after building libapps with zig hello_example and it worked.
    But during build systems, I realized that zig was not invoked by Application.mk, although in the test also enabled rust_example (ref) and it was invoked normally.

@kassane kassane deleted the zig-build branch May 8, 2022 14:55
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