Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve CAIRO_NATIVE_RUNTIME_LIBRARY relative path #841

Merged

Conversation

rodrigo-pino
Copy link
Contributor

Simple PR to resolve the CAIRO_NATIVE_RUNTIME_LIBRARY when it is a relative path so that it can work better with STARKNET approach to global vars (e.g. doing "./native_runtime.a") will turn into "/usr/somewhere/over/the/rainbow/native_runtime.a".

Looking forward to hear your thoughts!

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.

scripts/bench-hyperfine.sh Outdated Show resolved Hide resolved
@rodrigo-pino rodrigo-pino force-pushed the rdr/resolve-runtime-library-path branch from a7ec178 to 3a9dfac Compare October 14, 2024 22:05
@rodrigo-pino rodrigo-pino force-pushed the rdr/resolve-runtime-library-path branch from 3a9dfac to 5862e47 Compare October 14, 2024 22:07
src/ffi.rs Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 22.22222% with 14 lines in your changes missing coverage. Please review.

Project coverage is 82.67%. Comparing base (8175154) to head (4c8236b).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/ffi.rs 22.22% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #841      +/-   ##
==========================================
+ Coverage   82.43%   82.67%   +0.24%     
==========================================
  Files         120      120              
  Lines       34856    34792      -64     
==========================================
+ Hits        28733    28766      +33     
+ Misses       6123     6026      -97     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@edg-l edg-l enabled auto-merge October 16, 2024 12:59
@edg-l edg-l added this pull request to the merge queue Oct 16, 2024
Merged via the queue into lambdaclass:main with commit b5769e4 Oct 16, 2024
15 checks passed
edg-l added a commit that referenced this pull request Oct 21, 2024
* Add logs

* Implement Felt252Dict trace dump

* Implement nullabel for trace dump

* Print type id

* Remove print

* add convertion for Sints

* fix mispelled types

* forgot to add feature

* change Sints value to correspond to sierra-emu

* Readd feature

* Add is_infinity field to secp256 point struct (#828)

* add is_infinity to secp point

* clean

* fix

* use same deps as blockifier

* fix

* fix layout

* fix test

* remove some brittle asserts due to random initial data when adding and muling points at infinity

* fix

* remove unused dep

* fixes, missed the value entry/output

* Reset src

* Fix warnings

* Make library public

* Use debug runtime for trace dump

* fix storage's values truncations (#839)

* fix storage's values truncations

* change implementation for i8 i16 i32 i64 too

* format

* Add ptr check to felt dict entry

* Add malloc tracing and fix more memory leaks. (#833)

* Add memory tracing.

* Partial memory fixes.

* Fix arrays.

* Simplify dictionaries. Fix false positive memory leak in dictionary drops.

* Fix zero-sized allocation. Fix warnings. More mem tracing checks.

* Fix mem tracing.

* Fix memory leak in `print` libfunc.

* Fix array slice libfunc.

* Fix starknet memory leaks.

* Fix keccak syscall.

* Fix dict get double free bug.

* Lots of memory fixes.

* More fixes.

* Fix CI.

* Remove old TODOs.

* Fix CI (again).

* Remove TODOs.

* Fix test.

* Maybe fix

* Maybe fix

* Maybe fix

* Dont panic when building circuit partial outputs

* trace dump for Sha256StateHandler

* Builtin costs rework (#837)

* Update to 2.8.4, release docs, alpha

This PR updates cairo to 2.8.4, adds some release docs and updates the
version to alpha.3 to prepare for another release.

* try fix

* cleanup ci, remove panic in link

* rename from jit to from ptr, etc

* crates.io badge

* progress

* progress

* fmt2

* progress

* progress

* fix

* fix bench

* use struct

* Fix felt252 and enum deserialization bugs. (#844)

* Fix felt252 and enum deserialization bugs.

* Fix formatting.

* Also fix the runtime.

* Fix errors.

* try to fix ci

* remove unused deps

---------

Co-authored-by: Edgar Luque <git@edgarluque.com>

* Fix trace dump type conv

* fix aot contract executor not passing builtinstats (#849)

* Fix felt252 and enum deserialization bugs.

* Fix formatting.

* Also fix the runtime.

* Fix errors.

* try to fix ci

* remove unused deps

* fix aot contract executor not passing builtinstats

---------

Co-authored-by: Esteve Soler Arderiu <esteve.soler@lambdaclass.com>
Co-authored-by: Esteve Soler Arderiu <soler.arderiu@gmail.com>

* Fix bug (#851)

* Also fix felt bits in starknet syscall wrappers (#853)

* Also fix felt bits in starknet syscall wrappers

* style

* missed

* fix aot contract executor not passing builtinstats (#849)

* Fix felt252 and enum deserialization bugs.

* Fix formatting.

* Also fix the runtime.

* Fix errors.

* try to fix ci

* remove unused deps

* fix aot contract executor not passing builtinstats

---------

Co-authored-by: Esteve Soler Arderiu <esteve.soler@lambdaclass.com>
Co-authored-by: Esteve Soler Arderiu <soler.arderiu@gmail.com>

* Fix bug (#851)

* Also fix felt bits in starknet syscall wrappers (#853)

* Also fix felt bits in starknet syscall wrappers

* style

* missed

* update version to alpha 4 (#854)

* bytes31

* Better function attributes and re-enable >O1 opt (#843)

* Fix felt252 and enum deserialization bugs.

* Fix formatting.

* Also fix the runtime.

* Fix errors.

* try to fix ci

* remove unused deps

* proper function attributes

* add proper function attrs to optimize better, add some passes, run tests with atleast some opts

* dont use remi

* oops

* maybe with opt level 3 now it works

* test

* works

* readd deleted bench

* remove dbg

* Update bench-hyperfine.sh

* fixci

* comment

* Update src/ffi.rs

Co-authored-by: MrAzteca <azteca1998@users.noreply.github.com>

---------

Co-authored-by: Esteve Soler Arderiu <esteve.soler@lambdaclass.com>
Co-authored-by: Esteve Soler Arderiu <soler.arderiu@gmail.com>
Co-authored-by: MrAzteca <azteca1998@users.noreply.github.com>

* Resolve `CAIRO_NATIVE_RUNTIME_LIBRARY` relative path (#841)

* feat(ffi): resolve runtime relative path using current dir

* chore: remove mentions to old runtime variable

* fix: typo

---------

Co-authored-by: Bohdan Ohorodnii <limposfeed@gmail.com>

* Implement secp

* Fix bytes31

* try to fix ci (#858)

* update implementing libfuncs doc (#856)

* Fix bytes31 bug

* Remove unused dep

---------

Co-authored-by: FrancoGiachetta <francogiachetta27@gmail.com>
Co-authored-by: Edgar <git@edgarluque.com>
Co-authored-by: MrAzteca <azteca1998@users.noreply.github.com>
Co-authored-by: Esteve Soler Arderiu <esteve.soler@lambdaclass.com>
Co-authored-by: Esteve Soler Arderiu <soler.arderiu@gmail.com>
Co-authored-by: Rodrigo <rodrodpino@gmail.com>
Co-authored-by: Bohdan Ohorodnii <limposfeed@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants