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

Add "hello world" component sample #2814

Merged
merged 3 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
cargo clippy -p riddle &&
cargo clippy -p sample_bits &&
cargo clippy -p sample_com_uri &&
cargo clippy -p sample_component_hello_world &&
cargo clippy -p sample_consent &&
cargo clippy -p sample_core_app &&
cargo clippy -p sample_counter &&
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
cargo test -p riddle &&
cargo test -p sample_bits &&
cargo test -p sample_com_uri &&
cargo test -p sample_component_hello_world &&
cargo test -p sample_consent &&
cargo test -p sample_core_app &&
cargo test -p sample_counter &&
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ members = [
"crates/libs/*",
"crates/samples/windows-sys/*",
"crates/samples/windows/*",
"crates/samples/components/*",
"crates/targets/*",
"crates/tests/*",
"crates/tools/*",
Expand Down
8 changes: 8 additions & 0 deletions crates/samples/components/hello_world/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "sample_component_hello_world"
version = "0.0.0"
edition = "2021"
publish = false

[lib]
crate-type = ["cdylib"]
1 change: 1 addition & 0 deletions crates/samples/components/hello_world/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sample for [Creating your first DLL in Rust](https://kennykerr.ca/rust-getting-started/creating-your-first-dll.html) in [Getting Started with Rust](https://kennykerr.ca/rust-getting-started).
4 changes: 4 additions & 0 deletions crates/samples/components/hello_world/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#[no_mangle]
extern "system" fn HelloWorld() -> i32 {
123
}