Datasets:
messages listlengths 3 3 | category stringclasses 6
values | crate stringclasses 1
value | source dict |
|---|---|---|---|
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain the `clone` implementation for the event queue in `bevy3d_ui`. Why does cloning a channel sender/receiver pair make s... | code_explanation | leptos | {
"type": "function_item",
"name": "clone",
"source_file": "projects/bevy3d_ui/src/demos/bevydemo1/eventqueue/events.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Refactor this leptos code to be more idiomatic and maintainable (`new` from `examples/todo_app_sqlite_axum/e2e/tests/fixtures... | refactoring | leptos | {
"type": "function_item",
"name": "new",
"source_file": "examples/todo_app_sqlite_axum/e2e/tests/fixtures/world/mod.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain the following leptos code in depth (`About` from `examples/islands_router/src/app.rs`):\n\n```rust\npub fn About() ->... | code_explanation | leptos | {
"type": "function_item",
"name": "About",
"source_file": "examples/islands_router/src/app.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Find the bug in this `TryFrom<String>` implementation for a `Password` type:\n\n```rust\nfn try_from(p: String) -> Result<Sel... | bug_detection | leptos | {
"type": "function_item",
"name": "try_from",
"source_file": "projects/ory-kratos/app/src/auth.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain what `element_exists` does and why `expect` with a formatted message is used instead of `?` for error propagation in ... | code_explanation | leptos | {
"type": "function_item",
"name": "element_exists",
"source_file": "examples/lazy_routes/e2e/tests/fixtures/check.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write doc-tested unit tests for the `version()`, `input()`, and `value()` methods of `ArcAction` in `leptos_reactive`. Each t... | test_generation | leptos | {
"type": "impl_item",
"name": "ArcAction",
"source_file": "reactive_graph/src/actions/action.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Generate an `init_smol` executor initializer for `any_spawner` that uses the `smol` async runtime, following the same pattern... | code_generation | leptos | {
"type": "generated",
"name": "init_async_executor",
"source_file": "any_spawner/src/lib.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write unit tests for this `PartialEq` implementation on `MappedMutArc`:\n\n```rust\nimpl<Inner, U: PartialEq> PartialEq for M... | test_generation | leptos | {
"type": "impl_item",
"name": "PartialEq",
"source_file": "reactive_graph/src/signal/guards.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain the `Property<K, P>` struct and `SendWrapper` in leptos — why is the value wrapped in `Option<SendWrapper<P>>` and wh... | api_usage | leptos | {
"type": "struct_item",
"name": "Property",
"source_file": "tachys/src/html/property.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain what this `tuples!` macro does and how it enables implementing `IntoFragment` for tuple types in Leptos's view system... | code_explanation | leptos | {
"type": "macro_definition",
"name": "tuples",
"source_file": "tachys/src/view/fragment.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement the `hydrate` method for a `Doctype` node in tachys. Explain why the implementation is intentionally a no-op, what ... | code_generation | leptos | {
"type": "crates.io",
"name": "tachys",
"source_file": "tachys/src/html/mod.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement `AddAnyAttr` for a custom reactive wrapper `Mapped<F, V>` where `F: ReactiveFunction<Output = V>` and `V: RenderHtm... | code_generation | leptos | {
"type": "impl_item",
"name": "AddAnyAttr",
"source_file": "tachys/src/reactive_graph/mod.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Based on the Leptos codebase pattern shown below from `leptos/src/into_view.rs`, write a new, related but distinct function o... | code_generation | leptos | {
"type": "trait_item",
"name": "CollectView",
"source_file": "leptos/src/into_view.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Refactor `ident_from_tag_name` to handle kebab-case tag names by converting them to snake_case identifiers:\n\n```rust\npub(c... | refactoring | leptos | {
"type": "function_item",
"name": "ident_from_tag_name",
"source_file": "leptos_macro/src/view/mod.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain the `Write` trait implementation for `ArcWriteSignal<T>` in Leptos's `reactive_graph` crate. Specifically, why does `... | code_explanation | leptos | {
"type": "reactive_graph",
"name": "Write for ArcWriteSignal<T>",
"source_file": "reactive_graph/src/signal/arc_write.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "The following Leptos component uses two parallel `<Suspense>` blocks. A reviewer says it has a bug: the counter increment but... | bug_detection | leptos | {
"type": "crate_source",
"name": "Parallel (suspense_tests)",
"source_file": "examples/suspense_tests/src/app.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement `KeyedAccess<K>` for `VecDeque<T>` so it can be used in reactive store keyed iteration."
},
{
"role": "assi... | code_generation | leptos | {
"type": "impl_item",
"name": null,
"source_file": "reactive_stores/src/keyed.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Walk me through the `Todos` component from a Leptos todo app that uses SQLite + Axum. The component uses `Resource`, `ServerA... | code_explanation | leptos | {
"type": "crates.io",
"name": "leptos",
"source_file": "examples/todo_app_sqlite_axum/src/todo.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Using the Leptos `lazy_route_impl` pattern shown below as inspiration, implement a **new** related function or component that... | code_generation | leptos | {
"type": "function_item",
"name": "lazy_route_impl",
"source_file": "router_macro/src/lib.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement `Render for Vec<T>` in tachys, including `build` (which creates a `VecState` with a marker node) and `rebuild` (whi... | code_generation | leptos | {
"type": "source_code",
"name": "Render for Vec<T>",
"source_file": "tachys/src/view/iterators.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a complete Cucumber `World` step implementation that includes `i_click_the_button` as part of a counter increment test,... | code_generation | leptos | {
"type": "function_item",
"name": "i_click_the_button",
"source_file": "examples/todo_app_sqlite/e2e/tests/fixtures/world/action_steps.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "I have an `ArcAsyncDerived<T>` value and I want to make sure that the current reactive scope is subscribed to it so changes w... | api_usage | leptos | {
"type": "function_item",
"name": "track",
"source_file": "reactive_graph/src/computed/async_derived/arc_async_derived.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement a Leptos component that uses `aria_valuenow` to create an accessible progress bar:\n\n```rust\nfn aria_valuenow(\n ... | code_generation | leptos | {
"type": "function_item",
"name": "aria_valuenow",
"source_file": "tachys/src/html/attribute/aria.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Refactor the `App` component in the Tauri example to use a `Resource` instead of a `ServerAction` + `Effect` pattern for fetc... | refactoring | leptos | {
"type": "generated",
"name": "App",
"source_file": "projects/tauri-from-scratch/src-orig/src/app.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a complete Leptos example that persists a reactive `Store<UserPreferences, LocalStorage>` to the browser's `localStorag... | code_generation | leptos | {
"type": "impl_item",
"name": "[unnamed]",
"source_file": "reactive_stores/src/serde.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show a practical example of using `Resource<T, FromToStringCodec>` for a simple string-based server function. Explain when to... | api_usage | leptos | {
"type": "impl_item",
"name": "None",
"source_file": "server_fn/src/codec/string.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write tests for the `try_new_put_streaming` server function request builder:\n\n```rust\nfn try_new_put_streaming(\n path:... | test_generation | leptos | {
"type": "function_item",
"name": "try_new_put_streaming",
"source_file": "server_fn/src/request/mod.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain what `Oco` (\"Owned, Counted, or Owned\") is in Leptos and what `clone_inplace` does in this test:\n\n```rust\nfn clo... | code_explanation | leptos | {
"type": "function_item",
"name": "cloned_inplace_owned_string_should_make_counted_st",
"source_file": "oco/src/lib.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "How do I implement `FromReq` for a custom type `T` using the PUT HTTP method in `server_fn`? Show me the full trait implement... | api_usage | leptos | {
"type": "source_code",
"name": "FromReq for T (Put)",
"source_file": "server_fn/src/codec/put.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a component that uses `html_len` on `Option<impl RenderHtml>` to pre-allocate SSR string buffers. Explain how the `matc... | code_generation | leptos | {
"type": "function_item",
"name": "html_len",
"source_file": "tachys/src/view/iterators.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain the `InnerHtmlValue` trait in Leptos's tachys crate and what `AsyncOutput` and `Send` requirements mean:\n\n```rust\n... | code_explanation | leptos | {
"type": "trait_item",
"name": "InnerHtmlValue",
"source_file": "tachys/src/html/element/inner_html.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "The JS const in tachys/src/renderer/sledgehammer.rs embeds raw JavaScript defining a Queue. Refactor to split it into named d... | refactoring | leptos | {
"type": "const_item",
"name": "JS",
"source_file": "tachys/src/renderer/sledgehammer.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Create an enhanced `Default` implementation for a Leptos app's `User` type that also includes role-based defaults:\n\n```rust... | code_generation | leptos | {
"type": "impl_item",
"name": "Default",
"source_file": "projects/session_auth_axum/src/auth.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "This `add_any_attr` implementation for a `TitleView` type simply returns `self`, ignoring the attribute. Is this a bug or int... | bug_detection | leptos | {
"type": "function_item",
"name": "add_any_attr",
"source_file": "meta/src/title.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show a practical, real-world usage example of `open_websocket` from `examples/server_fns_axum/src/app.rs` in a leptos applica... | api_usage | leptos | {
"type": "function_item",
"name": "open_websocket",
"source_file": "examples/server_fns_axum/src/app.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show a practical, real-world usage example of the `GetValue` API from `reactive_graph/src/traits.rs` in a Leptos application.... | api_usage | leptos | {
"type": "impl_item",
"name": "GetValue",
"source_file": "reactive_graph/src/traits.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show a practical, real-world usage example of `add_any_attr` from `meta/src/html.rs` in a leptos application.\n\nSource:\n```... | api_usage | leptos | {
"type": "function_item",
"name": "add_any_attr",
"source_file": "meta/src/html.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement a `WindowListenerHandle` struct in Leptos that holds a cleanup closure, and provide a `remove` method that consumes... | code_generation | leptos | {
"type": "leptos_dom",
"name": "WindowListenerHandle::remove",
"source_file": "leptos_dom/src/helpers.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain the `attribute_to_tokens` function in Leptos's proc-macro system. What is the difference between a `Block` attribute ... | api_usage | leptos | {
"type": "function_item",
"name": "attribute_to_tokens",
"source_file": "leptos_macro/src/view/mod.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show how to use `find::link_with_text` from Leptos e2e test fixtures to write a complete test step that navigates via a link ... | api_usage | leptos | {
"type": "function_item",
"name": "link_with_text",
"source_file": "examples/suspense_tests/e2e/tests/fixtures/find.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Generate a Leptos server function that waits a specified number of seconds and demonstrate it with Suspense:\n\n```rust\nasyn... | code_generation | leptos | {
"type": "synthetic",
"name": "first_wait_fn",
"source_file": "examples/suspense_tests/src/app.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write comprehensive tests for `hydrate` from `tachys/src/reactive_graph/class.rs`.\n\nCode:\n```rust\nfn hydrate<const FROM_S... | test_generation | leptos | {
"type": "function_item",
"name": "hydrate",
"source_file": "tachys/src/reactive_graph/class.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a Leptos+Axum backend component for managing post permissions. Based on the `PostPermission` struct, create a server fu... | code_generation | leptos | {
"type": "impl_item",
"name": "PostPermission",
"source_file": "projects/ory-kratos/app/src/database_calls.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Implement the `Render` trait for `SuspenseBoundary` including the complex `build` method that manages `nth_run` tracking to a... | code_generation | leptos | {
"type": "impl_item",
"name": "Render",
"source_file": "leptos/src/suspense_component.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Demonstrate practical use of `FromRes<Patch<Encoding>, ...>` in a Leptos server function that uses a PATCH HTTP method to per... | api_usage | leptos | {
"type": "impl_item",
"name": "T",
"source_file": "server_fn/src/codec/patch.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "The following Leptos component test is supposed to build `ComponentProps` with several field types and assert that they round... | bug_detection | leptos | {
"type": "test",
"name": "component",
"source_file": "leptos_macro/tests/component.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "How do I implement the `rebuild` method on a custom `AttributeValue` in leptos/tachys to update a DOM attribute efficiently? ... | api_usage | leptos | {
"type": "function_item",
"name": "rebuild",
"source_file": "tachys/src/html/attribute/value.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write tests for the `to_html_with_buf` method on tachys HTML elements that verify self-closing tags are not given a closing t... | test_generation | leptos | {
"type": "function_item",
"name": "to_html_with_buf",
"source_file": "tachys/src/html/element/mod.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Refactor this `TextStream` `From` implementation to add error handling for stream items that fail to convert to `String`, ins... | refactoring | leptos | {
"type": "impl_item",
"name": null,
"source_file": "server_fn/src/codec/stream.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "The `rebuild` function for `KeyedState` rebuilds a keyed list. Refactor to extract a helper `compute_diff(old: &FxIndexSet<K>... | refactoring | leptos | {
"type": "function_item",
"name": "rebuild",
"source_file": "leptos/src/for_loop.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Explain the role of this `From` implementation in a Leptos hexagonal architecture application:\n\n```rust\nimpl From<DomainDa... | code_explanation | leptos | {
"type": "impl_item",
"name": "UiMappingFromDomainData2",
"source_file": "projects/hexagonal-architecture/src/trait_impl.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Based on the Leptos codebase pattern shown below from `tachys/src/html/attribute/mod.rs`, write a new, related but distinct f... | code_generation | leptos | {
"type": "function_item",
"name": "hydrate",
"source_file": "tachys/src/html/attribute/mod.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a Rust function `build_route_url(base: &str, segments: &[&str]) -> String` that constructs a URL by joining a base path... | code_generation | leptos | {
"type": "tachys_source",
"name": "finish_route",
"source_file": "tachys/src/html/attribute/global.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Show how to use the `TryRes` trait to build HTTP responses in a Leptos server function context. Provide examples of building ... | api_usage | leptos | {
"type": "impl_item",
"name": null,
"source_file": "server_fn/src/response/generic.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Create a new leptos implementation for a task inspired by `Errors` from `leptos/src/error_boundary.rs`.\n\nReference code:\n`... | code_generation | leptos | {
"type": "impl_item",
"name": "Errors",
"source_file": "leptos/src/error_boundary.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Using the Leptos `MatchNestedRoutes` pattern shown below as inspiration, implement a **new** related function or component th... | code_generation | leptos | {
"type": "trait_item",
"name": "MatchNestedRoutes",
"source_file": "router/src/matching/mod.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Write a Leptos `App` component that uses lazy routes (code-split by route) with a shared `RwSignal<i32>` count provided as co... | code_generation | leptos | {
"type": "function_item",
"name": "App",
"source_file": "examples/lazy_routes/src/app.rs"
} |
[
{
"role": "system",
"content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."
},
{
"role": "user",
"content": "Create a new leptos implementation for a task inspired by `call_redirect_hook` from `server_fn/src/redirect.rs`.\n\nReference... | code_generation | leptos | {
"type": "function_item",
"name": "call_redirect_hook",
"source_file": "server_fn/src/redirect.rs"
} |
End of preview. Expand in Data Studio
Arcwright-Leptos
An instruction-tuning dataset for the Leptos Rust crate, built for the Arcwright fine-tuned model.
Leptos is a reactive web UI framework for Rust with fine-grained reactivity, server-side rendering, and a component model inspired by modern frontend frameworks.
Dataset Summary
- 2,034 instruction-response pairs covering reactive signals, components,
view!macro, server functions, ssr, hydration, routing, and resource management - Generated from real source code using the OSS-Instruct methodology via Claude Code sub-agents
- Validated for structural correctness and deduplicated using MinHash (Jaccard threshold 0.7)
- Format: ChatML (messages array with system/user/assistant roles)
Category Distribution
| Category | Count | % |
|---|---|---|
| Code Generation | 711 | 34% |
| Code Explanation | 364 | 17% |
| Api Usage | 320 | 15% |
| Bug Detection | 242 | 11% |
| Refactoring | 211 | 10% |
| Test Generation | 198 | 9% |
Format
Each example is a JSON object with a messages array:
{
"messages": [
{"role": "system", "content": "You are an expert Rust programmer specializing in the leptos crate and modern Rust development patterns."},
{"role": "user", "content": "Write a Leptos component that displays a counter with increment and decrement buttons using reactive signals."},
{"role": "assistant", "content": "..."}
],
"category": "code_generation",
"crate": "leptos"
}
Usage
from datasets import load_dataset
dataset = load_dataset("y0sif/Arcwright-Leptos")
print(dataset["train"][0]["messages"])
Part of Arcwright
This dataset is one of three crate-specific datasets used to train Arcwright-E4B-v1:
| Dataset | Crate | Pairs |
|---|---|---|
| Arcwright-Leptos | Leptos | 2,046 |
| Arcwright-Axum | Axum | 741 |
| Arcwright-Rig | Rig | 697 |
Source
All instruction pairs were generated from source code in the Leptos repository. Code was chunked using tree-sitter into meaningful units (functions, impl blocks, modules), then used as seed material for instruction generation.
License
Apache 2.0
- Downloads last month
- 44