https://github.com/hajimehoshi/hitsumabushi
Run Go programs (almost) everywhere
https://github.com/hajimehoshi/hitsumabushi
go golang
Last synced: 8 months ago
JSON representation
Run Go programs (almost) everywhere
- Host: GitHub
- URL: https://github.com/hajimehoshi/hitsumabushi
- Owner: hajimehoshi
- License: apache-2.0
- Created: 2021-11-25T14:34:24.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-14T11:07:41.000Z (about 1 year ago)
- Last Synced: 2024-10-10T17:24:15.738Z (about 1 year ago)
- Topics: go, golang
- Language: C
- Homepage:
- Size: 199 KB
- Stars: 180
- Watchers: 6
- Forks: 8
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hitsumabushi (ひつまぶし)
Package hitsumabushi provides APIs to generate JSON for go-build's `-overlay` option.
Hitsumabushi aims to make Go programs work on almost everywhere by overwriting system calls with C function calls.
Now the generated JSON works only for Linux/Arm64 and Windows/Amd64 so far.
For GOOS=windows, Hitsumabushi replaces some functions that don't work on some special Windows-like systems.
Go version: 1.19-1.21
## Example
On Arm Linux, run these commands:
```
cd example/helloworld
./run.sh
```
## Tips
With VC++, you might have to call `_rt0_amd64_windows_lib()` at the beginning of the entry point explicitly.
See also https://github.com/golang/go/issues/42190.