-
-
Notifications
You must be signed in to change notification settings - Fork 51
WIP: Rust Experiments #852
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
base: master
Are you sure you want to change the base?
Conversation
@rikhuijzer: Sume Rust experiments for modifying complete paths on the Rust side. With |
#[derive(Serialize,Deserialize)] | ||
#[serde(untagged)] | ||
enum Segment { | ||
Line(String /* "l" */, Point), |
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.
This is ugly.
use wasm_minimal_protocol::*; | ||
|
||
initiate_protocol!(); | ||
|
||
type Point = Vec<f64>; | ||
type Point = ArrayVec<f64, 4>; |
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.
Yes this is great. I was also thinking about something like this
Experimenting. I like it
Yes I also ran into this a few times. This is Rust’s blessing and curse I think. I was fixing it by trying to be more strict at the Typst side. I fixed one int case in I believe #849 (on phone now so can’t check) which didn’t seem too bad. Naja I’m also open to other ideas these were just my 2 cents |
I think static typing is a massive improvement in programming in general, but people are allowed to disagree with me on this one |
5651c33
to
e317f7c
Compare
7fb3a2a
to
f95c1f2
Compare
Some tests.