-
Notifications
You must be signed in to change notification settings - Fork 45
[1/2] Authentication component rollup target #666
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
df18043
feature: add `RollupTarget::AuthComponent`
greenhat f4b5ff6
fix: don't export core Wasm function after lifting #667
greenhat b418339
fix: convert `auth-*` function names to snake case (`auth_*`)
greenhat afe485d
feature: implement no-auth authentication procedure
greenhat 8dddef9
refactor: move auth-component-no-auth test project to `examples`
greenhat e398690
fix: fix the `incr_nonce` stub function signature,
greenhat ab27cbc
fix(workaround): rename `auth_*` function to `auth__*` to make miden-…
greenhat 5c8d6fe
chore: add local network test for the no-auth authentication component
greenhat 3dd2fc2
fix: make `init` procedure private
greenhat 3d969b5
chore: formatting
greenhat 825c2e5
fix: restore the RUSTFLAGS env var after running cargo in cargo-miden
greenhat e2c3a75
feature: add authentication component new project template to `cargo …
greenhat eb558cf
chore: remove extra comma in RUSTFLAGS, clean up dbg!
greenhat 6fc2f3f
refactor: double underscore the whole auth procedure name `auth-proce…
greenhat 4efe063
shore: update Cargo.lock after rebase
greenhat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/target |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The init procedure needs to be public, so that it can be called from any
call
able procedure in the component that needs to initialize a fresh context in its prologue.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that I understand why
init
needs to be public. We only invoke theinit
in our lifted exports functions (see an example atcompiler/tests/integration/expected/examples/basic_wallet.masm
Lines 13 to 21 in 4efe063
call
ed without any prologue and epilogue at the call site. So the lifted export functions are the only public procedures in the component.See also the discussion that led to making
init
private at 0xMiden/miden-base#1877There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be noted that the fact we're emitting a single module for a given Wasm binary is incidental here, it isn't an inherent structural thing, just an artifact of how Rust compiles to Wasm.
In any case, if we can guarantee that all exports from a component (including a program entrypoint, if present), are emitted to the same underlying MASM module, sure, the
init
procedure can be private in that case. I didn't think that was something we guaranteed, so much as it was a happy accident of how things get compiled from Rust.I'm fine with making this private until there is an actual issue in practice, but wanted to raise the chance of it being an issue during review to make sure the change is actually well-motivated.