Skip to content

Wrapping up documentation and slight project structure adjustment#32

Merged
gafferongames merged 3 commits intomas-bandwidth:masterfrom
vvanders:master
Apr 23, 2017
Merged

Wrapping up documentation and slight project structure adjustment#32
gafferongames merged 3 commits intomas-bandwidth:masterfrom
vvanders:master

Conversation

@vvanders
Copy link
Contributor

With this I think I've got the docs at a place that I'm happy with(see https://docs.rs/netcode/0.3.1/netcode/ for how they look). There's a bunch of sample code and a functioning example now too.

Note that I had to change the project structure a little bit and include the Cargo.toml in the root directory. Since Rust does a clean build from scratch in a separate directory for publishing I couldn't include resources outside of the tree from the Cargo.toml. Since we build the C API as part of our test pass it had to live in a place where it could find it.

Let me know if that's okay. I can look into other solutions but none of them are nice. Cargo doesn't have any hooks for running commands before publish executes so moving it seemed like the most straightforward fix.

@gafferongames gafferongames merged commit ff53636 into mas-bandwidth:master Apr 23, 2017
@gafferongames
Copy link
Contributor

Hey there, heads up we are considering changing the chacha from 64bit to 96bit, because it makes the go port easier, golang supports the IETF version (96 bits), but doesn't support the 64bit version. We're going to keep the 64bit sequence # in packets, but zero pad to 96 bits before passing to IETF.

@vvanders
Copy link
Contributor Author

Got it, things are a tad busy now so I don't know if I'll be able to pick up the change quickly. I'll try to look into it when I can over the next few days. Are you keeping the internal structures 64 bits and just changing the invocation of encode/decode?

@gafferongames
Copy link
Contributor

gafferongames commented Apr 26, 2017

Yes. No changes to structures, just the implementation will use the libsodium iee version w. 96bit nonce, with high bits padded zero, so the golang implementation can use the native chacha support.

@vvanders
Copy link
Contributor Author

Okay yeah, that should be a bit more straightforward. Let me see if I can get a change up in a branch tomorrow or the day after and you can cherry-pick it in when you decide to make the switch.

@gafferongames
Copy link
Contributor

OK. The IETF chacha is in the C implementation. Look at the diff, and this should be a pretty trivial change. cheers

@vvanders
Copy link
Contributor Author

Ugh, and looks like Rust doesn't have bindings in libsodium_sys. Not the end of the world but going to take me a bit of time to sort out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants