odin-http
odin-http copied to clipboard
`@(init)` Procedures Must Be `"contextless"`
.../libs/odin-http/server.odin:64:1: Error: @(init) procedures must be declared as "contextless"
server_opts_init :: proc() {
^
.../libs/odin-http/status.odin:81:1: Error: @(init) procedures must be declared as "contextless"
status_strings_init :: proc() {
^
Odin: dev-2025-08:8df69c95c OS: Windows 11 Professional (version: 23H2), build 22631.5624 CPU: AMD Ryzen 7 7700 8-Core Processor RAM: 61033 MiB Backend: LLVM 20.1.0
In case anyone wants a temporary solution for their own projects, the latest version of the compiler includes #+feature global-context which you can place at the top of status.odin and server.odin (on Linux/macOS) to revert to the old behaviour, for now.
Also for openssl/openssl.odin. Would using a "context = runtime.default_context()" and declaring the init functions as contextless be a more appropriate fix?
Have this same problem and above fixes dont seem to work