alef 0.110.4

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
        // Baked from `[crates.e2e] alt_host` at generation time: the mock server reads
        // ALEF_MOCK_ALT_HOST from its own process environment, so the standalone spawn
        // here sets it explicitly rather than relying on an ambient shell var.
        // The map starts from the build runner's own environment (`b.graph.environ_map`; the
        // pre-0.16 process-level env-map getter no longer exists), so an already-exported
        // override still wins. Measured on Zig 0.16.0 and 0.17.0. ~keep
        var _alef_spawn_env = std.process.Environ.Map.init(_alloc);
        _alef_spawn_env.putAll(&b.graph.environ_map) catch {};
        if (_alef_spawn_env.get("ALEF_MOCK_ALT_HOST") == null) {
            _alef_spawn_env.put("ALEF_MOCK_ALT_HOST", "{{ alt_host }}") catch {};
        }