Comments (4)
With #105 merged, what is the status of this? What would still need to be done?
from hacspec.
So what you can do right now is to add an attribute to a function such that it will be ignored by the typechecker
Essentially what the Readme here says https://github.com/hacspec/hacspec/tree/a9f098d3a7f0adf40b37b289692324ec84c75bed/utils/attributes#hacspec_unsafe
But I'm not sure whether the import of non-hacspec crates works with this setup.
It should, because the typechecker doesn't look into other crates at all. But I don't think anyone ever tested this.
So it might all work already as expected but someone should test it (and ideally get a test in here so we can be sure it does). Then we can close this issue (or fix any issues we run into).
from hacspec.
There does not seem to be any code in the language
crate related to hacspec_unsafe
, so it only does something when running as part of rust code, not when exporting to backends. I am currently using cfg
to exclude code from being seen by hacspec, but this also requires some checks in the backend, and making hacspec run with a cfg(feature="hacspec")
.
from hacspec.
There does not seem to be any code in the
language
crate related tohacspec_unsafe
, so it only does something when running as part of rust code, not when exporting to backends.
Right, that's what it is supposed to do 🙂 The typechecker should ignore these functions. What do you expect it to do?
You could generate function stubs for functions that only have #[hacspec_unsafe]
(as their signature should is in hacspec).
from hacspec.
Related Issues (20)
- Split ed25519 into two separate crates HOT 2
- Unable to use hacspec in edition 2021 crates
- Using consts from other module fails HOT 3
- Replace im
- Return Result type
- Allow skipping the enum type when using variants
- Implement unary negation for natural number
- ^ operation not available for type bool
- A sequence of sequences
- Importing from the same crate
- Empty Tuple struct, does not work
- Add F* to the CI
- Bad name resolution in the case of external re-exported module HOT 1
- Type the AST more precisely, to avoid `unwrap`s and `panic`s
- Add result let binding
- F* backend: variants are extracted to constructors whose payloads are tuples
- Outdated README
- Cleanup warnings
- implementation of from_be_bytes in math_integers is missing HOT 1
- syn 2 breaks the build HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hacspec.