연결됨 다시 연결 중 다시 연결 초 연결 실패 연결 일시 중지 복구 실패
Sollang 0.3: Store streams and integrate with native code · Cover image

Sollang 0.3: Store streams and integrate with native code

Public posts

Sollang 0.3 adds lazy Stream and EventStream and expands integration with the C ABI, shared libraries, COM, and C++. The release includes Stage3 verification on Windows and Linux.

Sollang 0.3 has been released.

The starting point of this project was a simple question.

Can I store the stream in a variable and later pass it through as each?

In summary, it is now possible. Stream<T> is not a container that stores results in advance, but Delayed execution plan. Even if stored in variables, no intermediate collection is created immediately; the values flow one by one at the final consumption point. Inputs with an undefined end, such as mouse movement or clicks, are handled separately using EventStream<T>.

Instead of stopping here, the native integration has also been significantly expanded to smoothly connect Sollang into the boundaries of the actual system language.

  • Syntax for grouping multiple C ABI functions into one native module
  • From the input format, infer types such as Int64 and Float64 during the call
  • ABI ensures stable structure transfer and return
  • Sollang code is exported as a Windows DLL and a Linux .so for re-use
  • Windows COM's QueryInterface, AddRef, Release lifetime cycle
  • C++ binding using Clang AST and automatic C-shim generation
  • Transfer C++ exceptions to Sollang Result safely
  • Affine handle and RAII-based definitive resource cleanup

The important principle was not just the beauty of the syntax, but also not hiding any costs. The stream avoided creating unnecessary intermediate containers, and was verified to prevent wrapper allocation and aggregate copying per call during the native call path. Instead of the exaggerated term “zero memory,” we aimed for Designs that avoid unnecessary allocations and copying.

The web playground also aligns with the Stage2 compiler. The ranges each and fold, streams, containers, standard input, and unknown function call diagnostics have been thoroughly checked, and on mobile devices, the explanation area has moved to the bottom so it is not in front of the code. -> and => are part of the flow itself in Sollang, so they have been adjusted to be more clearly visible in the shimmer highlight.

The verification has become much stronger than before.

  • Full Windows example 866/866 passed
  • Linux entire example 865/865 passed
  • Windows/Linux Stage2 verification passed
  • Windows/Linux Stage3 fix point verification passed
  • C ABI, shared libraries, COM, C++, C++ shim regression verification passed
  • Check that there is an aggregate copy of 0 per call in LLVM emitter segmentation ABI
  • Compiler warm median: Windows around 69–71 ms, Linux around 74–76 ms
  • 5% regression gate pass compared to previous performance standards

Another long-drawn-out task was dividing the expanded self-hosted LLVM/text implementation into modern module structures. Rather than simply splitting files, clear ownership of states and ABI boundaries were defined to ensure both maintainability and compilation performance.

The release includes a self-contained compiler for Windows x64 and Linux x64, a verified Stage3 compiler, and SHA-256 verification.

This 0.3 version is more like a release that proved "Value should flow, and costs must be revealed."—the core statement of Sollang—in actual implementation on both the stream and native boundaries, rather than simply adding one feature.

0 Comments

Comments: 0

Sign in to leave a comment.

No comments yet. Write the first one.

The server connection was interrupted. Reconnect ×