# How to know the libuv version used by julia?

**URL:** https://discourse.julialang.org/t/how-to-know-the-libuv-version-used-by-julia/72696
**Category:** Internals & Design
**Created:** [December 7, 2021, 5:01am UTC](https://discourse.julialang.org/t/how-to-know-the-libuv-version-used-by-julia/72696 "2021-12-07T05:01:07Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![o314](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/o314/32/252_2.png) [@o314](https://discourse.julialang.org/u/o314)
#### Post date: [December 7, 2021, 5:01am UTC](https://discourse.julialang.org/t/how-to-know-the-libuv-version-used-by-julia/72696/1 "2021-12-07T05:01:07Z")

</div>

I need to know the libuv version used by julia, since some functions i need to ccall are available only after v1.34. What is the recommanded way to do it ?

_I wonder if Julia uses its own version of libuv for now ? I have seen [https://github.com/JuliaLang/libuv](https://github.com/JuliaLang/libuv) that is referenced in the makefile, stdlib, binarybuilder, yggdrasil, the whole stuff._

---

<div class="post-metadata">

### Author: ![woclass](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/woclass/32/212699_2.png) [@woclass](https://discourse.julialang.org/u/woclass)
#### Post date: [December 7, 2021, 5:50am UTC](https://discourse.julialang.org/t/how-to-know-the-libuv-version-used-by-julia/72696/2 "2021-12-07T05:50:29Z")

</div>

[https://github.com/JuliaLang/julia/blob/30fe8cc2c19927cf4b4a5fe1ba1cbf4c2b7b7d84/stdlib/LibUV\_jll/test/runtests.jl#L3-L8](https://github.com/JuliaLang/julia/blob/30fe8cc2c19927cf4b4a5fe1ba1cbf4c2b7b7d84/stdlib/LibUV_jll/test/runtests.jl#L3-L8)

```julia
using LibUV_jll
VersionNumber(unsafe_string(ccall((:uv_version_string, libuv), Cstring, ())))

```

Both 1.6.4 & 1.7.0 use v"2.0.0-dev".

---

<div class="post-metadata">

### Author: ![o314](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/o314/32/252_2.png) [@o314](https://discourse.julialang.org/u/o314)
#### Post date: [December 7, 2021, 6:03am UTC](https://discourse.julialang.org/t/how-to-know-the-libuv-version-used-by-julia/72696/3 "2021-12-07T06:03:35Z")

</div>

Yes but, embarrassingly, libuv does not have any v2 !  
Wikipedia can proove it, but let’s trust github @ [https://github.com/libuv/libuv/releases](https://github.com/libuv/libuv/releases) this time

 ![but](https://global.discourse-cdn.com/julialang/original/3X/6/5/653d5b3f448a69ee2e923c8d6972d8cd3860e0a5.jpeg)

---

<div class="post-metadata">

### Author: ![o314](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/o314/32/252_2.png) [@o314](https://discourse.julialang.org/u/o314)
#### Post date: [December 7, 2021, 6:06am UTC](https://discourse.julialang.org/t/how-to-know-the-libuv-version-used-by-julia/72696/4 "2021-12-07T06:06:45Z")

</div>

Meanwhile, elsewhere on this github @ [https://github.com/JuliaPackaging/Yggdrasil/blob/master/L/LibUV/build\_tarballs.jl](https://github.com/JuliaPackaging/Yggdrasil/blob/master/L/LibUV/build_tarballs.jl), another julian, ok the same, waits for some new upcoming things to blast away all version lies about it

 ![but 2](https://global.discourse-cdn.com/julialang/original/3X/7/5/750a4b20314be4db6bfc6af770923597686f93b9.jpeg)

---

<div class="post-metadata">

### Author: ![woclass](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/woclass/32/212699_2.png) [@woclass](https://discourse.julialang.org/u/woclass)
#### Post date: [December 7, 2021, 6:08am UTC](https://discourse.julialang.org/t/how-to-know-the-libuv-version-used-by-julia/72696/5 "2021-12-07T06:08:43Z")

</div>

julia use master branch, maybe with some patchs

[https://github.com/libuv/libuv/blob/master/include/uv/version.h#L33-L41](https://github.com/libuv/libuv/blob/master/include/uv/version.h#L33-L41)

[https://github.com/JuliaLang/julia/blob/master/deps/libuv.version#L1](https://github.com/JuliaLang/julia/blob/master/deps/libuv.version#L1)

Maybe this branch is compatible with 1.42.0.

---

<div class="post-metadata">

### Author: ![o314](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/o314/32/252_2.png) [@o314](https://discourse.julialang.org/u/o314)
#### Post date: [December 7, 2021, 6:15am UTC](https://discourse.julialang.org/t/how-to-know-the-libuv-version-used-by-julia/72696/6 "2021-12-07T06:15:58Z")

</div>

Working and talking constructively is my motto but “master with some patch” this seems like a black hole in the field of everything we know about versioning, ci/cd etc. those days. Some good news come from here

- [https://github.com/JuliaLang/julia/blob/v1.7.0/deps/Versions.make](https://github.com/JuliaLang/julia/blob/v1.7.0/deps/Versions.make)
- [https://github.com/JuliaLang/julia/blob/v1.7.0/deps/libuv.version](https://github.com/JuliaLang/julia/blob/v1.7.0/deps/libuv.version)

> LIBUV\_BRANCH=julia-uv2-1.42.0  
> LIBUV\_SHA1=3a63bf71de62c64097989254e4f03212e3bf5fc8

---

<div class="post-metadata">

### Author: ![o314](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/o314/32/252_2.png) [@o314](https://discourse.julialang.org/u/o314)
#### Post date: [December 7, 2021, 6:17am UTC](https://discourse.julialang.org/t/how-to-know-the-libuv-version-used-by-julia/72696/7 "2021-12-07T06:17:02Z")

</div>

Nearly, typed at the same time! You’re right. That’s my best bet for now.

_The cache invalidation problem is a matter of copy and paste in ~~ID10T~~ power user land now !_

---

<div class="post-metadata">

### Author: ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)
#### Post date: [December 7, 2021, 3:14pm UTC](https://discourse.julialang.org/t/how-to-know-the-libuv-version-used-by-julia/72696/8 "2021-12-07T15:14:42Z")

</div>

> [@o314](#):
>
> I wonder if Julia uses its own version of libuv for now ?

Yes, exactly, for the longest time (forked libuv, and used since the beginning I think). It’s an implementation detail, and I’m not sure what you can rely on. I looked in the docs could only find:

[https://docs.julialang.org/en/v1/devdocs/stdio/#Libuv-wrappers-for-stdio](https://docs.julialang.org/en/v1/devdocs/stdio/#Libuv-wrappers-for-stdio)

You can look for libuv functions and try to call them, but I’m not sure what’s part of the public API. Maybe nothing. Whatever function you find and may be able to call, might go away? Probably not a future minor version (any guarantee?), possibly any major Julia update (not likely?).

```julia
help?> uv

```

finds nothing, while I did find with (I believe means non-exported, i.e. not part of public API?):

```julia
help?> Base.LibuvStream

help?> Base.LibuvServer

help?> Base.uv_error

```

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [December 7, 2021, 3:20pm UTC](https://discourse.julialang.org/t/how-to-know-the-libuv-version-used-by-julia/72696/9 "2021-12-07T15:20:44Z")

</div>

> [@o314](#):
>
> I wonder if Julia uses its own version of libuv for now ?

It has for several years, not really now.

---

<div class="post-metadata">

### Author: ![o314](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/o314/32/252_2.png) [@o314](https://discourse.julialang.org/u/o314)
#### Post date: [December 21, 2021, 11:05pm UTC](https://discourse.julialang.org/t/how-to-know-the-libuv-version-used-by-julia/72696/10 "2021-12-21T23:05:51Z")

</div>

Thanks to all for your feedback
