-
-
Notifications
You must be signed in to change notification settings - Fork 27
C tooling #55
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
C tooling #55
Conversation
- cli tool rewritten in C
- building the cli tool and runtime in CI
- creating releases in CI when a vX.X.X tag is pushed
- the cli tool now has an update command to install the latest orca version
Hey, it's great! Here are some notes: Tool
CI
Misc
TODOs(just making a note for myself of what's left before we can use this both in dev and user modes)
|
Oh yeah probably not, this was an option from before that I left in. I will remove it.
The two files Source code (zip) and Source code (tar.gz) are just there by default in github releases, it includes the entire repo. I don't know if these can be disabled but I can look, if we want to exclude them. The src dir inside each platform specific tarball is needed because it includes source files generated by building the runtime, like bindings, that don't exist in the repo source.
Ah yeah sorry about that. I'm not used to using clang so I didn't even think of using clang-format. I'll clean it up. Thanks for the great notes, I will start looking into the rest of these. |
The commit in question is 4ff922b , @rdunnington do you remember the reason for the changes in ui.c here? |
Yeah there are differences in how clang defines size_t on windows vs macOS, which was triggering errors in how we were dealing with it when passing size_t variables to the _Generic macro. The comment in the commit has some more details. I remember doing a few rounds of this until we finally landed on a solution that built on all platforms. |
ah yeah I remember this one. Does this mean that the casts in |
Hmm, maybe, I forget the exact details. We could probably try but would need to build a few scenarios:
|
I see the tooling build still uses MSVC on Windows - can/should we switch to using clang? I feel like we talked about doing this before, since everyone will need clang for their wasm compiles anyway. |
Yes, agreed |
Oh I see. Well libcurl and zlib are both compiled using msvc (they both use nmake). zlib seems like it is relatively straightforward so it could probably be manually compiled with clang, but libcurl is not straightforward. I really don't know how to go about building it with clang. |
46ebf52
to
1c094e8
Compare
Nice work! could you squash these into one (or a few) commits, also excluding |
You also have some CRLF in here (eg at the beginning of |
On macOS I also get this when trying to build the tool locally:
|
A couple other things from trying to follow the user workflow on macOS:
|
This is mostly Ben's work splitting dev and user tooling, and beginning to rewrite the user tooling in C.
It now uses GetFullPathNameW and dynamically allocates a path string
Alright I squished it. I excluded commit 4ff922b which had the changes to |
c46636a
to
f3ecbe5
Compare
* Creating releases in CI * Dev Tooling: * `orcadev install` - install a dev build in the system orca dir * User Tooling: * `orca update` - download and install latest version of orca * `orca install-path` - print system orca dir * `orca sdk-path --version` - print path to specific sdk version * `orca bundle --version` - bundle with a specific sdk version * `orca list` - list installed versions
* support size_t explicitly for non-windows platforms * added casts in a couple places to ensure oc_clamp() deals with the same types (Cherry-picked from 4ff922b, see #55 (comment)) Co-authored-by: Reuben Dunnington <reuben.dunnington@gmail.com> Co-authored-by: Martin Fouilleul <martinfouilleul@gmail.com>
72ee334
to
118fd56
Compare
baac14f
to
1608e7e
Compare
1608e7e
to
1626655
Compare
Ok I'm going to merge this since we have enough of the workflows fleshed out and I want to start using the new tooling on the other fronts. Remaining work on the tooling can be done as additional incremental PRs. |