You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reacted by inklit, Kevin Sandow, noctarius aka Christoph Engelbert, Chris Stavropoulos, Harrison Jones, Florian Vogt, Kevin Chowski, Dragos Varovici, ellinorcrux, Bartłomiej Dawidów and 460 more
Notably, the recently published Go kernel for Jupyter notebooks is using buildmode=shared, and thus doesn't currently support Windows natively. This is a very cool use case, adding a REPL-like live coding feature to the Go ecosystem, thus it would be really awesome if someone tried to start work on buildmode=shared on Windows to support this use case.
Similar to @0xdevalias , I'm quite interested in some hints as to what is missing for this to work on Windows? I'm especially curious what extra work is needed given that c-shared is already implemented on Windows?
@0xdevalias and @akavel I don't have any effort estimation or any hints as to what missing here. I have not actually looked at what is involved. I am so much behind at fixing old issues ...
Alex
Reacted by Dominic Della Valle, ivoszz, andya, Ping and HuiHui
This issue is open for 7 years now and plugin support is still not implemented for windows... will it ever happen?
I'm pessimistic. I feel like people have forgotten that the plugin package exists - it's too rudimentary and has limited support. But I feel that if the plugin package can be done well, what it can achieve is still very powerful.
To some extent, go lacks a multi-terminal hot reloading mechanism. The plugin package makes up for this. The problem is that it is only applicable to Linux and has many shortcomings.
Maybe the plugin feature is just an experimental product.
When I was thinking about a new project today, I wanted to implement some kind of hot reloading and other features. I found that go is really suitable, but the biggest flaw is that the plugin package is terrible.
It's quite sigh-worthy. Last year, I published my needs under this problem. This year, the bottom is still my needs and other people's solutions. It just stopped there.
By the way, isn't it because win is owned by Microsoft?
I just saw an article saying that the Go team said they would not get involved in hot reloading to take advantage of the speed of static linking in Go, "and the community agreed".
In this case, I'd better use c#. Despite the loss of lightweight threads.
Reacted by 雷菊, Young Xu, 神楽坂帕琪, Esonhugh Skyworship and Lin Xin
The API isn't the same as plugin, but I wonder if it could be used with a -plugin DLL written in Go on Windows?
@qmuntal I saw your GopherCon Europe Lightning Talk on YouTube, and I was wondering if you are familiar with this?
FYI, my use case is for hot code reloading without restarting an application. Incremental linking (hot binary patching) is an alternative solution, but that is likely more complicated than DLLs.
Despite some caveats/limitations with the approach, the plugin library has been used successfully for tweaking game and UI code while running on Linux (but not yet on Windows).
By the way, isn't it because win is owned by Microsoft?
No, it's because Windows notoriously has more friction in its design and is terribly designed at the system level.
For example, compare something you'd think would be simple: changing ownership for a file or directory.
In *NIX-likes, it's:
Look up the UID of the user/GID of group
A single kernel syscall (chown()) with that UID and GID and the file's path
2.1. (Or fchown() if you want to use an FD instead, or lchown if you want to change ownership of a symlink itself, or fchownat if you want to save on some additional supporting/prep routine.)
For Windows, you need:
To look up the (significantly more obtuse) SID.
1.1. But be careful! One user can have multiple SIDs depending on context.
But also make sure that SID is valid for the context. Can't set the built-in Administrator SID universal constant as the owner of the file.
And then you can call - oh shoot, but Windows has multiple SIDs associated with a file, each of which may either be a user or a group. Ok, you better not break those, so you have to get the current list.
3.1. So instead of just doing an os.Stat on the file and casting to a *syscall.Stat_t to get the current ownership info like in *NIX, you have to first get the currentNamedSecurityInfo of the file (which is a whole-ass struct).
3.2. Remember to define your handler and pointers for the owning user and group SID first!
And THEN you can change it with the new user/group SIDs.
And that's justchanging the ownership of a file/directory.
So no, it's not because "win is owned by Microsoft". It's because Windows is convoluted, messy, and obtuse so something like a runtime-loaded internal plugin system is significantly more of a pain on Windows.
Windows makes a lot more sense when you look at it through the lens of Windows, instead of the lens of Unix or Linux. The Windows kernel has quite a few excellent features that no Unix or Linux has. Of course, Linux fans will dismiss them all because they are myopic so I won't get into them here.
Dynamically loaded libraries are very easy to do in Windows. A DLL, like any Linux shared library, is just a set of functions without a default entrypoint like main() compiled into a file. A file which can be compiled separately from any executables that need it, and be loaded and unloaded on demand.
If it's hard for Go to do this on Windows, it's because of how the Go runtime works, not because of Windows being obtuse. It is extremely simple to load a DLL on windows. There are syscalls to do it on Windows, just like on Linux. If those don't work in Go on Windows it's because of Go making assumptions or choices which favored Linux, did not favor Windows, and now make Windows implementation of plugins difficult. Sort of a "paint yourself into a corner" kind of move.
Besides, I don't think the demand for Go plugins on Windows is very high. And I don't think supporting every last feature on Windows was high on the priority list for the Go team early on when these systems were first implemented.
Windows does do things differently, yes. But virtually every application on Windows loads DLLs; if Go can't do that for some reason, it's something specific to Go that is the problem, not Windows.
Plugins have not been a priority on any platform. They barely work anywhere.
Loading a DLL on WIndows is just as easy as loading a shared library on an ELF system. What is harder on Windows is creating a DLL, because you need an explicit export list (in C this explicit list is expressed using dllexport annotations and the like). Also Windows doesn't have ad hoc symbol interposition, which makes it reasonably simple (on ELF systems) for the plugin and the executable to agree on a single runtime. The effect is that setting up plugins on ELF systems was a quick hack, and on Windows it would be a less trivial hack. There are good reasons why Windows is different, it just happens that those reasons make it harder for a system like Go to add trivial plugin support. Go could add more complex plugin support, but that would require solving all the problems that plugins have on ELF systems, and nobody has worked on that.
Reacted by Juhan Oskar Hennoste, Jeremiah Johnson, Nathan Youngman, Chad Retz and Tom Thorogood
Hey everyone, I've managed to get part of the plugin architecture running on Windows. Unfortunately, there are still a few features that aren't working, such as allocations, fmt, sync.Pool, and goroutines.
For "fmt," only "Print" and "Log" are working.
That took me about three days of work.
I’ll release the Go project once everything is working properly. I still need to test a lot of Go functions.
EDIT:
No need to include screenshots; the code is already public.
Thx for the update 👍 Do you have a fork with the changes? I never really get, why people want to share code via screenshots :-)
This is just a quick preview to prove that it's real. I'll publish the updated code as soon as it's final. I don't want to release anything that's half-finished.
Activity
[-]Plugin Pkg for Windows![/-][+]plugin: add Windows support[/+]bradfitz commentedon Feb 24, 2017
There is currently nobody working on it, as far as I know.
/cc @alexbrainman @crawshaw
QuestionPython commentedon Feb 24, 2017
mean in
go 1.8,pluginpkg work for apple-mac,windows and more ?bradfitz commentedon Feb 24, 2017
@QuestionPython, yes, it's even documented in multiple places:
https://golang.org/pkg/plugin/
https://golang.org/doc/go1.8#plugin
alexbrainman commentedon Feb 24, 2017
I am not working on it. Sorry.
Alex
bradfitz commentedon Feb 26, 2017
We delete all "me too" voting comments per https://golang.org/wiki/NoMeToo. Vote with emoji reactions at top instead.
bradfitz commentedon Mar 3, 2017
The "me too" comments wouldn't stop, so this issue is now locked. If there are updates, they will be made here.
0xdevalias commentedon Apr 20, 2018
Out of curiosity, do we know how much effort it would take to implement windows support? Or if there are any blockers to it (and what they are?)
akavel commentedon Apr 23, 2018
Notably, the recently published Go kernel for Jupyter notebooks is using buildmode=shared, and thus doesn't currently support Windows natively. This is a very cool use case, adding a REPL-like live coding feature to the Go ecosystem, thus it would be really awesome if someone tried to start work on buildmode=shared on Windows to support this use case.
Similar to @0xdevalias , I'm quite interested in some hints as to what is missing for this to work on Windows? I'm especially curious what extra work is needed given that c-shared is already implemented on Windows?
alexbrainman commentedon Apr 23, 2018
@0xdevalias and @akavel I don't have any effort estimation or any hints as to what missing here. I have not actually looked at what is involved. I am so much behind at fixing old issues ...
Alex
82 remaining items
lvyonghuan commentedon Nov 8, 2024
I'm pessimistic. I feel like people have forgotten that the plugin package exists - it's too rudimentary and has limited support. But I feel that if the plugin package can be done well, what it can achieve is still very powerful.
To some extent, go lacks a multi-terminal hot reloading mechanism. The plugin package makes up for this. The problem is that it is only applicable to Linux and has many shortcomings.
Maybe the plugin feature is just an experimental product.
When I was thinking about a new project today, I wanted to implement some kind of hot reloading and other features. I found that go is really suitable, but the biggest flaw is that the plugin package is terrible.
It's quite sigh-worthy. Last year, I published my needs under this problem. This year, the bottom is still my needs and other people's solutions. It just stopped there.
By the way, isn't it because win is owned by Microsoft?
I just saw an article saying that the Go team said they would not get involved in hot reloading to take advantage of the speed of static linking in Go, "and the community agreed".
In this case, I'd better use c#. Despite the loss of lightweight threads.
iRedTea commentedon Dec 22, 2024
nathany commentedon Nov 3, 2025
I noticed that x/sys/windows has some LoadLibrary functionality to load DLLs.
https://pkg.go.dev/golang.org/x/sys/windows#LoadLibrary
The API isn't the same as plugin, but I wonder if it could be used with a
-pluginDLL written in Go on Windows?@qmuntal I saw your GopherCon Europe Lightning Talk on YouTube, and I was wondering if you are familiar with this?
FYI, my use case is for hot code reloading without restarting an application. Incremental linking (hot binary patching) is an alternative solution, but that is likely more complicated than DLLs.
Despite some caveats/limitations with the approach, the plugin library has been used successfully for tweaking game and UI code while running on Linux (but not yet on Windows).
nf-brentsaner commentedon Dec 19, 2025
No, it's because Windows notoriously has more friction in its design and is terribly designed at the system level.
For example, compare something you'd think would be simple: changing ownership for a file or directory.
In *NIX-likes, it's:
chown()) with that UID and GID and the file's path2.1. (Or
fchown()if you want to use an FD instead, orlchownif you want to change ownership of a symlink itself, orfchownatif you want to save on some additional supporting/prep routine.)For Windows, you need:
1.1. But be careful! One user can have multiple SIDs depending on context.
3.1. So instead of just doing an
os.Staton the file and casting to a*syscall.Stat_tto get the current ownership info like in *NIX, you have to first get the currentNamedSecurityInfoof the file (which is a whole-ass struct).3.2. Remember to define your handler and pointers for the owning user and group SID first!
And that's just changing the ownership of a file/directory.
So no, it's not because "win is owned by Microsoft". It's because Windows is convoluted, messy, and obtuse so something like a runtime-loaded internal plugin system is significantly more of a pain on Windows.
naikrovek commentedon Dec 20, 2025
Not quite as obtuse as your comment.
Windows makes a lot more sense when you look at it through the lens of Windows, instead of the lens of Unix or Linux. The Windows kernel has quite a few excellent features that no Unix or Linux has. Of course, Linux fans will dismiss them all because they are myopic so I won't get into them here.
Dynamically loaded libraries are very easy to do in Windows. A DLL, like any Linux shared library, is just a set of functions without a default entrypoint like main() compiled into a file. A file which can be compiled separately from any executables that need it, and be loaded and unloaded on demand.
If it's hard for Go to do this on Windows, it's because of how the Go runtime works, not because of Windows being obtuse. It is extremely simple to load a DLL on windows. There are syscalls to do it on Windows, just like on Linux. If those don't work in Go on Windows it's because of Go making assumptions or choices which favored Linux, did not favor Windows, and now make Windows implementation of plugins difficult. Sort of a "paint yourself into a corner" kind of move.
Besides, I don't think the demand for Go plugins on Windows is very high. And I don't think supporting every last feature on Windows was high on the priority list for the Go team early on when these systems were first implemented.
Windows does do things differently, yes. But virtually every application on Windows loads DLLs; if Go can't do that for some reason, it's something specific to Go that is the problem, not Windows.
ianlancetaylor commentedon Dec 20, 2025
Plugins have not been a priority on any platform. They barely work anywhere.
Loading a DLL on WIndows is just as easy as loading a shared library on an ELF system. What is harder on Windows is creating a DLL, because you need an explicit export list (in C this explicit list is expressed using
dllexportannotations and the like). Also Windows doesn't have ad hoc symbol interposition, which makes it reasonably simple (on ELF systems) for the plugin and the executable to agree on a single runtime. The effect is that setting up plugins on ELF systems was a quick hack, and on Windows it would be a less trivial hack. There are good reasons why Windows is different, it just happens that those reasons make it harder for a system like Go to add trivial plugin support. Go could add more complex plugin support, but that would require solving all the problems that plugins have on ELF systems, and nobody has worked on that.naikrovek commentedon Dec 21, 2025
zandercodes commentedon May 30, 2026
Hey everyone, I've managed to get part of the plugin architecture running on Windows. Unfortunately, there are still a few features that aren't working, such as allocations, fmt, sync.Pool, and goroutines.
For "fmt," only "Print" and "Log" are working.
That took me about three days of work.
I’ll release the Go project once everything is working properly. I still need to test a lot of Go functions.
EDIT:
No need to include screenshots; the code is already public.
phaus commentedon May 30, 2026
Thx for the update 👍
Do you have a fork with the changes? I never really get, why people want to share code via screenshots :-)
zandercodes commentedon May 30, 2026
This is just a quick preview to prove that it's real. I'll publish the updated code as soon as it's final. I don't want to release anything that's half-finished.
zandercodes commentedon Jun 1, 2026
Great news: The first version is ready. If you encounter any issues, please let me know in my Go project.
Currently, only AMD64 is supported.
https://github.com/zandercodes/go/releases/tag/feature_windows_plugin_support_go1.26.3
EDIT:
The Final version is pushed.
The only thing missing now is support for ARM64.
Linkangyis commentedon Jun 1, 2026
After all these years, is this issue finally getting put to rest? But it looks like we still need to run a ton of unit tests before merging to main.
zandercodes commentedon Aug 24, 2026
The pull request is now a draft. I still need to add plugin support for Windows on ARM.
#81048
gopherbot commentedon Aug 24, 2026
Change https://go.dev/cl/820020 mentions this issue:
cmd/link: support Windows pluginsFix stale Scrumboy ticket-number refs after GitHub issue migration (#74)