Conversation
|
@doompling -- Love this! The perfect 100th language for this project! There is a problem though, multi-stage Dockerfiles for languages doesn't work. You may be able to work around this by copying what you need into the 000-base container, you'll see something like this in Golang. Although... just plucking out your compiler and dropping it in alpine could be a can of worms going to be problematic. Alternatively, if you dropped the base-container all together, and swapped this to use whatever flavour of linux you wanted -- that's also totally fine! As long as it supports the amd64 platform, you can ditch the base. You'll find how this is done here. Edited: I wanted to share the "let's us a new base container" approach |
15c2e99 to
6ac90b7
Compare
| print("10! = #{factorial(10)}") | ||
| end | ||
|
|
||
| # TCP echo server |
There was a problem hiding this comment.
I'm pretty stoked, cross-platform TCP is working 😄 . It works because in the std lib the platform specific libc constants are chosen via a compile-time match statement on the target platform:
## Platform-specific errno and constants
compile match Platform.target() {
MacOS => use Core::OS::Darwin::*
Linux => use Core::OS::Linux::*
}| @@ -0,0 +1,64 @@ | |||
| # syntax=docker/dockerfile:1 | |||
| # escape=\ | |||
| FROM debian:bookworm-slim | |||
There was a problem hiding this comment.
@frison Ready for another look whenever you have a chance! Hopefully this is what you were thinking.
I switched to a glibc base image, and this Dockerfile should build anywhere because it downloads a compiler binary and the standard library from "https://github.com/doompling/sol-releases/releases/download/v${SOL_VERSION}"`
Fix a build issue (the way the composite dockerfile is constructed for CI builds needs a ./) and make sure sol is a part of some weekly build (in this case, Sunday)
|
@doompling merged, built, and published. Solid 100th language. Available at: https://hub.docker.com/r/100hellos/sol Depending on the cadence that you update Sol, you could go with a "latest" release from your github release, so that the weekly Sunday builds for Sol pull your latest compiler down. |
No description provided.