README.md: We support NetBSD now! (#302)
- commit
- 5adc58cca1d41ddc08ee2d25daf5f69c695ece28
- author
- TotallyGamerJet · · 2025-03-09 14:04 UTC
- committer
- GitHub · · 2025-03-09 14:04 UTC
- parent
- 3980773
- signature
- GPG Unverified
B5690EEEBB952194The key is unknown
1 file · +4 -1
M README.md +4 -1
| @@ -29,13 +29,14 @@ except for float arguments and return values. | |||
| 29 | 29 | - **FreeBSD**: amd64, arm64 | |
| 30 | 30 | - **Linux**: amd64, arm64 | |
| 31 | 31 | - **macOS / iOS**: amd64, arm64 | |
| 32 | + | - **NetBSD**: amd64, arm64 | |
| 32 | 33 | - **Windows**: 386*, amd64, arm*, arm64 | |
| 33 | 34 | ||
| 34 | 35 | `*` These architectures only support SyscallN and NewCallback | |
| 35 | 36 | ||
| 36 | 37 | ## Example | |
| 37 | 38 | ||
| 38 | - | The example below only showcases purego use for macOS and Linux. The other platforms require special handling which can | |
| 39 | + | The example below only showcases purego use for macOS, NetBSD and Linux. The other platforms require special handling which can | |
| 39 | 40 | be seen in the complete example at [examples/libc](https://github.com/ebitengine/purego/tree/main/examples/libc) which supports Windows and FreeBSD. | |
| 40 | 41 | ||
| 41 | 42 | ```go | |
| @@ -54,6 +55,8 @@ func getSystemLibrary() string { | |||
| 54 | 55 | return "/usr/lib/libSystem.B.dylib" | |
| 55 | 56 | case "linux": | |
| 56 | 57 | return "libc.so.6" | |
| 58 | + | case "netbsd": | |
| 59 | + | return "libc.so" | |
| 57 | 60 | default: | |
| 58 | 61 | panic(fmt.Errorf("GOOS=%s is not supported", runtime.GOOS)) | |
| 59 | 62 | } | |
| @@ -29,13 +29,14 @@ except for float arguments and return values. | |||||
| 29 | - **FreeBSD**: amd64, arm64 | 29 | - **FreeBSD**: amd64, arm64 | ||
| 30 | - **Linux**: amd64, arm64 | 30 | - **Linux**: amd64, arm64 | ||
| 31 | - **macOS / iOS**: amd64, arm64 | 31 | - **macOS / iOS**: amd64, arm64 | ||
| 32 | + | - **NetBSD**: amd64, arm64 | |||
| 32 | - **Windows**: 386*, amd64, arm*, arm64 | 33 | - **Windows**: 386*, amd64, arm*, arm64 | ||
| 33 | 34 | ||||
| 34 | `*` These architectures only support SyscallN and NewCallback | 35 | `*` These architectures only support SyscallN and NewCallback | ||
| 35 | 36 | ||||
| 36 | ## Example | 37 | ## Example | ||
| 37 | 38 | ||||
| 38 | - | The example below only showcases purego use for macOS and Linux. The other platforms require special handling which can | 39 | + | The example below only showcases purego use for macOS, NetBSD and Linux. The other platforms require special handling which can |
| 39 | be seen in the complete example at [examples/libc](https://github.com/ebitengine/purego/tree/main/examples/libc) which supports Windows and FreeBSD. | 40 | be seen in the complete example at [examples/libc](https://github.com/ebitengine/purego/tree/main/examples/libc) which supports Windows and FreeBSD. | ||
| 40 | 41 | ||||
| 41 | ```go | 42 | ```go | ||
| @@ -54,6 +55,8 @@ func getSystemLibrary() string { | |||||
| 54 | return "/usr/lib/libSystem.B.dylib" | 55 | return "/usr/lib/libSystem.B.dylib" | ||
| 55 | case "linux": | 56 | case "linux": | ||
| 56 | return "libc.so.6" | 57 | return "libc.so.6" | ||
| 58 | + | case "netbsd": | |||
| 59 | + | return "libc.so" | |||
| 57 | default: | 60 | default: | ||
| 58 | panic(fmt.Errorf("GOOS=%s is not supported", runtime.GOOS)) | 61 | panic(fmt.Errorf("GOOS=%s is not supported", runtime.GOOS)) | ||
| 59 | } | 62 | } | ||