Taaitaaiger / jlrs

Julia bindings for Rust
MIT License
408 stars 21 forks source link

Create a website with a tutorial #82

Open Taaitaaiger opened 1 year ago

Taaitaaiger commented 1 year ago

The only information that's currently available is contained within the docs. It's hard to provide a step-by-step tutorial that progressively explains how to use jlrs that way, a website and a tutorial is needed.

Summary of plans:

Introduction

The first few tutorials should focus on introducing important concepts in jlrs. I think it's best to start with embedding Rust using the sync runtime because that involves the least amount of prerequisites, and using the same structure as the Embedding Julia doc does.

Sync runtime

Primitive data

Modules

Functions

Memory management

Arrays I

Async runtime

After the introductory material, I think it's best to introduce async runtime before diving into more complex topics.

Data

These tutorials dive deeper into topics like Julia types and the layouts of their instances. This information is useful if you want to access or mutate the content of Julia data directly from Rust.

Types and layouts

Values

Arrays II

Other types

Jlrs.Reflect

CCall

The final set of tutorials are about calling Rust from Julia, they should focus on the julia_module macro and the functionality that can be exposed to Julia with it.

CCall

julia_module

Constants and globals

Freestanding functions, opaque types, and their methods

Foreign types and their methods

Async function calls

JLL packages

alstat commented 4 months ago

Looking forward to this, I'm coming from Julia and now learning Rust, and a step-by-step on how to use this for newbies like me would really help a lot indeed. I'm planning to use jlrs to embed Julia within Rust applications. I will try to learn this library (though might take sometime), and hoping to contribute to the documentations.