Control all Build Systems
Project description
Wrapper around MeasureSuite.
In fact there are two wrappers. First a simple C command line interface, which
allows you to pass C code and the corresponding asm block. The program then
compiles automatically the needed shared library for MeasureSuite and runs
it. This simple command line interface is then again wrapped in a python library
which allows for an even easier usage.
Build:
Run:
git clone --recursive https://github.com/FloydZ/MeasureSuiteCommandLine
cd MeasureSuiteCommandLine
pip install -r requirements.txt
./build.sh
and that should do it. If you have nix install you can alternatively run:
git clone --recursive https://github.com/FloydZ/MeasureSuiteCommandLine
cd MeasureSuiteCommandLine
nix-shell
NOTE: currently the nix approach is broken, as the relative import from git
via requirements is not possible.
C Interface
After you build the library a binary main is available in build. Use it
like so:
./main "#include <stdint.h>
void add_two_numbers(uint64_t *o, const uint64_t *i0, const uint64_t *i1) {
*o = *i0 + *i1;
}" "mov rax, [rsi]
add rax, [rdx]
mov [rdi], rax
ret
"
After everything run successful you should see the output:
{
"stats":
{
"countA": 1,
"countB": 1,
"chunksA": 0,
"chunksB": 0,
"batchSize": 1,
"numBatches": 1,
"runtime": 0,
"runOrder": "ba",
"checkResult": true
},
"times": [[-1,4792,1196],[798,-1,771]]
}
Python Wrapper:
c_code = "#include <stdint.h>\nvoid add_two_numbers(uint64_t *o, const uint64_t *i0, const uint64_t *i1) {\n *o = *i0 + *i1;\n}\n"
asm_code = "TODO"
w = MS([c_code, asm_code])
d = w.run()
print(d)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file measuresuitecommandline-0.1.0.tar.gz.
File metadata
- Download URL: measuresuitecommandline-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c969ee1ce1c257b633f069d09f5e109e18ed2e5683d442081b0dbaa9ae6f3cd6
|
|
| MD5 |
1e56b3545cdd914d54f3704e4116dcd7
|
|
| BLAKE2b-256 |
ac0ec1618126028ca80a495e5018108802c277c0cc702d5a1a3b8a24ec3ebeb6
|
Provenance
The following attestation bundles were made for measuresuitecommandline-0.1.0.tar.gz:
Publisher:
publish.yml on FloydZ/MeasureSuiteCommandLine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
measuresuitecommandline-0.1.0.tar.gz -
Subject digest:
c969ee1ce1c257b633f069d09f5e109e18ed2e5683d442081b0dbaa9ae6f3cd6 - Sigstore transparency entry: 212832263
- Sigstore integration time:
-
Permalink:
FloydZ/MeasureSuiteCommandLine@ec8c3d2002abfe4d5d339520864963e0c68fd983 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/FloydZ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec8c3d2002abfe4d5d339520864963e0c68fd983 -
Trigger Event:
release
-
Statement type:
File details
Details for the file measuresuitecommandline-0.1.0-py3-none-any.whl.
File metadata
- Download URL: measuresuitecommandline-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fc184073b820f55615f85336f574c1552739ffc3f7a545d5553b31e8e9d9123
|
|
| MD5 |
717fad5406ed4c23c7236aed4774594a
|
|
| BLAKE2b-256 |
be742bb20ed01f3ddc8853da4a9f8c8eac838d737469c35379ab2c856714c57a
|
Provenance
The following attestation bundles were made for measuresuitecommandline-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on FloydZ/MeasureSuiteCommandLine
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
measuresuitecommandline-0.1.0-py3-none-any.whl -
Subject digest:
3fc184073b820f55615f85336f574c1552739ffc3f7a545d5553b31e8e9d9123 - Sigstore transparency entry: 212832267
- Sigstore integration time:
-
Permalink:
FloydZ/MeasureSuiteCommandLine@ec8c3d2002abfe4d5d339520864963e0c68fd983 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/FloydZ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec8c3d2002abfe4d5d339520864963e0c68fd983 -
Trigger Event:
release
-
Statement type: