Commit graph

164 commits

Author SHA1 Message Date
Fabian Schmalzried
97192431a5
build.zig: test replacing array_list.Managed with ArrayList 2025-10-23 14:21:48 +00:00
Brendan Hansknecht
ed213e1200
correct roc builtin path in build script.
When loading the roc builtins from a different build.zig (like in a platform),
The roc builtin files would not be found due to depend on cwd.
Instead, depend on the roc build root.
2025-10-21 19:00:04 -07:00
Anton-4
bf19a59c70
add tests checkmark 2025-10-21 11:52:42 +02:00
Richard Feldman
7bed6e5a8d
Merge pull request #8302 from roc-lang/import-builtins
Import builtins from .roc files
2025-10-20 21:48:14 -04:00
Anton-4
41824298b4
print nr of passed tests 2025-10-20 19:24:00 +02:00
Richard Feldman
6706a068f0
Merge origin/main - upgrade to Zig 0.15.2
- Resolved conflicts preserving BuiltinTypes architecture
- Updated ArrayList to array_list.Managed for Zig 0.15.2
- Updated Io.Writer API for Zig 0.15.2
- Kept Bool special-case handling in render_helpers
- Kept builtin module loading in all affected files
2025-10-19 14:58:53 -04:00
Richard Feldman
51affced49
Don't serialize the frozen field 2025-10-18 21:48:08 -04:00
Richard Feldman
ce70ac5dd9
Fix playground discrepancy 2025-10-18 21:38:47 -04:00
Anton-4
6b2b404034
fmt 2025-10-18 20:07:39 +02:00
Anton-4
91bdd15836
fix Killed on macos x64 2025-10-18 20:06:15 +02:00
Richard Feldman
09c50c77ca
Consolidate some build.zig logic 2025-10-17 21:10:43 -04:00
Richard Feldman
82c6562352
Merge remote-tracking branch 'origin/main' into import-builtins 2025-10-17 21:05:58 -04:00
Anton-4
53f562132f
some zig 15 fixes 2025-10-15 11:44:41 +02:00
Anton-4
e5fed613ce
Merge branch 'main' of github.com:roc-lang/roc into upgrade-to-zig-1.15.1 2025-10-14 15:48:33 +02:00
Richard Feldman
17ecc68fed
Various auto-import fixes 2025-10-13 16:01:39 -04:00
Richard Feldman
f2edced953
Merge pull request #8284 from roc-lang/bhansconnect/push-pzovnxkmwrws
fix canonicalize fuzzer
2025-10-13 00:59:43 -04:00
Richard Feldman
185f372fb8
Merge remote-tracking branch 'origin/main' into remove-injection 2025-10-12 20:53:50 -04:00
Richard Feldman
9053f21841
zig fmt 2025-10-12 19:52:54 -04:00
Richard Feldman
31345252b5
More ModuleEnv consistency fixes 2025-10-12 19:44:24 -04:00
Brendan Hansknecht
7295e4f637
fix canonicalize fuzzer 2025-10-11 11:00:39 -07:00
Richard Feldman
b0e31347c0
wip claude stuff 2025-10-11 11:32:12 -04:00
Richard Feldman
5562334ce5
test that Serialized types are platform-independent
This test ensures that all .Serialized types have identical sizes on
32-bit and 64-bit platforms. This is critical because we serialize these
types and expect them to be portable across architectures.

If a Serialized type accidentally contains pointers/slices, it will have
different sizes on different platforms, breaking serialization. This test
catches such issues by building for both native and wasm32 targets.

The test runs in CI as part of the check-once job, and can be run locally
with: zig build test-serialization-sizes
2025-10-11 11:31:26 -04:00
Richard Feldman
7ba3f684d5
Use dynamic indices in more places 2025-10-10 19:04:53 -04:00
Richard Feldman
135a9e7a21
target baseline x86_64 for valgrind on CI 2025-10-09 21:01:09 -04:00
Richard Feldman
c01b9b9306
Incorporate Bool into builtins 2025-10-09 12:40:38 -04:00
Richard Feldman
a3e490adfd
Add caching of builtins 2025-10-09 11:14:02 -04:00
Richard Feldman
5db4461d56
Try reordering build steps 2025-10-09 09:32:18 -04:00
Richard Feldman
ec41385c9a
Merge remote-tracking branch 'origin/main' into load-builtins2 2025-10-09 08:24:08 -04:00
Richard Feldman
735af9456f
Reorder some build steps 2025-10-09 08:09:57 -04:00
Richard Feldman
7e1b879a5e
Only use optimize = Debug 2025-10-08 22:26:03 -04:00
Richard Feldman
c55008ff08
Add new builtins to snapshot tests 2025-10-08 22:01:31 -04:00
Richard Feldman
1753006ee7
Add a test to verify builtins compilation works 2025-10-08 21:44:29 -04:00
Richard Feldman
5906f59a92
Add tracy for builtin_compiler 2025-10-08 21:17:27 -04:00
Richard Feldman
e8356de829
Add minimal builtins compiler 2025-10-08 20:43:38 -04:00
Jared Ramirez
8fe09d4b80
Fix last compile issues 2025-10-02 21:00:46 -04:00
Jared Ramirez
c58afd7d39
Fix tag ext and number layouts 2025-09-30 17:47:03 -04:00
Jared Ramirez
d3207a6e71
Num type vars & generalization!!! 2025-09-30 17:41:35 -04:00
Anton-4
a812bdd18e
mrege fix progress: 59/63 steps succeeded 2025-09-30 19:19:34 +02:00
Anton-4
09da7e52e3
Merge branch 'main' of github.com:roc-lang/roc into upgrade-to-zig-0.15.1 2025-09-30 16:40:03 +02:00
Anton-4
2107235c96
Support running specific tests (#8255)
support running specific tests
2025-09-29 19:54:20 +02:00
Anton-4
eefecb225e
fix zig build roc 2025-09-23 18:40:48 +02:00
Anton-4
6f5c655bf9
zig 15 upgrade fixes 2025-09-22 19:43:25 +02:00
Anton-4
d791285e11
Merge branch 'main' of github.com:roc-lang/roc into upgrade-to-zig-0.15.1 2025-09-22 16:55:15 +02:00
Luke Boswell
cb42d26e11
Roc platform host shim (#8214)
* use zig Builder to generate LLVM bc for platform host shim

* WIP

* Working embedded LLVM compilation

* lints

* Update test_shared_memory_system.zig

* Update main.zig

* Refactor out builder into separate file

* remove clang fallback, remove -Dllvm build flag

* WIP change platform header

* WIP no hardcoded platform entrypoints

* WIP no hardcoded entrypoints

* remove hardcoded interpreter shim entrypoint

* WIP multiple entrypoints

* WIP multiple entrypoints

* WIP alignment issue

* it's working!!

* cleanup

* fmt

* fix tests and snapshots

* fix cross-compile

* WIP fix linking linux

* improved debug logging in rocRun

* WIP fix linux segfaults

* cleanup stray dbgs

* fix Windows linking

* WIP remove std.debug.print in prebuilt shim

* remove libc stubs, try C shim for platform host main

* WORKING ON LINUX!!!

* WIP fixing int platform

* prevent double mapping of shared memory

* WIP

* remove clang fallback

* cleanup test platforms

* vendor linux object files for musl and gnu in test platforms

* fix windows __main export

* typo

* avoide hardcoding libc path and dynamic linker on linux

* some fixes

* try CI fix for linux ARM64

* try use system CRT for ARM64

* use absolute pats for vendored CRT

* minimal roc build

* use target os for filename not host os

* implement app stubs for test platforms

* fix glibc

* WIP cross compilation

* fix run, fix build for native

* Merge remote/main

* fix macos

* add bookends

* remove hosts

* fix cross-compile for linux on macos

* fix files paths for Windows

* Update main.zig

* test ubu 24.04 too

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* debug: log all used instructions

* fmt

* get bad instruction with gdb

* install gdb

* Revert last 4 commits

* simpler cross-compile arm64 runtime files

* add minimal cross-compilation for glibc

* simplify stub generation

* Update test_int_platform.sh

* Update ci_cross_compile.yml

* Update ci_cross_compile.yml

* try alpine3.18 x64musl files

* Claude's fix + removed CPU instructions

* fix fuzz crash empty after merge

* update snapshot

* restore full CI

* some cleanup

* remove debugging from CI - print all supported CPU instructions

* try using generic when LLVM compiles app stub

* enhanced error handling for app stub compilation using LLVM

* check machine ABI on linux

* try more debugging

* update test script to inidicate truncated error logs, temporarily display everything for arm64 linux errors

* fix missing arm64 libc search paths

* back to normal CI

* try without .git 

See https://github.com/ziglang/zig/issues/21316#issuecomment-2408071050

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* undo .git change

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* retry zig build command

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

* different retry strategy

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>

---------

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
Co-authored-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2025-09-09 13:15:23 +02:00
Isaac Van Doren
68f5f38b87
Switch addStaticLibrary to addLibrary with linkage configured to static 2025-09-06 20:46:10 -05:00
Isaac Van Doren
5fc71719dd
Use .root_module = b.createModule 2025-09-06 20:43:44 -05:00
Richard Feldman
7caaef882d
Try a new Windows implementation 2025-08-17 21:08:01 -04:00
Richard Feldman
a71c1ee35a
zig fmt 2025-08-17 11:12:29 -04:00
Richard Feldman
a2ec3f8248
Fix some macOS stuff 2025-08-17 10:36:28 -04:00
Richard Feldman
c539c9d4da
Merge remote-tracking branch 'origin/main' into watch-fs 2025-08-16 14:08:53 -04:00