`RunWithBinding` actually creates entirely new `OrtValue`s referencing any outputs' existing data, for some reason.
`Session::run_with_options` with preallocated outputs is not affected because we already indiscriminately treat every output as if it were brand new.
The `Identity` node in the graph used `ai.onnx` v21. CUDA only has implementations up to `ai.onnx` v19. Some surgical hex editing brings the version down to v12, which other EPs should support as well.
Let it die, let it die! You shall die
Instead of creating an environment that lives throughout the duration of the process, we now hold the environment options we commit, and create the environment from those options (or grab the current env) whenever we need it. When all holders of the environment are dropped, the environment is dropped as well.
Previously, we held `Environment` as a static variable. Statics are never dropped, but ONNX Runtime's own destructors assumes that the environment is long gone by the time the process exits, which was not the case in `ort`! This led to issues like #441 and the dumb `0003-leak-logger-mutex.patch` from `ort-artifacts`.
Legacy xcode builds will have ios-arm64_x86_64-simulator, like the ones
from pre-packaged onnxruntime.xcframework available to download, and
newer ones will use ios-arm64-simulator in case someone is building it
from source and creating xcframework with latest xcode.
The code still targets 1.81 but I'm tired of the CI failing and I refuse to commit `Cargo.lock` to pin `base64ct`. Thankfully, Cargo's resolver has started taking `rust-version` into account since 1.84, so this won't be a problem in the future.
Writing by assigning to the dereference attempts to drop the old value, which by this point is uninitialized, causing UB; using `write` skips any reading or dropping.