Skip to content

Just a PoC to interop a statically compiled Odin library from within Zig.

License

Notifications You must be signed in to change notification settings

SoraTenshi/zig-odin-interop-static

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zig-odin-interop

Just an attempt to get Zig to call Odin code via static linking. Oh and this is supposed to work for Windows. I am pretty sure that linux just works as fine, if you adjust the object filename in the build.zig

Disclaimer:

For some reason, fmt.println call is not really... liked? as in: it doesn't work with it. I am unsure whether it's because of the context or because of what the fmt.println call does, but yeah generally this works fine.

Usage:

To compile the Odin obj file:

odin build from.odin -build-mode:obj -target:windows_amd64 -no-entry-point -file

and then just:

zig build

About

Just a PoC to interop a statically compiled Odin library from within Zig.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published