Unofficial Odin bindings for Everything SDK 3.
The repository currently targets 64-bit Windows and Everything 1.5. It vendors Everything SDK 3.0.0.9 and links its static library directly into the Odin program.
- 64-bit Windows
- Odin on
PATH - Everything 1.5 running with IPC enabled for searches
Everything is not required to compile a program using the package. An IPC connection will fail at runtime when Everything is not running or its index is unavailable.
Clone the repository directly, vendor it into your source tree, or add it as a Git submodule.
For an Odin project with a bindings collection:
git submodule add https://github.com/reedHam/odin-everything-sdk-bindings.git bindings/everythingThen import it with:
import everything "bindings:everything/src"Replace bindings: with the collection name used by your project.
package main
import "core:fmt"
import everything "bindings:everything/src"
main :: proc() {
client := everything.Connect(nil)
if client == nil {
fmt.println("Everything is unavailable")
return
}
defer everything.DestroyClient(client)
fmt.printfln(
"Everything %d.%d.%d.%d (target=%d)",
everything.GetMajorVersion(client),
everything.GetMinorVersion(client),
everything.GetRevision(client),
everything.GetBuildNumber(client),
everything.GetTargetMachine(client),
)
}The complete runnable example is in examples/basic.
.\check.ps1The check compiles the package and the basic example with strict Odin diagnostics. Run the example separately when Everything 1.5 is available:
odin run examples/basicRun a real IPC search against a loaded Everything index:
.\probe\run.ps1From an x64 Visual Studio Developer PowerShell, verify the C layouts used by the generated binding:
.\abi\run.ps1src/DO_NOT_EDIT_GENERATED_everything3.odin contains the complete raw API generated from Everything3.h.
src/shim.odin maps Windows ABI names to core:sys/windows and supplies Unicode convenience aliases.
Private C struct tags are normalized to their public typedef names, then the EVERYTHING3_ type prefix is removed.
The tracked bindgen footer isolates the upstream GetTargetMachine naming defect in the generated raw surface.
The package targets Windows x64.
Clang reports __stdcall functions as the C convention on x64 because Windows x64 has one platform calling convention.
The corrected GetTargetMachine declaration uses Odin's system convention explicitly.
Consumers do not need odin-c-bindgen, Clang, or the Windows C toolchain.
The generated Odin file and src/Everything3.lib are both checked in and can be coppied to a target project folder.
The tested odin-c-bindgen revision is recorded in BINDGEN_COMMIT.
Place odin-c-bindgen beside this repository, put bindgen.exe on PATH, set ODIN_C_BINDGEN, or pass its path explicitly.
Verify that fresh output matches the tracked binding:
.\generate.ps1Accept a reviewed generated change:
.\generate.ps1 -AcceptThe generator writes scratch output under _generated, compares the complete procedure surface to the vendored header, and refuses to emit duplicate Windows types.
Accepted output is stored in the importable src package.
bindgen.sjson, the wrapper header, the footer, and the upstream header are the generation authority.
The checked-in src/Everything3.lib is the 64-bit static library used by the binding.
The matching SDK source is retained under sdk/everything_sdk3.
From an x64 Visual Studio Developer PowerShell:
.\build_sdk.ps1The rebuilt library is written to build/Everything3.lib.
Calls such as Search, GetResults, Sort, and WaitForResultListChange may block the calling thread.
Applications with a frame or UI thread should issue blocking SDK work from a worker thread.
ShutdownClient can be called from another thread to cancel pending requests.
- Everything SDK version: 3.0.0.9
- Everything version: 1.5
- SDK project: https://github.com/voidtools/everything_sdk3
- Everything: https://www.voidtools.com/
This project is not affiliated with or endorsed by voidtools.
The Odin repository code is MIT-licensed.
The vendored Everything SDK is also MIT-licensed by voidtools / David Carpenter.
See THIRD_PARTY_NOTICES.md and the vendored LICENSE.