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

Allow arm64ec #1061

Open
ahqsoftwares opened this issue Jan 25, 2025 · 5 comments
Open

Allow arm64ec #1061

ahqsoftwares opened this issue Jan 25, 2025 · 5 comments

Comments

@ahqsoftwares
Copy link

error[E0432]: unresolved import `um::winnt::PCONTEXT`
  --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b5[57](https://github.com/leadlang/lead/actions/runs/12964307737/job/36162865000#step:11:58)f\winapi-0.3.9\src\um\minwinbase.rs:21:52
   |
21 |     CHAR, EXCEPTION_RECORD, HANDLE, LPSTR, LPWSTR, PCONTEXT, PRTL_CRITICAL_SECTION,
   |                                                    ^^^^^^^^ no `PCONTEXT` in `um::winnt`

error[E0432]: unresolved import `um::winnt::CONTEXT`
  --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\winapi-0.3.9\src\um\processthreadsapi.rs:15:5
   |
15 |     CONTEXT, HANDLE, LPCSTR, LPCWSTR, LPSTR, LPWSTR, PAPCFUNC, PHANDLE, PPROCESSOR_NUMBER,
   |     ^^^^^^^ no `CONTEXT` in `um::winnt`

error[E0432]: unresolved import `um::winnt::PCONTEXT`
  --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\winapi-0.3.9\src\um\winbase.rs:35:[59](https://github.com/leadlang/lead/actions/runs/12964307737/job/36162865000#step:11:60)
   |
35 |     LPOSVERSIONINFOEXW, LPSTR, LPWSTR, MAXLONG, PBOOLEAN, PCONTEXT, PCWSTR, PFIRMWARE_TYPE,
   |                                                           ^^^^^^^^ no `PCONTEXT` in `um::winnt`

error[E0412]: cannot find type `CONTEXT` in this scope
   --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\winapi-0.3.9\src\um\winnt.rs:205:25
    |
205 |     ContextRecord: *mut CONTEXT,
    |                         ^^^^^^^ not found in this scope

error[E0412]: cannot find type `PCONTEXT` in this scope
    --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\winapi-0.3.9\src\um\winnt.rs:16[60](https://github.com/leadlang/lead/actions/runs/12964307737/job/36162865000#step:11:61):20
     |
1660 |     ContextRecord: PCONTEXT,
     |                    ^^^^^^^^ not found in this scope

error[E0412]: cannot find type `PCONTEXT` in this scope
    --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\winapi-0.3.9\src\um\winnt.rs:7194:24
     |
7194 |         ContextRecord: PCONTEXT,
     |                        ^^^^^^^^ not found in this scope

error[E0412]: cannot find type `PRUNTIME_FUNCTION` in this scope
    --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\winapi-0.3.9\src\um\winnt.rs:7206:24
     |
7206 |         FunctionTable: PRUNTIME_FUNCTION,
     |                        ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `PRUNTIME_FUNCTION` in this scope
    --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\winapi-0.3.9\src\um\winnt.rs:[72](https://github.com/leadlang/lead/actions/runs/12964307737/job/36162865000#step:11:73)11:24
     |
7211 |         FunctionTable: PRUNTIME_FUNCTION,
     |                        ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `PGET_RUNTIME_FUNCTION_CALLBACK` in this scope
    --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\winapi-0.3.9\src\um\winnt.rs:7217:19
     |
7217 |         Callback: PGET_RUNTIME_FUNCTION_CALLBACK,
     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `PRUNTIME_FUNCTION` in this scope
    --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\winapi-0.3.9\src\um\winnt.rs:7223:24
     |
7223 |         FunctionTable: PRUNTIME_FUNCTION,
     |                        ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `PUNWIND_HISTORY_TABLE` in this scope
    --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\winapi-0.3.9\src\um\winnt.rs:7239:23
     |
7239 |         HistoryTable: PUNWIND_HISTORY_TABLE,
     |                       ^^^^^^^^^^^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `PRUNTIME_FUNCTION` in this scope
    --> C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\winapi-0.3.9\src\um\winnt.rs:7240:10
     |
7240 |     ) -> PRUNTIME_FUNCTION;
     |          ^^^^^^^^^^^^^^^^^ not found in this scope

Some errors have detailed explanations: E0412, E0432.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `winapi` (lib) due to 12 previous errors
warning: build failed, waiting for other jobs to finish...

thread 'main' panicked at src\main.rs:[75](https://github.com/leadlang/lead/actions/runs/12964307737/job/36162865000#step:11:76):7:
Failed to build
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\release\pack.exe` (exit code: 101)
@retep998
Copy link
Owner

What exactly is the arm64ec architecture? Is it identical to one of the existing architectures or does it have differences? The headers have some architecture specific definitions, and it's not a simple case of "allowing" a new architecture, as the appropriate architecture specific definitions have to be added for each architecture for every type that requires them.

@ahqsoftwares
Copy link
Author

What exactly is the arm64ec architecture? Is it identical to one of the existing architectures or does it have differences? The headers have some architecture specific definitions, and it's not a simple case of "allowing" a new architecture, as the appropriate architecture specific definitions have to be added for each architecture for every type that requires them.

Actually, its a blend of arm64 and x86_64. Its more in the aarch64 part that allows loading x86_64. Quite sure its the same as arm64X

@ahqsoftwares
Copy link
Author

ahqsoftwares commented Jan 25, 2025

This is what I've understood by now from this article https://learn.microsoft.com/en-us/windows/arm/arm64ec

More like an x86_64 binary that is arm64 ?

Its not at all arm64 though

@retep998
Copy link
Owner

So it's using arm64 instructions and registers, but still following the x64 ABI for calling conventions and such for compatibility within the same process... very weird.

@ahqsoftwares
Copy link
Author

ahqsoftwares commented Jan 26, 2025

So it's using arm64 instructions and registers, but still following the x64 ABI for calling conventions and such for compatibility within the same process... very weird.

Yeah, it's so weird that I cannot even build arm64ec cdylib from GH actions. Turns out Microsoft themselves are figuring out how to build arm64ec cdylib in github actions

You could add it as a lower priority

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

No branches or pull requests

2 participants