Tinygo: Shared object / DLL support

Created on 2 Apr 2019  路  2Comments  路  Source: tinygo-org/tinygo

gc compiler has -buildmode=c-shared.
With LLVM, this should be possible, no?

enhancement

Most helpful comment

Yes, this is certainly possible. It's just that no one has asked for it yet.
It will need the extra -buildmode flag and some extra hooks, like an extra -static flag to the linker and an extra hook to let the compiler emit PIC code instead of static code:

https://github.com/tinygo-org/tinygo/blob/5569cd1b6b3aff8f52052d5ff1028d9bb87fba24/compiler/compiler.go#L105

All 2 comments

Yes, this is certainly possible. It's just that no one has asked for it yet.
It will need the extra -buildmode flag and some extra hooks, like an extra -static flag to the linker and an extra hook to let the compiler emit PIC code instead of static code:

https://github.com/tinygo-org/tinygo/blob/5569cd1b6b3aff8f52052d5ff1028d9bb87fba24/compiler/compiler.go#L105

This would be a great addition.
I am calling a Go library from Rust and would love to see it compiled with TinyGo instead.

Looking forward to this implementation :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

torntrousers picture torntrousers  路  8Comments

alankrantas picture alankrantas  路  4Comments

bradleypeabody picture bradleypeabody  路  7Comments

DazWilkin picture DazWilkin  路  6Comments

johanbrandhorst picture johanbrandhorst  路  8Comments