tobogganSe connecter

louise

The Louise language: compiler, runtime, std, tooling

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

M7 (part 1): native dependencies, blocking externs, resources, argon2

- tilcayo.toml:
  - path [dependencies]: a dependency's modules are `name` and
    `name/...`, and a package's own lib.til has its name;
  - [native.*] kinds c, static, pkg-config and cargo, built and linked by
    the driver (C objects are cached).
- `@extern(c, "sym", blocking)` runs the call on a four-thread pool while
  the actor parks. A kill of that actor waits until the call returns.
- Resource<t> (std/ffi): a foreign pointer with a finalizer, pinned
  unless thread-safe.
- std/random (salts, tokens), and string starts_with/ends_with/contains.
  Prelude Eq/Show/Debug for Result.
- tilrt.h: Result/Option/Bool builders for C shims. runtime/tilcayo-ffi
  provides the same for Rust bindings.
- `tilc test --native`: one executable for all tests, each test in its
  own process. Exact prototypes for foreign functions.
- packages/argon2: the vendored reference implementation (release
  20190702) and a shim. Its tests include a known answer computed with
  argon2-cffi. CI runs them.
- ADR 0005 Revision 1 (proposed): the extern convention and the
  decisions above.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

olivier · il y a 1 mois · 424c4cec2dfac27bfeb4bfc33343a87d1ca90920

Parents 9c92a3b

56 fichiers modifiés, 5252 ajouts, 51 suppressions

Acrates/tilc/tests/fixtures/native/c/helpers.c+35−0
Acrates/tilc/tests/fixtures/native/rust/Cargo.lock+14−0
Acrates/tilc/tests/fixtures/native/rust/Cargo.toml+14−0
Acrates/tilc/tests/fixtures/native/rust/src/lib.rs+12−0
Acrates/tilc/tests/fixtures/native/src/main.til+40−0
Acrates/tilc/tests/fixtures/native/static/add.c+6−0
Acrates/tilc/tests/fixtures/native/tilcayo.toml+16−0
Mcrates/tilc_codegen_c/src/driver.rs+118−0
Mcrates/tilc_codegen_c/src/emit.rs+81−21
Mcrates/tilc_codegen_c/src/lib.rs+11−5
Apackages/argon2/test/argon2_test.til+52−0
Apackages/argon2/vendor/argon2/LICENSE+314−0
Apackages/argon2/vendor/argon2/include/argon2.h+437−0
Apackages/argon2/vendor/argon2/src/argon2.c+452−0
Apackages/argon2/vendor/argon2/src/blake2/blake2-impl.h+156−0
Apackages/argon2/vendor/argon2/src/blake2/blake2.h+89−0
Apackages/argon2/vendor/argon2/src/blake2/blake2b.c+390−0
Apackages/argon2/vendor/argon2/src/blake2/blamka-round-ref.h+56−0
Apackages/argon2/vendor/argon2/src/core.c+648−0
Apackages/argon2/vendor/argon2/src/core.h+228−0
Apackages/argon2/vendor/argon2/src/encoding.c+463−0
Apackages/argon2/vendor/argon2/src/encoding.h+57−0
Apackages/argon2/vendor/argon2/src/ref.c+194−0
Apackages/argon2/vendor/argon2/src/thread.c+57−0
Apackages/argon2/vendor/argon2/src/thread.h+67−0